Quote:
Originally Posted by apdcanari
Hello,
How to post the total number members and posts on a page of its site?
For example : The forum had 55.000 posts and 2.000 members
My code with Vbulletin 3.0.7
Count member
Count Posts
Thank you very much,
Good evening
C?dric
PS : I'm french and i don't speak English very well... :ermm:
|
I fixed your script for you ->
http://www.opticalgaming.com/forums/test2.php
Code changes:
PHP Code:
<?php
$countposts=$vbulletin->db->query_first('SELECT COUNT(*) AS posts FROM prefix_post');
$totalposts=number_format($countposts['posts']);
$numbersmembers=$vbulletin->db->query_first('SELECT COUNT(*) AS users,MAX(userid) AS max FROM prefix_user');
$numbermembers=number_format($numbersmembers['users']);
echo "Total Posts: $totalposts";
echo "<br>";
echo "Total Members: $numbermembers";
?>
I made a small change - didn't see the need for 2 scripts where 1 could be used.
Hope this helps
Matt