[2.0.10] Moderator CP

The cleanup is complete. This forum is now read only.

Rating:

Excellent!
95
65%
Very Good
27
18%
Good
13
9%
Fair
3
2%
Poor
9
6%
 
Total votes: 147

Famitsu
Registered User
Posts: 774
Joined: Mon Aug 25, 2003 7:59 pm
Location: Account disabled -> see my signature to contact me
Contact:

Post by Famitsu » Tue Oct 19, 2004 8:18 pm

[mez] wrote: I installed this mod and it works fine, but only if the moderator is using the subSilver theme :(

if they are using any other theme and then try to access the moderator control panel they get this error:
Template->make_filename(): Error - file does not exist


Is this a problem with my files (file missing etc), bug in the mod, not installed correctly?
Hi

All Mods by default use subSilver template, it's a phpBB standard otherwise a mod cannot be validated

About others templates compliancy there is a subject
-> http://perso.edeign.com:81/kooky/viewtopic.php?t=145 (might be down?)

i will try to explain you how to do:
First, create a new modcp directory in your template_name
  • Then in your template/template_name/admin/ copy these files:
    • TPL files unchanged between admin and modcp = same
      - disallow_body.tpl
      - index.htm
      - index_body.tpl
      - index_frameset.tpl
      - index_navigate.tpl
      - page_footer.tpl
      - page_header.tpl
      - ranks_edit_body.tpl
      - ranks_list_body.tpl
      - smile_edit_body.tpl
      - smile_import_body.tpl
      - smile_list_body.tpl
      - user_avatar_gallery.tpl
      - user_ban_body.tpl
      - user_email_body.tpl
      - words_edit_body.tpl
      - words_list_body.tpl
    • TPL Files to be edit:
      - user_edit_body.tpl
      - user_select_body.tpl
Note: you need to change subSilver classes with your own (use by your template)
user_select_body.tpl

Code: Select all

#
#-----[ FIND ]------------------------------------
#
		<td class="row1" align="center"><input type="text" class="post" name="username" maxlength="50" size="20" /> <input type="hidden" name="mode" value="edit" />{S_HIDDEN_FIELDS}<input type="submit" name="submituser" value="{L_LOOK_UP}" class="mainoption" /> <input type="submit" name="usersubmit" value="{L_FIND_USERNAME}" class="liteoption" onClick="window.open('{U_SEARCH_USER}', '_phpbbsearch', 'HEIGHT=250,resizable=yes,WIDTH=400');return false;" /></td>
#
#-----[ REPLACE WITH ]------------------------------------
#
		<td class="row1" align="center">
			<input type="text" class="post" name="username" maxlength="50" size="20" />
			<select name="username_list" onchange="document.forms['post'].username.value = document.forms['post'].username_list.options[document.forms['post'].username_list.selectedIndex].text">{S_USER_SELECT}</select>
			<input type="hidden" name="mode" value="edit" />
			{S_HIDDEN_FIELDS}
			<input type="submit" name="submituser" value="{L_LOOK_UP}" class="mainoption" />
			<input type="submit" name="usersubmit" value="{L_FIND_USERNAME}" class="liteoption" onClick="window.open('{U_SEARCH_USER}', '_phpbbsearch', 'HEIGHT=250,resizable=yes,WIDTH=400');return false;" />
		</td>
user_edit_body.tpl
This file has a lot of change which i can't explain (too long)
You will need to compare the file from subSilver/modcp/user_edit_body.tpl with you new file from your_template/modcp/user_edit_body.tpl

Do the same
1) disallow MOD to edit ADMIN and MODs accounts: {DISABLE_CHANGE}
2) disable delete option:

Code: Select all

#
#-----[ FIND ]-----------------------------------
#
	<tr>
...
			{L_DELETE_USER_EXPLAIN}
...
	</tr>
#
#----[ REPLACE WITH ]--------------------------------
#
<!--	<tr>
...
			{L_DELETE_USER_EXPLAIN}
...
	</tr>-->
