I dont care for the display which shows the number of people in the forums; I'd rather see who is actually in the forum.
So, I did another Quick Mod:
In postlist.php, around lines 493-514 I replaced that code with (the stuff in bold):
[]// Find out how many are browsing this forum
$query = "
SELECT O_Type,O_Extra,O_Username,O_Uid
FROM {$config['tbprefix']}Online
WHERE O_Extra LIKE '$Board%'
";
$sth = $dbh -> do_query($query);
$r = "";
$a = 0;
while (list($Type,$Extra,$Who,$Uid) = $dbh -> fetch_array($sth)) {
if ( $Type == "r" ) {
if ( empty($r) ) $r = "<a href="{$config['phpurl']}/showprofile.php?Cat=$Cat&User=$Uid&Board=$Board&what=ubbthreads&page=$page&view=$view&sb=$sb&o=$o">$Who</a>";
else $r .= ", <a href="{$config['phpurl']}/showprofile.php?Cat=$Cat&User=$Uid&Board=$Board&what=ubbthreads&page=$page&view=$view&sb=$sb&o=$o">$Who</a>";
}
else {
$a++;
}
}
if ( !empty($r) ) $r = "Users browsing this forum: $r";
if ( $a > 0 ) $r .= " (and $a anonymous users)";
// -------------------------
// Set up some sorting stuff[/]
Then in postlist.tmpl, I added the following likes in bold:
[]<!-- END OF LOOP -->
<tr>
<td colspan="6" class="tdheader">
$pagejumpers
</td></tr>
$tbclose
<br />
$tbopen
<tr>
<td class="darktable">
<table width="100%" cellpadding="3" cellspacing="0">
<tr>
<td class="catandforum">
<font class="small">$r</font>
</td>
</tr>
</table>
</td>
</tr>
$tbclose
<br />
$tbopen
<tr>
<td colspan="3" class="tdheader">
{$ubbt_lang['B_INFO']}[/]
Viola! I nicely formatted box with a display of the users who are browing the forum (and a link to their profiles).
Last edited by extremebikini; 04/20/2003 10:30 AM.