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.
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.
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.