redirect() Error

This add-on will allow you to give "moderators" access to manage users, and theire permissions, admin accounts are protected

Moderator: Moderators

Forum rules
The content in this forum is dated Dec. 21 2005 and can be used as Archive only. This Forum is LOCKED and READ ONLY !

redirect() Error

Postby helluvaguy on Fri 25. Apr, 2003 15:42

Hi,

this mod appeared to be the thing I've been looking for to give my moderators some more access to the 'cp stuff'.

But after installation I encounterd the following error:
Code: Select all
Fatal error: Call to undefined function: redirect() in /phpBB2/modcp/pagestart.php on line 56

This only happens if I want to access the ModCP - the AdminCP is accessable without any problem.

Any idea what's going wrong?
Could it be of any significance that I'm using phpBB 2.0.0?
Any help is appreciated.
helluvaguy
Poster
Poster
 
Posts: 17
Joined: Thu 24. Oct, 2002 12:16

Re: redirect() Error

Postby kooky on Fri 25. Apr, 2003 20:14

helluvaguy wrote:Could it be of any significance that I'm using phpBB 2.0.0?

Arf :?
Do you read the install text ?

This mod only available for phpBB 2.0.4 not 2.0.3 or 2.0.0 :wink:

Admin files are very different and change a lot since v2.0.0
i recommand you to update your phpBB to 2.0.4, because many (many) security bugs have been fixed
This is for you and to safeguard your forum.
kooky
brilliant supporter
 
Posts: 1329
Joined: Tue 31. Dec, 2002 17:52
Location: Au pays des rêves

Postby helluvaguy on Fri 25. Apr, 2003 21:22

Probably I've overread the part where it says only for 2.0.4.

Unfortunatly I tried with no luck to upgrade to the latest version, but had much too much difficulties (probably due to lots of mods).

Thx for your reply anyway. Maybe I'll try to mess with the files to get it working for this 'ancient' version.
helluvaguy
Poster
Poster
 
Posts: 17
Joined: Thu 24. Oct, 2002 12:16

Postby kooky on Sat 26. Apr, 2003 02:22

you should try with a fresh phpBB install and then reinstall your mods :?
i did that with phpBB 2.0.4 to reinstall all my mods (about 50 to 60 :oops: ) and put 1 week to reintall them :P
kooky
brilliant supporter
 
Posts: 1329
Joined: Tue 31. Dec, 2002 17:52
Location: Au pays des rêves

Postby helluvaguy on Sat 26. Apr, 2003 10:14

:lol: :lol: :lol: That is one week I haven't got right know.

But i managed to get this mod running with my version of phpBB.
helluvaguy
Poster
Poster
 
Posts: 17
Joined: Thu 24. Oct, 2002 12:16

Postby janine on Mon 12. May, 2003 15:30

helluvaguy, care to share how you got it working? I have version 2.0.3 and would really love to use this mod.... tia
janine
Poster
Poster
 
Posts: 11
Joined: Mon 12. May, 2003 15:28

Postby helluvaguy on Tue 13. May, 2003 00:29

Here is what i've done, as far as I recall. While the installationtext asks to look in includes/page_tail.php for
Code: Select all
$admin_link = ( $userdata['user_level'] == ADMIN ) ? '<a href="admin/index.' . $phpEx . '?sid=' . $userdata['session_id'] . '">' . $lang['Admin_panel'] . '</a><br /><br />' : '';

my line was looking like this (actually a bit different, for I had the link also visible for Mods an Junior Admins. But it boils down to this :) )
Code: Select all
$admin_link = ( $userdata['user_level'] == ADMIN ) ? '<a href="' . append_sid("admin/index.$phpEx") . '">' . $lang['Admin_panel'] . '</a><br /><br />' : '';


So instead of replacing it with

Code: Select all
$admin_link = ( $userdata['user_level'] == ADMIN ) ? '<a href="admin/index.' . $phpEx . '?sid=' . $userdata['session_id'] . '">' . $lang['Admin_panel'] . '</a><br /><br />' : (( $userdata['user_level'] == MOD ) ? '<a href="modcp/index.' . $phpEx . '?sid=' . $userdata['session_id'] . '">' . $lang['Mod_CP'] . '</a><br /><br />' : '');

I changed that code to this
Code: Select all
$admin_link = ( $userdata['user_level'] == ADMIN ) ? '<a href="' . append_sid("admin/index.$phpEx") . '">' . $lang['Admin_panel'] . '</a><br /><br />' : (( $userdata['user_level'] == MOD ) ? '<a href="' . append_sid("modcp/index.$phpEx") . '">' . $lang['Mod_CP'] . '</a><br /><br />' : '');

Take note of the changed (old) href linkage. I absolutely can't tell if this will work with phpBB 2.0.3. But give it a try

But don't forget to backup!!!!
helluvaguy
Poster
Poster
 
Posts: 17
Joined: Thu 24. Oct, 2002 12:16

Postby janine on Tue 13. May, 2003 14:46

Thanks so much for taking the time to help me :) I too have the supermod mod installed, but itr never worked right. If I could get this working It would help me so much! Here's what I have in page_tail.php. If I put in the code you used that should work then right?

Code: Select all
if ( $userdata['user_level'] == ADMIN )
{
$admin_link = '<a href="' . append_sid("admin/index.$phpEx") . '">' . $lang['Admin_panel'] . '</a><br /><br />';
}
else if ( $userdata['user_level'] == LESS_ADMIN )
{
$admin_link = '<a href="' . append_sid("super_mod/index.$phpEx") . '">' . $lang['Super_Mod_panel'] . '</a><br /><br />';
}


Tahnks again for your help :D
janine
Poster
Poster
 
Posts: 11
Joined: Mon 12. May, 2003 15:28

Next

Return to Moderator CP [2.0.17/EM]

Who is online

Users browsing this forum: No registered users and 1 guest

cron