Home : Products : Gossamer Forum : Development, Plugins and Globals :

Products: Gossamer Forum: Development, Plugins and Globals: Re: [MJB] How to - Display list of users online via SSI: Edit Log

Here is the list of edits for this post
Re: [MJB] How to - Display list of users online via SSI
I noticed that the online_guest global never displayed the same amount of guests as the Who's Online page. Also, when using it with SSI, the page that it is displayed on counts visitors when they access that page and are not on the forum.

To fix this replace the global:

Code:
sub {
return $DB->table('Guest')->count(GT::SQL::Condition->new('guest_last_time', '>', time - 900));
}

with:

Code:
sub {
return $DB->table('Online')->count(GT::SQL::Condition->new(guest_id_fk => '<' => (time - $CFG->{online_timeout} * 60)));
}

Last edited by:

MJB: Jul 21, 2006, 2:55 PM

Edit Log: