The Arcive of vBulletin Modifications Site. |
|
|
#1
|
||||
|
||||
|
Hi,
I'd like staff names to be red (admin) and green (mods/sup-mods) on this: (Users Browsing this Forum: (44 members) Ed Clark, pegas77, Herb, BillK, Meik Thiemann, Kieron, David Biggs, David Wright Lo67, Jamnut*, tenmantaylor, Bmod, Peter O'Connor, WilliamsBMW3, Mark Levoe, TheoF....... which shows under the mod list here: http://forum.racesimcentral.com/foru...?s=&forumid=36 I have coloured the names inside the postbit and on who's online, I'd like them to be on there or (if possible) everywhere on the whole board??? |
|
#2
|
||||
|
||||
|
in forumdisplay.php
find: PHP Code:
PHP Code:
|
|
#3
|
||||
|
||||
|
Thank you.
I had to modify it to this to exist with current hacks (plus I added bold tags), but it only shows the mods as green, doesn't show the admins (namely me when I was viewing it) as red. So any idea how to get the red functioning? I have an understanding of PHP but don't know how to write my own - but I can't see anything wrong as it's logically the same as the one underneath (the mod-sup.mod line).
|
|
#4
|
||||
|
||||
|
Code:
if ($showforumusers) {
$datecut = $ourtimenow - $cookietimeout;
$browsers = '';
$comma = '';
$forumusers = $DB_site->query("SELECT username, invisible, userid, usergroupid
FROM user
WHERE inforum = $foruminfo[forumid]
AND lastactivity > $datecut
AND lastvisit <> lastactivity");
while ($forumuser = $DB_site->fetch_array($forumusers)) {
if($forumuser['usergroupid']==6) $forumuser['username'] = "<font color='red'><b>".$forumuser['username']."</b></font>";
elseif($forumuser['usergroupid']==5 or $forumuser['usergroupid']==7) $forumuser['username'] = "<font color='green'><b>".$forumuser['username']."</b></font>";
if ((!$forumuser['invisible'] or $bbuserinfo['usergroupid'] == 6) and $bbuserinfo['userid'] != $forumuser['userid']) {
$userid = $forumuser['userid'];
$username = $forumuser['username'];
if ($forumuser['invisible'] == 1) { // Invisible User but show to Admin
$invisibleuser = '*';
} else {
$invisibleuser = '';
}
eval("\$browsers .= \"".$comma.gettemplate('forumdisplay_loggedinuser')."\";");
$comma = ', ';
$usercount++;
}
}
|
|
#5
|
||||
|
||||
|
i don't see a bug in this code
are you sure your adminusergroup is 6? |
|
#6
|
||||
|
||||
|
I'm guessing that it's something to do with admin invisibility??
Yeah it's the default 5, 6, 7. |
|
#7
|
||||
|
||||
|
no it has to do with yourself: the code of showing yourself at the browsing list is another part of code:
below the code above, find this: PHP Code:
PHP Code:
|
|
#8
|
||||
|
||||
|
Nearly there!
![]() I am red, so are the mods. Other admins are normal... Any further clues for the dunce of php we all call Tim Wheatley?
|
|
#9
|
||||
|
||||
|
The mods are green I mean.
|
|
#10
|
||||
|
||||
|
*bump* This still isn't working.
|
![]() |
|
|
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
|
|
More Information |
|
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|