UBB.Dev
Posted By: CT More precise Who's online - 06/08/2001 1:05 PM
Hello,

I have been trying to modify the WHo's online hack to be more precise on keeping track of the users, but I had some trouble. This btw might also be helpfull for UBB6 who's online but I don't know how that version works.

This is my thought about this:

Who's online works with time outs. That means that a visitor is registered as being online when he already left the forum. This can be stopped by using a cgi/perl equivalent to the javascript 'onunload' tag.

Is this possible? The users are being tracked by writing a online.cgi in the members directory. In this online.cgi a line is written for each user:
Code
code:

Now what I tried to do is erasing that line with an 'onunload' event but this didn't work. Is there an onunload event in perl/cgi?

I would really appreciate it if someone could help me with this.

Cheers,

CT.
Posted By: p2k Re: More precise Who's online - 06/08/2001 2:53 PM
Wish I could help you, but is it that bothersome that it says someone is online when they may not be during the timeout period? Could you simply just change the timeout period to be 1 minute or 0, defaulting it to real time updates?

I did some mass mods on the Who's Online Hack and now have it running on my entire site via SSI calls. This way, no matter where you are on the site (even outside of UBB), it counts you and displays it on the page you're viewing.

pee2kay!
Posted By: CT Re: More precise Who's online - 06/08/2001 11:44 PM
My visitors tend to write big posts and sometimes take half an hour to type before posting. When using a time out of say 5 minutes then people who are actually on the forum won't be visible.

Using a time out of an hour leaves people who logged of long ago visible as online. Either way you use it, it simply is a very inaccurate reading.

The Perl/CGI equivalent of the javascript event 'on unload' will simply and effectively remove this problem.
Posted By: Lord Dexter Re: More precise Who's online - 06/09/2001 3:03 AM
I hate how hat happens. Someone should at least make it so they are timed out when they leave the forum not when they are inactive.
© UBB.Developers