MyBB Community Forums

Full Version: Resetting Board Statistic Averages
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I own a MyBB forum that recently launched, but the installation of MyBB has been running for about 2 years. As such, the averages on our statistics don't reflect the true activity since launch:

Averages
Posts per day: 0.08
Threads per day: 0.02
Members per day: 0.01
Posts per member: 6.55
Replies per thread: 2.13

How can I reset the date the averages are based on to the actual date we launched?

What value does MyBB look at when determining the start date of a forum for calculating the statistical averages posted above? If I just knew where it stores that value, I could fix this quite easily.

For those that are curious, I did some digging and found the answer:

// Get number of days since board start (might need improvement)
$query = $db->simple_select("users", "regdate", "", array('order_by' => 'regdate', 'limit' => 1));
$result = $db->fetch_array($query);
$days = (TIME_NOW - $result['regdate']) / 86400;
if($days < 1)
{
	$days = 1;
}

The board start date is based on the longest registered user.