Well, since no one else seems to be supporting this hack now, I have an update that will knock 2 queries off of the stats.
Find these 3 queries and delete them:
PHP Code:
$nbeposts=$DB_site->query_first("SELECT SUM(replycount) AS reply FROM `thread` WHERE forumid=$forumid");
$nbepost=number_format($nbeposts['reply']);
$nbemesss=$DB_site->query_first("SELECT COUNT(*) AS nbe FROM thread WHERE forumid=$forumid");
$nbemess=$nbemesss['nbe'];
$numthreads = number_format($nbemess);
$vues=$DB_site->query_first("SELECT SUM(views) AS vu FROM thread WHERE forumid='$forumid'");
$vue=number_format($vues['vu']);
Use this single query instead:
PHP Code:
$nbeposts=$DB_site->query_first("SELECT COUNT(*) AS nbe, SUM(replycount) AS reply, SUM(views) AS vu FROM `thread` WHERE forumid=$forumid");
$nbepost=number_format($nbeposts['reply']);
$numthreads = number_format($nbeposts['nbe']);
$vue=number_format($nbeposts['vu']);
You will also need to find:
PHP Code:
$avgposteur=(($avgposteuri/$nbemess)*100);
and change it to:
PHP Code:
$avgposteur=(($avgposteuri/$nbeposts['nbe'])*100);
for the average poster stat to work with the new query.