#
#---------[ 1. OPEN ]---------------------------------------------------------
#
index.php
#
#---------[ 2. DELETE (line: 174) ]-------------------------------------------
#
$num_guests = 0;
#
#---------[ 2. FIND (line: 175) ]---------------------------------------------
#
$result = $db->query('SELECT user_id, ident FROM '.$db->prefix.'online ORDER BY ident') or error('Unable to fetch online list', __FILE__, __LINE__, $db->error());
#
#---------[ 3. REPLACE WITH ]-------------------------------------------------
#
$result = $db->query('SELECT o.user_id, o.ident, u.status FROM '.$db->prefix.'online AS o INNER JOIN '.$db->prefix.'users AS u ON u.id=o.user_id WHERE o.user_id>0 ORDER BY ident') or error('Unable to fetch online list', __FILE__, __LINE__, $db->error());
#
#---------[ 4. FIND (line: 177) ]---------------------------------------------
#
while ($cur_user_online = $db->fetch_assoc($result))
{
if ($cur_user_online['user_id'] > 0)
$users[] = '<a href="profile.php?id='.$cur_user_online['user_id'].'">'.pun_htmlspecialchars($cur_user_online['ident']).'</a>';
else
++$num_guests;
}
#
#---------[ 5. REPLACE WITH ]---------------------------------------------------
#
while ($cur_user_online = $db->fetch_assoc($result))
{
if($cur_user_online['status'] > PUN_MOD)
$users[] = '<a class="punadmin" href="profile.php?id='.$cur_user_online['user_id'].'">'.pun_htmlspecialchars($cur_user_online['ident']).'</a>';
elseif($cur_user_online['status'] > PUN_USER)
$users[] = '<a class="punmod" href="profile.php?id='.$cur_user_online['user_id'].'">'.pun_htmlspecialchars($cur_user_online['ident']).'</a>';
else
$users[] = '<a href="profile.php?id='.$cur_user_online['user_id'].'">'.pun_htmlspecialchars($cur_user_online['ident']).'</a>';
}
#
#---------[ 6. FIND (line: 185) ]---------------------------------------------
#
$num_users = count($users);
#
#---------[ 7. AFTER, ADD ]---------------------------------------------------
#
$result = $db->query('SELECT COUNT(ident) FROM '.$db->prefix.'online WHERE user_id=0') or error('Unable to fetch online list', __FILE__, __LINE__, $db->error());
$num_guests = $db->result($result);
#
#---------[ 8. OPEN ]---------------------------------------------------------
#
viewtopic.php
#
#---------[ 9. FIND (line: 227) ]---------------------------------------------
#
if (isset($online_list) && in_array($cur_post['poster_id'], $online_list))
$info = '<span class="punheadline"><a href="profile.php?id='.$cur_post['poster_id'].'"><u>'.pun_htmlspecialchars($cur_post['poster']).'</u></a></span>';
else
$info = '<span class="punheadline"><a href="profile.php?id='.$cur_post['poster_id'].'">'.pun_htmlspecialchars($cur_post['poster']).'</a></span>';
#
#---------[ 10. REPLACE WITH ]------------------------------------------------
#
switch($cur_post['status'])
{
case 2:
if (isset($online_list) && in_array($cur_post['poster_id'], $online_list))
$info = '<a class="punadmin" href="profile.php?id='.$cur_post['poster_id'].'"><u>'.pun_htmlspecialchars($cur_post['poster']).'</u></a>';
else
$info = '<a class="punadmin" href="profile.php?id='.$cur_post['poster_id'].'">'.pun_htmlspecialchars($cur_post['poster']).'</a>';
break;
case 1:
if (isset($online_list) && in_array($cur_post['poster_id'], $online_list))
$info = '<a class="punmod" href="profile.php?id='.$cur_post['poster_id'].'"><u>'.pun_htmlspecialchars($cur_post['poster']).'</u></a>';
else
$info = '<a class="punmod" href="profile.php?id='.$cur_post['poster_id'].'">'.pun_htmlspecialchars($cur_post['poster']).'</a>';
break;
default:
if (isset($online_list) && in_array($cur_post['poster_id'], $online_list))
$info = '<span class="punheadline"><a href="profile.php?id='.$cur_post['poster_id'].'"><u>'.pun_htmlspecialchars($cur_post['poster']).'</u></a></span>';
else
$info = '<span class="punheadline"><a href="profile.php?id='.$cur_post['poster_id'].'">'.pun_htmlspecialchars($cur_post['poster']).'</a></span>';
}
#
#---------[ 11. OPEN ]--------------------------------------------------------
#
Each style sheet, one at a time if easier.
#
#---------[ 12. ADD TO THE END ]----------------------------------------------
#
A:link.punmod, A:visited.punmod , A:hover.punmod {
color: #FF0000;
font-size: 12px;
font-weight: bold
}
A:link.punadmin, A:visited.punadmin , A:hover.punadmin {
color: #0000FF;
font-size: 12px;
font-weight: bold
}
#
#---------[ 13. SAVE/UPLOAD ]-------------------------------------------------
#
different colours for admins and mods