Quote:
Originally posted by FireFly
For this see this thread:
https://vborg.vbsupport.ru/showthrea...threadid=32153
As for Who's Online and PM stats on each page, doing this will add some decent queries to each page (since you're putting this in the header), so I don't know of any easy way of doing this.
This is what I have for the "xx online users" on this site.
I added this in global.php:
Code:
// get online users
$datecut=time()-$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");
$headeronline=$headerguests[count]+$headerusers[count];
right before this:
Code:
$header='';
$footer='';
Now I use $headeronline in my header template to show the number.
|
So is this the code you used on this page? at the top left? If not, let's start a release for that one