kh99 was spot on as usual.
To put this all together go to your Admin CP -> plugin manager -> add new plugin
product: vBulletin
hook: global_start
title: Stats on Navbar
Execution Order: 5
php code:
PHP Code:
$specialtemplates = array('userstats');
require_once('global.php');
cache_ordered_forums(1, 1);
$boptotalthreads = 0;
$boptotalposts = 0;
if (is_array($vbulletin->forumcache))
{
foreach ($vbulletin->forumcache AS $bopforum)
{
$boptotalthreads += $bopforum['threadcount'];
$boptotalposts += $bopforum['replycount'];
}
}
$bopthreads = vb_number_format($boptotalthreads);
$bopposts = vb_number_format($boptotalposts);
$bpmembers = $vbulletin->db->query_first("SELECT COUNT(*) AS users
FROM " . TABLE_PREFIX . "user");
$bopmembers = $bpmembers['users'];
Set Active to YES and hit save.
Then in your navbar you can use $bopposts, $bopthreads, and $bopmembers which will hold the number os posts, threads, and members respectfully.
Note however this adds extra queries to your pages but there's no other way to get this info if you want it on every page.