Previous Thread
Next Thread
Print Thread
Rate Thread
#261683 10/30/2003 5:25 PM
Joined: May 2003
Posts: 1,068
Junior Member
Junior Member
Offline
Joined: May 2003
Posts: 1,068
I have dug around and didn't see anything for this, the closest I have found is the WOL hack. It would be neat to have a total of registered and anonymous users added together for a total users online. I could be wrong but I bet this would be pretty easy for the experienced folks around here

Sponsored Links
BlarC #261684 10/30/2003 5:28 PM
Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
You can modify the IIP online pal to achieve this right now it separates it into users and guest but you could add them together

Joined: May 2003
Posts: 1,068
Junior Member
Junior Member
Offline
Joined: May 2003
Posts: 1,068
I thought about that, I believe DL thew some code out for that a while back. Only thing is that when it's up with the WOL box it's not matched up, the IIP pal reads differently (less) and it appears to be due to a cache setting but I can't find a setting to change it to real time.

PS Neato theme change guys

BlarC #261686 10/30/2003 11:29 PM
Joined: Jul 2001
Posts: 1,157
Likes: 82
coffee and code
coffee and code
Joined: Jul 2001
Posts: 1,157
Likes: 82
Code
 <br />// ----------------------- <br />$query = " <br />SELECT O_Type,O_Extra,O_Username,O_Uid <br />FROM {$config['tbprefix']}Online <br />WHERE O_Extra LIKE '$Board%' <br />"; <br />$sth = $dbh -> do_query($query); <br />$r = ""; <br />$a = 0; <br />while (list($Type,$Extra,$Who,$Uid) = $dbh -> fetch_array($sth)) { <br />if ( $Type == "r" ) { <br />if ( empty($r) ) $r = "<a href=\"{$config['phpurl']}/showprofile.php?Cat=$Cat&amp;User=$Uid&amp;Board=$Board&amp;what=ubbthreads&amp;page=$page&amp;view=$view&amp;sb=$sb&amp;o=$o\">$Who</a>"; <br />else $r .= ", <a href=\"{$config['phpurl']}/showprofile.php?Cat=$Cat&amp;User=$Uid&amp;Board=$Board&amp;what=ubbthreads&amp;page=$page&amp;view=$view&amp;sb=$sb&amp;o=$o\">$Who</a>"; <br />} <br />else { <br />$a++; <br />} <br />} <br />if ( !empty($r) ) $r = "$r"; <br />if ( $a > 0 ) $r .= " and $a guest(s)."; <br /> <br />   $reged = $dbh -> do_query($query); <br />   $regrows = $dbh -> total_rows($reged); <br />


use "$regrows" in your template file where you want to display the total numbers of people online your site (members and lurkers)

there is some other code in there too - but that also should be easy to figure... I took this snippet from my ubbthreads.php file - do a search for "SELECT O_Type,O_Extra,O_Username,O_Uid" and you will find it

...the link in my sig shows it in action at the top of the page and all on the botton in the left info-box


Current developer of UBB.threads PHP Forum Software
Current Release: UBBT 7.7.5 // Preview: UBBT 8.0.0
isaac @ id242.com // my forum @ CelicaHobby.com
Joined: May 2003
Posts: 1,068
Junior Member
Junior Member
Offline
Joined: May 2003
Posts: 1,068
Thanks!

Sponsored Links

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:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
AllenAyres
AllenAyres
Texas
Posts: 21,079
Joined: March 2000
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
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-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)