If you want to be able to see whos in chat over threads list..
Use GeorgeofCS code from his hack on digichat. Here is a paste:
in forumdisplay.php
at the very bottom the right above:
eval("dooutput(\"".gettemplate('forumdisplay')."\" );");
add:
// Get users chatting
if ($showforumusers) {
$datecut = $ourtimenow - $cookietimeout;
$chatters = '';
$comma = '';
$forumusers = $DB_site->query("SELECT username, invisible, userid
FROM user
WHERE inchat = 1 AND
lastchatactivity > $datecut");
while ($forumuser = $DB_site->fetch_array($forumusers)) {
if (!$forumuser['invisible'] or $bbuserinfo['usergroupid'] == 6) {
$userid = $forumuser['userid'];
$username = $forumuser['username'];
if ($forumuser['invisible'] == 1) { // Invisible User but show to Admin
$invisibleuser = '*';
} else {
$invisibleuser = '';
}
eval("\$chatters .= \"".$comma.gettemplate('forumdisplay_loggedinuser' )."\";");
$comma = ', ';
}
}
if ($chatters) {
if (!$moderatedby) {
$onlineusers = "<br>";
}
eval("\$onlineusers .= \"".gettemplate('forumdisplay_loggedinusers')."\"; ");
}
}
Next in forumdisplay_loggedinusers template
change:
<br>(Users Browsing this Forum: $browsers)
to:
<br>(Users Browsing this Forum: $browsers)
<br>(Users In Chat: $chatters)
|