Thanks for pointing that out SgSling. I had forgotten about his modifications (I have Xenon's hack installed too). He saves another query by counting the posts in the thread query, so to use that with this hack you would just replace this (in the hack itself, or index page if you've already modified it):
PHP Code:
$countthreads=$DB_site->query_first('SELECT COUNT(*) AS threads FROM thread');
// get total posts
$countposts=$DB_site->query_first('SELECT COUNT(*) AS posts FROM post');
$totalposts=number_format($countposts['posts']);
With:
PHP Code:
// get total posts
$counters=$DB_site->query_first('SELECT SUM(replycount) AS posts, SUM(threadcount) AS threads FROM forum WHERE parentid=-1');
$countposts[posts]=$counters['posts'];
$countthreads[threads]=$counters['threads'];
That should be the only conflict with the 2 hacks, and changing that saves yet another query when it updates the cache.