Josh, we tried IIP earlier, but wasnt too much of a success in our forum. Everyone was bookmarking and directly landing into the main forums
Anyway, I found the hack among the depths of my hard disk. Can someone please tell me if it will work with 6.2.3? Thanks in advance
<br />Ok, here goes... <br /> <br />In your ubbthreads.php script find this: <br /> <br /> <br />code:-------------------------------------------------------------------------------- <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 /> <br /> <br />-------------------------------------------------------------------------------- <br /> <br /> <br />and change it to this: <br /> <br /> <br />code:-------------------------------------------------------------------------------- <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 /> <br /> <br />-------------------------------------------------------------------------------- <br /> <br /> <br /> <br />Now in your ubbthreads.tmpl template file find this: <br /> <br /> <br />code:-------------------------------------------------------------------------------- <br />{$ubbt_lang['C_ONLINE']} $r {$ubbt_lang['C_ONLINE2']} $a {$ubbt_lang['C_ONLINE3']} <br /><br /> <br /> <br /> <br />-------------------------------------------------------------------------------- <br /> <br /> <br />and change it to this: <br /> <br /> <br />code:-------------------------------------------------------------------------------- <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 /> <br /> <br />-------------------------------------------------------------------------------- <br /> <br /> <br />And that should do it. <br /> <br />I have it working at my test site: <br />http://www.chattersonline.com/test/ubbthreads.php?Cat= <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.