PDA

View Full Version : Link to Admin Panel On Forum Home?


69-FLy-gUy
01-19-2002, 06:43 AM
Possible a link on the forum home page only viewable by admins that will take them to the admin panel...

And for mods.. the same thing? is this possible,?

Ciao

-69

JJR512
01-20-2002, 12:50 AM
Yeah, it's possible...I don't have access to my hacking materials at the moment, but I think I know how to do it. But another idea, the way I do it with my board, although maybe not as easy as a link on the forums home page, is that I have a private forum open only to moderators and admins, and an announcement in that forum with the links to both CPs. The announcement is set to expire in 2010 or something like that, so it will be there at the top for quite a while. :D

69-FLy-gUy
01-20-2002, 07:14 AM
That would work fine also..

Let me know when you have your hacking materials..

Thanks for your support

Ciao

69-FLy-gUy
01-22-2002, 06:26 AM
Did you ever get it?

Ciao

Admin
01-22-2002, 08:20 AM
Place this code in global.php:
if ($bbuserinfo['usergroupid']==6) {
$cplink='<a href="admin/index.php">Administrator Control Panel</a>';
} elseif ($bbuserinfo['usergroupid']==5 or $bbuserinfo['usergroupid']==7) {
$cplink='<a href="mod/index.php">Moderator Control Panel</a>';
} else {
$cplink='';
}
right after this:
$logincode=makelogincode();
(EOF)

Now use $cplink in any of your templates (even footer/header), it will be available on all pages. :)

69-FLy-gUy
01-22-2002, 09:17 AM
Thanks.. I noticed one thing though...

When i put it in the header or footer it won't show up. Only when i place it in the forumhome...

Do I have to add the PHP code to a particular file?

Ciao

black
01-22-2002, 11:17 PM
Originally posted by FireFly
Place this code in global.php:
if ($bbuserinfo['usergroupid']==6) {
$cplink='<a href="admin/index.php">Administrator Control Panel</a>';
} elseif ($bbuserinfo['usergroupid']==5 or $bbuserinfo['usergroupid']==7) {
$cplink='<a href="mod/index.php">Moderator Control Panel</a>';
} else {
$cplink='';
}
right after this:
$logincode=makelogincode();
(EOF)

Now use $cplink in any of your templates (even footer/header), it will be available on all pages. :)

Did u do that?


Dang.... Firefly u beat me to it

Sparkz
01-23-2002, 08:14 AM
I couldn't get it to work in my header either - but it worked everywhere else I tried (haven't tried footer, tho)

Could vbPortal affect this, maybe? Shouldn't think so, but...

Admin
01-23-2002, 08:27 AM
Of course...

Instead of placing the code after this:
$logincode=makelogincode();
place it after this:
eval(gettemplate('phpinclude',0,0));
that should do it.

kermit
01-23-2002, 08:44 AM
I like this hack.. i put it under (Welcome to our newest member) using the same size font and it works a treat :D

Thanx, FireFly