You also need part of the code you posted above. I guess the whole thing would look something like this:
Code:
// ### BOARD STATISTICS #################################################
// get total threads & posts from the forumcache
$totalthreads = 0;
$totalposts = 0;
if (is_array($vbulletin->forumcache))
{
foreach ($vbulletin->forumcache AS $forum)
{
$totalthreads += $forum['threadcount'];
$totalposts += $forum['replycount'];
}
}
$totalthreads = vb_number_format($totalthreads);
$totalposts = vb_number_format($totalposts);
// get total members and newest member from template
$numbermembers = vb_number_format($vbulletin->userstats['numbermembers']);
$newuserinfo = array(
'userid' => $vbulletin->userstats['newuserid'],
'username' => $vbulletin->userstats['newusername']
);
$activemembers = vb_number_format($vbulletin->userstats['activemembers']);
$show['activemembers'] = ($vbulletin->options['activememberdays'] > 0 AND ($vbulletin->options['activememberoptions'] & 2)) ? true : false;
$templatevalues = array('activemembers' => $activemembers,
'activeusers' => $activeusers,
'newuserinfo' => $newuserinfo,
'numberguest' => $numberguest,
'numbermembers' => $numbermembers,
'numberregistered' => $numberregistered,
'totalonline' => $totalonline,
'totalposts' => $totalposts,
'totalthreads' => $totalthreads);
vB_Template::preRegister('footer', $templatevalues);
but I think that's preRegistering a couple things you're not actually calculating in your code. I don't know if those are coming from somewhere else or if they should be removed.