Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Feb 2002
Posts: 950
Hacker
Hacker
Offline
Joined: Feb 2002
Posts: 950
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.
Sponsored Links
Entire Thread
Subject Posted By Posted
Quick Mod: Users Browsing This Forum PhotoPost 04/19/2003 7:38 AM
Re: Quick Mod: Users Browsing This Forum PhotoPost 04/19/2003 7:59 AM
Re: Quick Mod: Users Browsing This Forum JoshPet 04/19/2003 8:29 AM
Re: Quick Mod: Users Browsing This Forum AllenAyres 04/19/2003 9:02 AM
Re: Quick Mod: Users Browsing This Forum Hal9000 04/19/2003 7:24 PM
Re: Quick Mod: Users Browsing This Forum omegatron 04/19/2003 11:09 PM
Re: Quick Mod: Users Browsing This Forum ericgtr 06/23/2004 9:18 PM
Re: Quick Mod: Users Browsing This Forum JoshPet 07/02/2004 3:38 AM
Re: Quick Mod: Users Browsing This Forum ericgtr 07/02/2004 3:42 AM
Re: Quick Mod: Users Browsing This Forum ericgtr 07/02/2004 4:02 AM
Re: Quick Mod: Users Browsing This Forum JoshPet 07/02/2004 4:53 AM
Re: Quick Mod: Users Browsing This Forum Pilgrim 07/02/2004 8:14 PM
Re: Quick Mod: Users Browsing This Forum JoshPet 07/02/2004 8:56 PM
Re: Quick Mod: Users Browsing This Forum Pilgrim 07/02/2004 10:32 PM
Re: Quick Mod: Users Browsing This Forum slayer60 07/02/2004 10:53 PM
Re: Quick Mod: Users Browsing This Forum Pilgrim 07/03/2004 6:48 AM
Re: Quick Mod: Users Browsing This Forum JoshPet 07/03/2004 7:47 AM
Re: Quick Mod: Users Browsing This Forum DrChaos 07/03/2004 10:57 PM
Re: Quick Mod: Users Browsing This Forum Pilgrim 07/04/2004 12:26 AM
Re: Quick Mod: Users Browsing This Forum Ian_W 07/04/2004 12:25 PM

Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Shock Hosting
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Nettomo
Nettomo
Germany, Bremen
Posts: 417
Joined: November 2001
Forum Statistics
Forums63
Topics37,583
Posts293,955
Members13,824
Most Online151,614
Nov 14th, 2025
Today's Statistics
Currently Online 7368
Topics Created 0
Posts Made 0
Users Online 0
Birthdays 7
Top Posters
AllenAyres 21,080
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,834
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2026 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.1.0
(Snapshot build 20260108)