here ya go straigt from the index.php file :P
PHP Code:
// get total posts
$countposts=$DB_site->query_first('SELECT COUNT(*) AS posts FROM post');
$totalposts=number_format($countposts['posts']);
just put that right after you require global.php
also if you want to grab the threads count add this right under that
PHP Code:
$countthreads=$DB_site->query_first('SELECT COUNT(*) AS threads FROM thread');
$totalthreads=number_format($countthreads['threads']);
to show the total posts in your template, just use this in your template:
$totalposts
and for your threads if you wish to disply the total, its simiply:
$totalthreads
glad to help ya out :]