|
|
Joined: May 2003
Posts: 1,068
Junior Member
|
Junior Member
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
|
|
|
|
Joined: Apr 2001
Posts: 3,266
Member
|
Member
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
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
|
|
|
|
Joined: Jul 2001
Posts: 1,157 Likes: 82
coffee and code
|
coffee and code
Joined: Jul 2001
Posts: 1,157 Likes: 82 |
<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&User=$Uid&Board=$Board&what=ubbthreads&page=$page&view=$view&sb=$sb&o=$o\">$Who</a>"; <br />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>"; <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
|
|
|
|
Joined: May 2003
Posts: 1,068
Junior Member
|
Junior Member
Joined: May 2003
Posts: 1,068 |
|
|
|
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.
|
|
Posts: 21,079
Joined: March 2000
|
|
Forums63
Topics37,573
Posts293,925
Members13,849
|
Most Online5,166 Sep 15th, 2019
|
|
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
|
|
|
|
|