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

Re: [pugdog] Most Users Ever

Quote Reply
Re: [pugdog] Most Users Ever In reply to
I made a small modification to the Online.pm, and the _same_ mod could be made to the GForum::Online.pm as well, if you want a bit more accuracy on the screen.

Code:


my $guests = [];
my $found_IPs;
while (my $rec = $sth->fetchrow_hashref) {
push @$guests, $rec if not exists $found_IPs->{$rec->{online_ip}};
$found_IPs->{$rec->{online_ip}} = "found";
}


basicly, if you've already found the IP (it's in newest-first order via the select), don't add that "guest" again. It's fair to assume that the same IP within 15 minutes (the default value) is going to be the same user refreshing the main page). Might only be the way I have my redirects configured, but I get multiple entries for each IP at times. This blocks this "bug" in how the client/server dance works.

BTW: if you want to increase performance on a moderately active forum system, you can move the <%Plugins::Online::whos_online%> function call to any other page that is accessed less frequently, but regularly than your main page. The search page would be a good alternative, as would the who's on line page, but realize, that the most-ever stats will only get updated if/when someone uses those features, not every time a person visits, so you might miss your "true" peak.


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Subject Author Views Date
Thread Most Users Ever carfac 6025 Nov 8, 2003, 12:58 PM
Thread Re: [carfac] Most Users Ever
hoefti 5817 Nov 12, 2003, 11:44 PM
Thread Re: [hoefti] Most Users Ever
carfac 5820 Nov 13, 2003, 7:49 AM
Thread Re: [carfac] Most Users Ever
Jagerman 5783 Nov 17, 2003, 4:49 PM
Thread Re: [Jagerman] Most Users Ever
pugdog 5719 Dec 2, 2003, 2:18 PM
Thread Re: [pugdog] Most Users Ever
pugdog 5695 Dec 3, 2003, 12:48 AM
Thread Re: [pugdog] Most Users Ever
pugdog 5682 Dec 4, 2003, 7:56 AM
Thread Re: [pugdog] Most Users Ever
carfac 5638 Dec 8, 2003, 8:05 PM
Post Re: [carfac] Most Users Ever
pugdog 5651 Dec 9, 2003, 4:24 AM