UBB.Dev
Posted By: dtalker Online-Timer? - 02/01/2003 2:42 PM
Where can I change the timeout for the online-timer? (10 minutes)

thanks
d-talk
Posted By: dimopoulos Re: Online-Timer? - 02/01/2003 6:46 PM
Do you mean the time that the Who's online screen updates?

There are two areas you can look:
ubbt.inc.php
Code
<br />   // -----------------------------------------------<br />   // Expire any outdated entries in the Online table<br />      $Outdated = $html -> get_date();<br />      $Outdated = $Outdated - 600;<br />      $query = "<br />       DELETE FROM {$config['tbprefix']}Online<br />       WHERE O_Last < $Outdated<br />      ";<br />

The 600 is the number of seconds

and also in the online.php
Code
<br />// -------------------------<br />// Delete the inactive users<br />   $html = new html;<br />   $Outdated = $html -> get_date() - 600;<br />   $query = "<br />      DELETE FROM {$config['tbprefix']}Online<br />      WHERE       O_Last < $Outdated<br />   ";<br />   $dbh -> do_query($query);<br />


The above will change the time that the user's navigation on your forum changes the contents of the w3t_Online table. If you wish the Who's Online screen to refresh every say 20 minutes then all you have to do is go to the online.php and find this line:
Code
<br />// ------------------<br />// Send a html header<br />   $html -> send_header($ubbt_lang['ONLINE_HEAD'],$Cat,"<meta http-equiv=\"Refresh\" content=\"60;url={$config['phpurl']}/online.php?Cat=$Cat\" />",$user);<br />

and change the Refresh" content="60; to the number of seconds you want that page to refresh (for 20 minutes this will be 1200)

Warm regards

Nikos
Posted By: JoshPet Re: Online-Timer? - 02/01/2003 9:40 PM
If you are using IIP you can change the number of seconds in onlinepal.php as well.
Posted By: dtalker Re: Online-Timer? - 02/02/2003 6:40 AM
Thank you guys!!!
d-talk
Posted By: Gregori Re: Online-Timer? - 01/16/2004 1:01 AM
Will this work for 6.4.1? 60 minutes would be great!

Will this have any affect on server load and such?
Posted By: JoshPet Re: Online-Timer? - 01/16/2004 1:32 AM
What adjusting the online time?

You don't need this in 6.4 and higher.

You can do it from the config file.
Posted By: Gregori Re: Online-Timer? - 01/16/2004 1:52 AM
Doh! Offcourse!

Thanks!
Posted By: Kel Re: Online-Timer? - 01/25/2004 7:14 AM
[]Gregori said:

Will this have any affect on server load and such? [/]

I'd like to know the answer to this question? I changed the 600 to 300. I'm having a terrible time with my AOL users and their unique IP's and I need those "old" connections to close as soon as possible. Will this help?
© UBB.Developers