Google

NukeCoder


View next topic
View previous topic
Post new topic   Reply to topic
Author Message
Leo




Joined: Oct 18, 2007
Posts: 12

PostPosted: Thu Oct 18, 2007 3:49 pm
Reply with quote

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.
 
View user's profile Send private message
gotcha
Site Admin
Site Admin



Joined: Oct 25, 2004
Posts: 921

PostPosted: Fri Oct 19, 2007 10:12 am
Reply with quote

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....
 
View user's profile Send private message Visit poster's website
gotcha
Site Admin
Site Admin



Joined: Oct 25, 2004
Posts: 921

PostPosted: Fri Oct 19, 2007 10:23 am
Reply with quote

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)
Code:

'.$row['uname'].'


To this: (remove the > directly after span, the forum wouldn't show it correctly)
Code:

<span> style="color:'.$color.';">'.$row['uname'].'</span>
 
View user's profile Send private message Visit poster's website
Leo




Joined: Oct 18, 2007
Posts: 12

PostPosted: Fri Oct 19, 2007 10:34 am
Reply with quote

Thank you very much for your quick reply. Gotcha.

Very Happy
 
View user's profile Send private message
Display posts from previous:       
Post new topic   Reply to topic

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 5 Hours
Forums ©