Hey Poil,
I really like this hack, however, I think one thing needs to be added... a date/time field... looking at my site, it's wonderful to know that I had 21 people on at once... my big question is, 'when did it happen?' []
https://www.ubbdev.com/threads/php/images/icons/smile.gif[/]
Not a big thing to add in... I'll see if I can get to it today.
edit:
done! Here's the modified code:
[:blue]If you've already installed this hack, run this from the Admin Database Manager -> SQL Commands window:
[:green]ALTER TABLE w3t_Total ADD T_Time INT (9) UNSIGNED not null
[:blue]then modify the code in ubbt.inc.php/main.inc.php thusly:
[:green]
// boom get everyone logged in right now and post into
// w3t_Total
// Total
$query = "SELECT COUNT(*) FROM w3t_Online";
$sth = $dbh -> do_query($query);
list($Number) = $dbh -> fetch_array($sth);
// insert this number into the DB if it is larger than it ?
// so first query db
$query = "SELECT Total FROM w3t_Total";
$sth = $dbh -> do_query($query);
list($TNumber) = $dbh -> fetch_array($sth);
if ($Number > $TNumber) {
[:red]$date = $this -> get_date();
$query = "UPDATE w3t_Total
SET Total = '$Number'[:red],
T_Time = '$date'
WHERE Total = '$TNumber'
";
$dbh -> do_query($query);
}
$dbh -> finish_sth($sth);
$dbh -> finish_sth($query);
}
[:blue]And, make the following code changes in online.php:
[:green]
echo "<tr class="darktable"><td>$lang[ONLINE_BODY]";
$html -> close_table();
echo "<p>";
$query = "SELECT Total[:red],T_Time FROM w3t_Total";
$sth = $dbh -> do_query($query);
list($TNumber[:red],$TTime) = $dbh -> fetch_array($sth);
$html -> table_header("Most Users Online");
$html -> open_table();
[:red]$TTime = $html -> convert_time($TTime,$user['U_TimeOffset']);
echo "<tr class="darktable"><td>The Most Users online at one time is: $TNumber [:red]at $TTime";
$html -> close_table();
$dbh -> finish_sth($sth);
echo "<p>";
if you haven't already installed the hack, then modify poil's instructions with the code above...
That should do it!
Enjoy!