I'm trying to get forum threads and posts to all count on the forum stats at the bottom of the page regardless of forum rules.
http://evercube.net/forum/
You will notice the header thread count is different than the footer thread count. The header stats are counting all the threads on the site while the footer is only counting forums that have permission to count posts.
This is what the header is calling:
PHP Code:
$numbersmembers = $db->query_first("SELECT COUNT(*) AS users,MAX(userid) AS max FROM " . TABLE_PREFIX . "user");
$numbermembers = number_format($numbersmembers['users']);
$counter = $db->query_first("SELECT COUNT(postid) AS posts, COUNT(threadid) AS threads FROM " . TABLE_PREFIX . "post");
$totalposts=number_format($counter['posts']);
$countthreads = $db->query_first("SELECT COUNT(*) AS threads FROM " . TABLE_PREFIX . "thread");
$totalthreads=number_format($countthreads['threads']);