3) the most difficult part (if you don't know HTML coding lines)
Here you need to reproduce profile code twice
First part: disable ADMIN and MODs fields (replace input with text)
ADD:

Code: Select all

	<!-- BEGIN switch_change_disallowed -->
.../...
	<!-- END switch_change_disallowed -->
Second part: original code
ADD

Code: Select all

	<!-- BEGIN switch_change_allowed -->
.../...
	<!-- END switch_change_allowed -->
Those lines appear twice

Save your changes
That's all :)
Don't PM me, i won't answer anymore

My Contibs: Online-Offline-Hidden | Email Confirmation
The TRI FORCE (Username Color | User Level | ModeratorCP)
...

My new/current account: contact me here

[mez]
Registered User
Posts: 76
Joined: Sun Jun 20, 2004 12:50 pm
Location: Australia
Contact:

Post by [mez] » Wed Oct 20, 2004 4:58 am

thanks, ill have a shot at it.

EDIT: I can't get it to work :cry:

EDIT: Is there a way to make it so that whenever the Moderator click on the control panel link it only shows the subSilver themed Control Panel; no matter what theme/skin/template they are using?

Famitsu
Registered User
Posts: 774
Joined: Mon Aug 25, 2003 7:59 pm
Location: Account disabled -&gt; see my signature to contact me
Contact:

Post by Famitsu » Wed Oct 20, 2004 10:38 am

try to add orginal directory (modcp) into your template_name directory
that will fix the "Template->make_filename(): Error - file does not exist"
Don't PM me, i won't answer anymore

My Contibs: Online-Offline-Hidden | Email Confirmation
The TRI FORCE (Username Color | User Level | ModeratorCP)
...

My new/current account: contact me here

[mez]
Registered User
Posts: 76
Joined: Sun Jun 20, 2004 12:50 pm
Location: Australia
Contact:

Post by [mez] » Wed Oct 20, 2004 11:54 am

i got that part working, now i have another problem:

using FISubtext theme my moderators get this when they click on the MOD CP link (the Control panel shows up black and colours are all messed up):

This is a screenshot of the Moderator Control panel :|
Image
That PCN thing is just my logo (dont worry about that).

Can you tell me what is going on?

Thanks in advance.

Famitsu
Registered User
Posts: 774
Joined: Mon Aug 25, 2003 7:59 pm
Location: Account disabled -&gt; see my signature to contact me
Contact:

Post by Famitsu » Wed Oct 20, 2004 5:58 pm

Please don't PM me, i will answer when i will be there
i watch all topics where i posted ^^

We will make a deal
Apply instructions i said above for your template FISubText
Copy all files from admin in a new modcp directory
Then, send me your user_edit_body.tpl and user_select_body.tpl from FISubText into a ZIP archive and also your email address (PM me this time :))
i will apply changes for you, but don't be hurry ;)
Don't PM me, i won't answer anymore

My Contibs: Online-Offline-Hidden | Email Confirmation
The TRI FORCE (Username Color | User Level | ModeratorCP)
...

My new/current account: contact me here

[mez]
Registered User
Posts: 76
Joined: Sun Jun 20, 2004 12:50 pm
Location: Australia
Contact:

Post by [mez] » Thu Oct 21, 2004 6:21 am

Ok great, thanks! PM Sent!

Thanks in advance.

Elux
Registered User
Posts: 3
Joined: Fri Oct 22, 2004 4:57 pm

Post by Elux » Fri Oct 22, 2004 7:02 pm

I get this error when using EasyMod for PHPBB:

Critical Error

Could not perform improperly formed COPY command.
copy root/modcp/admin_disallow.php to modcp/admin_disallow.php
MOD script line #138 :: FAQ :: Report

Can anyone help me install this and explain how as I really really need help please!

User avatar
cathal2004
Registered User
Posts: 8
Joined: Thu Jun 24, 2004 12:45 am
Contact:

Post by cathal2004 » Fri Oct 22, 2004 8:44 pm

create a folder and then extract everything into that folder and everything should work fine, well it did for me anyway.

Famitsu
Registered User
Posts: 774
Joined: Mon Aug 25, 2003 7:59 pm
Location: Account disabled -&gt; see my signature to contact me
Contact:

Post by Famitsu » Fri Oct 22, 2004 9:17 pm

Elux wrote: I get this error when using EasyMod for PHPBB:

Critical Error

Could not perform improperly formed COPY command.
copy root/modcp/admin_disallow.php to modcp/admin_disallow.php
MOD script line #138 :: FAQ :: Report

Can anyone help me install this and explain how as I really really need help please!
Maybe you unziped the root directory in a wrong path
should be:
admin/mods/modcp_1.0.5em/root
modcp_1.0.5em directory has install.txt
Don't PM me, i won't answer anymore

