Sc0rp
08-19-2004, 10:00 PM
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 :p
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..
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 :p
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..