| Author |
Message |
Leo

Joined: Oct 18, 2007
Posts: 12
|
Posted:
Thu Oct 18, 2007 3:49 pm |
|
Hello everyone,
I just got the Info Block setup on my PhpNuke 7.9 and It works great. On the other, I have a question on the Online User Display section. If I am a admin, Can my username change to different color instead of regular color like other members have. Is this possible?
If it does, how would I do that?
Thanks a lot. |
| |
|
|
 |
gotcha
Site Admin


Joined: Oct 25, 2004
Posts: 921
|
Posted:
Fri Oct 19, 2007 10:12 am |
|
Open up block-Info_box.php and find the following
| Code: |
while( $row = $db->sql_fetchrow($result) )
{
if ($row['guest'] == 0)
{
$m++;
if ($m <= $max_display_members)
{
|
continued in next post.... |
| |
|
|
 |
gotcha
Site Admin


Joined: Oct 25, 2004
Posts: 921
|
Posted:
Fri Oct 19, 2007 10:23 am |
|
after add
| Code: |
$sql = $db->sql_query("SELECT user_level FROM ".$prefix."_users WHERE username = '".$row['uname']."'");
$row2 = $db->sql_fetchrow($sql);
$ulevel = intval($row2['user_level']);
if ($ulevel == 3)
{
// mod
$color = "#FF0000";
}
elseif ($ulevel == 2)
{
// admin
$color = "#FF5A00";
}
else
{
// normal
$color = "inherit";
}
|
Then below that find this code:(it appears twice in one line, you want the 2nd one)
To this: (remove the > directly after span, the forum wouldn't show it correctly)
| Code: |
<span> style="color:'.$color.';">'.$row['uname'].'</span> |
|
| |
|
|
 |
Leo

Joined: Oct 18, 2007
Posts: 12
|
Posted:
Fri Oct 19, 2007 10:34 am |
|
Thank you very much for your quick reply. Gotcha.
 |
| |
|
|
 |
|
|