PDA

View Full Version : Total Number of Users Online Now


Polo
06-28-2004, 02:39 PM
I installed this easy and quick mod in my forums:

Total Number of Users Online Now
http://www.vbulletin.org/forum/showthread.php?s=&threadid=59722

however the number of total users online appears in all of my pages except in my vbadvnaced home page..

does anyone has an idea on how to make it work?

thanks in advance..

Samhan
06-28-2004, 05:22 PM
change this code :

if (strpos($_SERVER['PHP_SELF'], 'index.php') == false) {
$datecut = TIMENOW - $vboptions['cookietimeout'];
$headerguests=$DB_site->query_first("SELECT COUNT(*) AS count FROM session WHERE userid=0 AND lastactivity>$datecut");
$headerusers=$DB_site->query_first("SELECT COUNT(DISTINCT(userid)) AS count FROM session WHERE session.userid>0 AND session.lastactivity>$datecut");
$headerguests=$headerguests[count];
$headerusers=$headerusers[count];
$totalonline=$headerguests+$headerusers;
}


to this one :

if (strpos($_SERVER['PHP_SELF'], '/forums/index.php') == false) {
$datecut = TIMENOW - $vboptions['cookietimeout'];
$headerguests=$DB_site->query_first("SELECT COUNT(*) AS count FROM session WHERE userid=0 AND lastactivity>$datecut");
$headerusers=$DB_site->query_first("SELECT COUNT(DISTINCT(userid)) AS count FROM session WHERE session.userid>0 AND session.lastactivity>$datecut");
$headerguests=$headerguests[count];
$headerusers=$headerusers[count];
$totalonline=$headerguests+$headerusers;
}


/forums/ <---- the vB folder ;)

Our Sponsors
 

Polo
06-29-2004, 02:20 PM
So easy yet so blind... thanks it worked