My Contibs: Online-Offline-Hidden | Email Confirmation
The TRI FORCE (Username Color | User Level | ModeratorCP)
...

My new/current account: contact me here

Gimble
Registered User
Posts: 27
Joined: Thu May 15, 2003 10:36 pm
Location: MN
Contact:

Post by Gimble » Sat Oct 23, 2004 12:17 am

Looks like just what I need!

But I'm getting this error. Anyone have ideas?

Code: Select all

Fatal error: Call to undefined function: redirect() in /forum/modcp/pagestart.php on line 58

Famitsu
Registered User
Posts: 774
Joined: Mon Aug 25, 2003 7:59 pm
Location: Account disabled -&gt; see my signature to contact me
Contact:

Post by Famitsu » Sat Oct 23, 2004 12:33 am

i saw you forum is based on phpBB 2.0.5
the ModCP uses phpBB 2.0.8 -> 2.0.10 for security reason

i cannot confirm that because i never tested current version on older version than 2.0.8

i checked line 59
difference between v2.0.4 and 2.0.10
2.0.4

Code: Select all

if ($HTTP_GET_VARS['sid'] != $userdata['session_id'])
{
	$url = preg_replace('/sid=([^&]*)(&?)/i', '', $HTTP_SERVER_VARS['REQUEST_URI']);
	$url = preg_replace('/\?$/', '', $url);
	$url .= ((strpos($url, '?')) ? '&' : '?') . 'sid=' . $userdata['session_id'];

	redirect($url);
}
2.0.10

Code: Select all

if ($HTTP_GET_VARS['sid'] != $userdata['session_id'])
{
	$url = str_replace(preg_replace('#^\/?(.*?)\/?$#', '\1', trim($board_config['server_name'])), '', $HTTP_SERVER_VARS['REQUEST_URI']);
	$url = str_replace(preg_replace('#^\/?(.*?)\/?$#', '\1', trim($board_config['script_path'])), '', $url);
	$url = str_replace('//', '/', $url);
	$url = preg_replace('/sid=([^&]*)(&?)/i', '', $url);
	$url = preg_replace('/\?$/', '', $url);
	$url .= ((strpos($url, '?')) ? '&' : '?') . 'sid=' . $userdata['session_id'];

	redirect("index.$phpEx?sid=" . $userdata['session_id']);
}
You should update your forum to latest version, not so hard ;)
Don't PM me, i won't answer anymore

My Contibs: Online-Offline-Hidden | Email Confirmation
The TRI FORCE (Username Color | User Level | ModeratorCP)
...

My new/current account: contact me here

Gimble
Registered User
Posts: 27
Joined: Thu May 15, 2003 10:36 pm
Location: MN
Contact:

Post by Gimble » Sat Oct 23, 2004 12:37 am

I would upgrade, but have integrated a lot of junk. I am currently looking for the upgrade from 2.0.5, but am not having any luck.

Added: Ah, nevermind. I see the install for 2.0.10 has the info. The problem I have is that I added a lot of my own code to these files. A replace doesn't work for me.

Famitsu
Registered User
Posts: 774
Joined: Mon Aug 25, 2003 7:59 pm
Location: Account disabled -&gt; see my signature to contact me
Contact:

Post by Famitsu » Sat Oct 23, 2004 12:45 am

all files you need are there
http://sourceforge.net/project/showfile ... e_id=28882

an other solution, replace the contents of your pagestart i quoted above in the pagestart in the modcp directory
Don't PM me, i won't answer anymore

My Contibs: Online-Offline-Hidden | Email Confirmation
The TRI FORCE (Username Color | User Level | ModeratorCP)
...

My new/current account: contact me here

Gimble
Registered User
Posts: 27
Joined: Thu May 15, 2003 10:36 pm
Location: MN
Contact:

Post by Gimble » Sat Oct 23, 2004 12:55 am

Changed.

Code: Select all

Fatal error: Call to undefined function: redirect() in /usr/home/web/users/a0018328/html/forum/modcp/pagestart.php on line 42

[mez]
Registered User
Posts: 76
Joined: Sun Jun 20, 2004 12:50 pm
Location: Australia
Contact:

Post by [mez] » Sat Oct 23, 2004 8:37 am

The files you sent me (Famitsu) didn't work.

Thanks for trying though.

I will just tell my moderators to use a theme other than FI.SubText

Thanks for all your help.

Post Reply

Return to “[2.0.x] MOD Database Cleanup”