Version: 1.00, by Sc0rp
Developer Last Online: May 2012
Version: 2.3.x
Rating:
Released: 08-19-2004
Last Update: Never
Installs: 5
No support by the author.
What this basically do is add an 'admin cp' link to the bottom $logincode bit if the user has admin control panel access (cancontrolpanel) and add a 'mod cp' link if the user is a moderator (ismoderator).
so your $logincode would basically look like this if your an admin:
"Log Out | Mark All Forums Read | Forum Leaders | Admin CP | Mod CP"
(moderators would of course lack the admin link)
of course thats only the way ive done it, you can add your admin/mod links anywhere you want anyway you want.
Now I know this can be done easily by adding a short bit of code to the phpinclude template in which case it wouldnt even be called a hack, but then you'd have to edit the phpinclude template every time you'd want to add another usergroup to the 'allow list'. And since I like doing things the easy way I made a very small code modification so the script would detect the qualified usergroups by itself
Now imo this shouldnt even be called a hack cuz its so small but the fact is that it qualifies the hack posting rules so if I'd post it somewhere else but here it would be moved here anyway right? ^_^ Either way, doesnt really matter to me, I just wanted this little feature for myself and im sure some other ppl might appreciate it too..
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
just look at the bottom of your forum for this line:
Log Out | Mark All Forums Read | Forum Leaders
and imagen that with the hack installed it would look like this for an admin:
Log Out | Mark All Forums Read | Forum Leaders | Admin CP | Mod Cp
or this for a mod:
Log Out | Mark All Forums Read | Forum Leaders | Mod CP
basically usegroups that have access to the admin control panel (you can define this option when editing a usergroup, I think its the last or second last option) will see the admin cp and mod cp links and usergroups that are defined as moderators will see the mod cp link.
the only difference with this 'hack' compared to the template modification posted on vbulletintemplates.com is that in this hack the script automatically detects a usergroups permissions and with the template modification you have to define the usergroups manually.
$usercache["$userid"]=$DB_site->query_first("SELECT user.*,userfield.* FROM user LEFT JOIN userfield ON userfield.userid=user.userid WHERE user.userid='$userid'");
In adminfunctions.php, but I did find something close....
Quote:
// ###################### Start adminlog #######################
function adminlog ($extrainfo="",$userid=-1,$script="",$scriptaction="") {
global $DB_site,$bbuserinfo,$PHP_SELF,$action,$REMOTE_ADD R;
if ($userid==-1) {
$userid=$bbuserinfo[userid];
}
if ($script=="") {
$script=basename($PHP_SELF);
}
if ($scriptaction=="") {
$scriptaction=$action;
}
I'm using a vdeck, webhost is IPW, and the version is vBulletin Version 2.3.5 Help me....
Could you possibly tell us which sub division the first part of the code is in... since admin/functions.php is one of the larger vBulletin coding files, its a pain to prune through the whole big file... if you could specify what the code is under (I.E. ###################### Start getpagenav #######################) it would really be a huge help!