Subject:*
<
Name/Email:*
<
Message Icon:*
<
Select*
<
Message:*
<



Click the Preview to see the content in action.
Options:*
<
Confirmation Code*
<
1 + 2 = ?  
Input the result from the expression
Maximum attempts you can try: 10
*
<
     

Re: who's online - time?
by trabis on 2008/9/12 13:30:46

Quote:

ghia_ wrote:
I believe it takes the session duration from system preferences into account.


The online's data does not have a relation with the session's data.

The accuracy of this is handled in system/blocks/system_blocks.php

Look inside for this lines:
le="color: #000000"><?php mt_srand((double)microtime()*1000000); // set gc probabillity to 10% for now.. if (mt_rand(1, 100) < 11) { $online_handler->gc(300); }


This piece of code belongs to the online block and is responsible to delete online entries.
Being more specific:
One in each 10 times(10%) the online's block is renderered it will delete entries older than 5 minutes(300 seconds).

After this code the block just inserts fresh online data for the user that is seeing the page. It is necessary to have the block visible in all pages and for all users for the data to be correct.

Now, if you have very few visitors, you may want to increase the 10% to 50% or even 100% so the block can delete old entries often. Ex:
le="color: #000000"><?php if (mt_rand(1, 100) < 51) {


Then you can set the period of time the data is related:
le="color: #000000"><?php $online_handler->gc(120);


120 will give a 2 minutes(120 seconds) margin, if a user doesn´t refresh a page in 2 minutes it will not appear as online.(this does not affect the session, he could still be logged in)
Re: who's online - time?
by ghia on 2008/9/12 9:36:10

I believe it takes the session duration from system preferences into account.

For some in realtime displaying block of online users, you may be interested in this. It's live to see on XOOPS Italia under 'Chi è on-line? (Versione Ajax)'.

But beware of the extra traffic and MySQL load!!!
who's online - time?
by SUR6E on 2008/9/12 8:29:04

How accurate is the Who's Online data? Is it showing who was online the last 5 minutes? Can it be adjusted?

Who's Online

506 user(s) are online (468 user(s) are browsing Support Forums)


Members: 0


Guests: 506


more...

Donat-O-Meter

Stats
Goal: $15.00
Due Date: Jul 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $15.00
Make donations with PayPal!

Latest GitHub Commits