View Full Version : guests count in forumdisplay
to cont the members in forumdisplay is really easy:
$memberscount=0;
while () {
$memberscount++;
how would i do this to also count the guests? i cant use session table, right? thanks for your help.
I believe you do use the sessions since there is a location row within it.
$datecut=time()-$cookietimeout;
$loggedins=$DB_site->query_first("SELECT COUNT(*) AS sessions FROM session WHERE userid=0 AND lastactivity>$datecut AND location=$location");
$numberguest=$loggedins['sessions'];
you would want to work out the current location for the forums with this variabl.
$location
thats all I know about check for guests.
Admin
07-16-2002, 06:24 AM
It would be a bit of a pain, if you want to make it really accurate.
What Neo posted will probably work but there are SO MANY possibilities for $location.
Like I said, if you want to make it really accurate, move the inforum field from the user table to the session table, and edit updateforumuser() (or is it updateuseroforum()?), and instead of updating the user table there update the session table (you'll need to edit a different shut down query).
thanks chen. :)
i will do this. your instructions helped me.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.