Gossamer Forum
Home : Products : Gossamer Forum : Discussion :

Re: [Jagerman] Who's Online Global

Quote Reply
Re: [Jagerman] Who's Online Global In reply to
My final global now looks like:

Code:
sub {

my @found;
my $table = $DB->table('Online','User');
$table->select_options ('ORDER BY user_username ASC');
my $sth = $table->select( { 'Online.online_invisible' => 0, 'Online.guest_id_fk' => 0 }, ['User.user_username']);

while (my $userid = $sth->fetchrow_hashref) {
push @found, "<font size=1><A Href=\"/cgi-bin/forums/gforum.cgi?username=$userid->{user_username}\">$userid->{user_username}</A></font>";
}
return (@found ? \join(', ', @found) : 'None');
}


I'm having a slight problem with the Online table not updating itself properly until someone accesses the Who's Online page. So, if someone logs off and nobody accesses the Who's Online for a while, it still lists them as online. I tried adding the following line to the beginning of the global in order to run the whos_online sub routine:

Code:

&GForum::Online::whos_online;

It seems to work some of the time, but other times I get an error that brings the site down. Any help would be greatly appreciated.

Sean
Subject Author Views Date
Thread Who's Online Global SeanP 4115 Dec 2, 2004, 10:56 AM
Thread Re: [SeanP] Who's Online Global
Jagerman 4050 Dec 2, 2004, 11:57 AM
Thread Re: [Jagerman] Who's Online Global
SeanP 4047 Dec 2, 2004, 12:40 PM
Thread Re: [SeanP] Who's Online Global
Jagerman 4062 Dec 2, 2004, 1:11 PM
Post Re: [Jagerman] Who's Online Global
SeanP 4020 Dec 2, 2004, 1:24 PM
Thread Re: [Jagerman] Who's Online Global
SeanP 4023 Dec 14, 2004, 2:33 PM
Thread Re: [SeanP] Who's Online Global
Jagerman 4046 Dec 14, 2004, 3:53 PM
Post Re: [Jagerman] Who's Online Global
SeanP 4023 Dec 15, 2004, 10:52 AM