actually this doesn't display the stats correctly. if you have deleted posts or threads in your forum, but not physically deleted them, it will still show up in these stats, but it doesn't show up in the forum stats. here is the code i use to grab the stats from the forums itself.
PHP Code:
$specialtemplates = array(
'userstats',
);
chdir("./forums/");
require_once("./global.php");
require_once("./includes/functions_forumlist.php");
chdir("../");
// Forum Stats
cache_ordered_forums(1);
$totalthreads = 0;
$totalposts = 0;
if (is_array($forumcache))
{
foreach ($forumcache AS $forum)
{
$totalthreads += $forum['threadcount'];
$totalposts += $forum['replycount'];
}
}
$totalthreads = vb_number_format($totalthreads);
$totalposts = vb_number_format($totalposts);
$userstats = unserialize($datastore['userstats']);
$totalmembers = vb_number_format($userstats['numbermembers']);