works great but here are some little improvments:
to make the online icon a link to the onlineusers hack change this:
$usersstatus = "<img src=\"images/online.gif\" border=0 alt=\"$userinfo[username] is Online\">";
to:
$usersstatus = "<a href=\"whoisonline.php?action=onlineusers\"><img src=\"images/online.gif\" border=0 alt=\"$userinfo[username] is Online\"></a>";
to see if the user is online on the memberlist:
open memberlist.php.
look for $posts = $user[posts];
(at the start)
and After it add:
// User Online Icon Hack by Chris Boulton
$status = $DB_site->query_first("SELECT session.userid,user.username,user.receivepm FROM session, user WHERE session.userid=user.userid AND session.userid='".intval($userinfo[userid])."'");
if ($status) {
$usersstatus = "<a href=\"whoisonline.php?action=onlineusers\"><img src=\"images/online.gif\" border=0 alt=\"$userinfo[username] is Online\"></a>";
} else {
$usersstatus = "<img src=\"images/offline.gif\" border=0 alt=\"$userinfo[username] is Offline\">";
}
// User Online Icon Hack by Chris Boulton
then goto memberlist template:
Find:
<td align="center" bgcolor="{tableheadbgcolor}"><smallfont color="{tableheadtextcolor}"><b>Number Of Posts
</b></smallfont></td>
After, Add:
<td align="center" bgcolor="{tableheadbgcolor}"><smallfont color="{tableheadtextcolor}"><b>Status</b></smallfont></td>
</tr>
Then Goto memberlistbit
look for:
<td bgcolor="{firstaltcolor}" align="center"><normalfont>$posts</normalfont></td>
After Add:
<td bgcolor="{secondaltcolor}" align="center"><normalfont>$usersstatus </normalfont></td>
Thats all
Update:
Sorry im having troble with the second improvment that It shows all the users as offline.
anyone can help?
|