PDA

View Full Version : [Request] Usergroup in bold on Who's Online


N9ne
06-24-2002, 10:21 PM
Ok here is my request: http://www.vbulletin.com/forum/showthread.php?s=&postid=311583#post311583

Basically, I want the usergroup to be bold wherever, ie. Just like SuperMods...

Logician
06-25-2002, 07:16 AM
Edit index.php, find:


if ($loggedin['usergroupid'] == 6 and $highlightadmin) {
$username = "<b><i>$loggedin[username]</i></b>";
} else if (($mod["$userid"] or $loggedin['usergroupid'] == 5) and $highlightadmin) {
$username = "<b>$loggedin[username]</b>";
} else {
$username = $loggedin['username'];
}


Replace it AS:


if ($loggedin['usergroupid'] == 6 and $highlightadmin)
{
$username = "<b><i>$loggedin[username]</i></b>";
}
else if ($loggedin['usergroupid'] == X and $highlightadmin)
{
$username = "<b><i>$loggedin[username]</i></b>";
}
else if (($mod["$userid"] or $loggedin['usergroupid'] == 5) and $highlightadmin)
{
$username = "<b>$loggedin[username]</b>";
} else
{
$username = $loggedin['username'];
}


Replace X with your new usergroup id and edit their bold, italic tags according to your wishes.

Not tested, should work..

Enjoy and dont ask me to release! ;)

Logician

N9ne
06-25-2002, 07:34 AM
lol ok this is a simple hack, don't release it ;) thanks though...

N9ne
06-25-2002, 07:35 AM
Oh another thing, could it be possible that you edit the authority list hack and add this usergroup to it? (right under Administrators)

Logician
06-25-2002, 08:06 AM
yep possible.

(Dont forget to Replace ALL Xs with the usergoupid)

N9ne
06-25-2002, 09:02 AM
Works, thanks :)

Thanks again for another useful hack to me..you should mod this forum!!

N9ne
06-25-2002, 07:39 PM
For some reason, it's just stopped working? on the who's online list, they're now just like registered users :( in plain text, no bold or italics, this is what I have in my index.php file...


if ($loggedin['usergroupid'] == 6 and $highlightadmin)
{
$username = "<b><i>$loggedin[username]</i></b>";
}
else if ($loggedin['usergroupid'] == 8 and $highlightadmin)
{
$username = "<b><i>$loggedin[username]</i></b>";
}
else if (($mod["$userid"] or $loggedin['usergroupid'] == 5) and $highlightadmin)
{
$username = "<b>$loggedin[username]</b>";
} else
{
$username = $loggedin['username'];
}
eval("\$activeusers = \"".gettemplate('forumhome_loggedinuser')."\";");
}

Logician
06-25-2002, 07:43 PM
Have you disabled highlightadmin feature via Admin CP? Does your Admins/Mods still italic/bold?

N9ne
06-25-2002, 07:45 PM
admins and mods still are in bold and italics yes...

Logician
06-25-2002, 07:53 PM
double check the usergroupid of the user who doesnt show up in italic/bold. Code seems fine and I cant see any reason that code will stop working all of a sudden..

N9ne
06-25-2002, 07:55 PM
I checked and it's 8...

Well that's the number I get when I mouseover the EDIT button in the usergroup page in the AdminCP...

I replaced the X with 8 in the code...

Logician
06-25-2002, 08:30 PM
There are 2 occurences of the replacement code in index.php. Did you applied the hack to both? if not apply it to the other part too.

N9ne
06-26-2002, 02:57 PM
I didn't know it appeared twice, I've done it now and it works...thanks :)

N9ne
06-27-2002, 03:07 PM
Ok i've another a question...

how do I get this to work when you click on "currently active users" and it takes you to the online.php page...do I just do the same steps for online.php?

Logician
06-27-2002, 03:55 PM
Replace


if ($user['usergroupid'] == 6 and $highlightadmin) {
$userinfo["$key"]['username'] = "<b><i>$user[username]</i></b>";
} else if (($mod["$key"] or $user['usergroupid'] == 5)and $highlightadmin) {
$userinfo["$key"]['username'] = "<b>$user[username]</b>";
} else {
$userinfo["$key"]['username'] = $user[username];
}


AS:


if ($user['usergroupid'] == 6 and $highlightadmin) {
$userinfo["$key"]['username'] = "<b><i>$user[username]</i></b>";
}
else if ($user['usergroupid'] == 8 and $highlightadmin)
{
$userinfo["$key"]['username'] = "<b><i>$user[username]</i></b>";
}
else if (($mod["$key"] or $user['usergroupid'] == 5)and $highlightadmin) {
$userinfo["$key"]['username'] = "<b>$user[username]</b>";
} else {
$userinfo["$key"]['username'] = $user[username];
}

N9ne
06-27-2002, 04:11 PM
is that for online.php?

Logician
06-27-2002, 05:25 PM
yeah

N9ne
06-27-2002, 05:42 PM
thanks, works :)