Ok, here goes... <br /> <br />In your ubbthreads.php script find this: <br /> <br /><pre><font class="small">code:</font><hr> <br />// ----------------------- <br />// Grab the total # online <br /> $query = " <br /> SELECT O_Type,COUNT(*) <br /> FROM w3t_Online <br /> GROUP BY O_Type <br /> "; <br /> $sth = $dbh -> do_query($query); <br /> while(list ($type,$count) = $dbh -> fetch_array($sth)) { <br /> ${$type} = $count; <br /> } <br /> <br /> if (!$a) { $a = "0"; } <br /> if (!$r) { $r = "0"; } <br /></pre><hr> <br /> <br />and change it to this: <br /> <br /><pre><font class="small">code:</font><hr> <br />// ----------------------- <br />// Grab the total # online <br /> <br /> $LastOn = $html -> get_date() - 600;// back 10 minutes <br /> <br /> $query = " <br /> SELECT O_Type,COUNT(*) <br /> FROM w3t_Online <br /> WHERE O_Last > '$LastOn' <br /> GROUP BY O_Type <br /> "; <br /> $sth = $dbh -> do_query($query); <br /> while(list ($type,$count) = $dbh -> fetch_array($sth)) { <br /> ${$type} = $count; <br /> } <br /> <br /> $onNow = $a + $r;// part of "Maximum Users Online" hack <br /> <br /> if (!$a) { $a = "0"; } <br /> if (!$r) { $r = "0"; } <br /> <br /> <br />// -------------------------------- <br />// Get and Set Maximum Users Online <br /> $query = " <br /> SELECT U_PostsPer,U_Registered <br /> FROM w3t_Users <br /> WHERE U_Number = '1' <br /> "; <br /> $sth = $dbh -> do_query($query); <br /> list ($maxOn,$When) = $dbh -> fetch_array($sth); <br /> if ($onNow > $maxOn) { <br /> $date = $html -> get_date(); <br /> $date_q = addslashes($date); <br /> $onNow_q = addslashes($onNow); <br /> $query = " <br /> UPDATE w3t_Users <br /> SET U_Registered = '$date_q', U_PostsPer = '$onNow_q' <br /> WHERE U_Number = '1' <br /> "; <br /> $dbh -> do_query($query); <br /> $maxOn = $onNow; <br /> $When = $date; <br /> } <br /> $When = $html -> convert_time($When,$user['U_TimeOffset']); <br /></pre><hr> <br /> <br /> <br />Now in your ubbthreads.tmpl template file find this: <br /> <br /><pre><font class="small">code:</font><hr> <br />{$ubbt_lang['C_ONLINE']} $r {$ubbt_lang['C_ONLINE2']} $a {$ubbt_lang['C_ONLINE3']} <br /><br /> <br /></pre><hr> <br /> <br />and change it to this: <br /> <br /><pre><font class="small">code:</font><hr> <br />{$ubbt_lang['C_ONLINE']} $r {$ubbt_lang['C_ONLINE2']} $a {$ubbt_lang['C_ONLINE3']} <br /><br /> <br />Maximum Users Online was <strong>$maxOn</strong> on $When <br /><br /> <br /></pre><hr> <br /> <br />And that should do it. <img src="/forum/images/icons/smile.gif" alt="" /> <br /> <br />I have it working at my test site: <br />
http://www.chattersonline.com/test/ubbthreads.php?Cat= <br /> <br /> <br />
Edit Note: I have added some code so this hack will only count those that have been online in the last 10 minutes. This is the same amount of time the "Who's Online" page uses so the information matches. I think that this will also make .threads extra information match my "Who's Online" box. <img src="/forum/images/icons/smile.gif" alt="" />