Log in

View Full Version : Question about hack


Roody
04-25-2002, 03:38 PM
i installed this hack : Name Colors (http://www.vbulletin.org/hacks/index.php?s=&action=showhack&hackid=34)

my problem is i have created a user group called Asst. Administrator and im wondering how i can adjust the code in this hack to reflect this role and make the appropriate color change.

any help would be appreciated.

Thanks

Sparkz
04-25-2002, 03:50 PM
Find the usergroupid for your Asst. Admin group, and change this:

if ($loggedin['usergroupid'] == 6 and $highlightadmin) {
$username = "<b><i><font color=red>$loggedin[username]</font></i></b>"; // Color for Admin
} else if (($loggedin['usergroupid'] == 5) and $highlightadmin) {
$username = "<b><font color=darkred>$loggedin[username]</font></b>"; // Color for Supermod


to this:

if ($loggedin['usergroupid'] == 6 and $highlightadmin) {
$username = "<b><i><font color=red>$loggedin[username]</font></i></b>"; // Color for Admin
} else if (($loggedin['usergroupid'] == replace_this_with_your_ass_admin_usergroup_id) and $highlightadmin) {
$username = "<b><font color=somecolor>$loggedin[username]</font></b>"; // Color for Assistant admin (Remember to change the color)
} else if (($loggedin['usergroupid'] == 5) and $highlightadmin) {
$username = "<b><font color=darkred>$loggedin[username]</font></b>"; // Color for Supermod


Do the replacement at both places.
Remember to back up your file, since I have not tested this.

Sparkz
04-25-2002, 03:52 PM
Edit the template to reflect the addition too :)

Roody
04-25-2002, 03:58 PM
thanks :)

Roody
04-25-2002, 04:22 PM
ok here comes a bigtime newbie question. i am looking at modify usergroups and not seeing a User ID for my asst. administrator group. how do i find it?

Sparkz
04-25-2002, 04:58 PM
Right click at the [edit]-link and choose 'Copy Shortcut'.
Paste it into an editor and look at the end of the link. It should say 'usergroupid=x'

Roody
04-25-2002, 05:31 PM
thanks for that, that did the trick :)