DionDev
11-16-2008, 11:26 PM
i have a little hack i added to the global.php file:
// forum stats start
$numbersmembers=$db->query_first('SELECT COUNT(*) AS users,MAX(userid) AS max FROM user');
$numbermembers=number_format($numbersmembers['users']);
$countposts=$db->query_first('SELECT COUNT(*) AS posts FROM post');
$totalposts=number_format($countposts['posts']);
$countthreads=$db->query_first('SELECT COUNT(*) AS threads FROM thread');
$totalthreads=number_format($countthreads['threads']);
// forum stats end
now this works when i use the variables on a non-vb page
how do i use these variables in the header template?
--------------- Added 1226888073 at 1226888073 ---------------
i tried adding this as a plugin to global_start and it still didnt work. UGH
// forum stats start
$numbersmembers=$db->query_first('SELECT COUNT(*) AS users,MAX(userid) AS max FROM user');
$numbermembers=number_format($numbersmembers['users']);
$countposts=$db->query_first('SELECT COUNT(*) AS posts FROM post');
$totalposts=number_format($countposts['posts']);
$countthreads=$db->query_first('SELECT COUNT(*) AS threads FROM thread');
$totalthreads=number_format($countthreads['threads']);
// forum stats end
now this works when i use the variables on a non-vb page
how do i use these variables in the header template?
--------------- Added 1226888073 at 1226888073 ---------------
i tried adding this as a plugin to global_start and it still didnt work. UGH