View Full Version : Forum Home Stats on vB Page
paulyy
11-23-2004, 05:13 PM
I'm using the vB Page template found here at vBulletin.org to create a 'home page'. But I would like to show the forum stats that are found on the FORUMHOME template on this page. I copied and pasted the code, but as you probably know that doesn't suffice.
Is there a special bit of code required to get these stats to work?
paulyy
11-24-2004, 07:59 AM
no one?
I found codes like
$numbersmembers=$DB_site->query_first('SELECT COUNT(*) AS users,MAX(userid) AS max FROM user');
$numbermembers=number_format($numbersmembers['users']);
// get total posts
$countposts=$DB_site->query_first('SELECT COUNT(*) AS posts FROM post');
$totalposts=number_format($countposts['posts']);
$countthreads=$DB_site->query_first('SELECT COUNT(*) AS threads FROM thread');
$totalthreads=number_format($countthreads['threads']);
// get newest member
$getnewestusers=$DB_site->query_first("SELECT userid,username FROM user WHERE userid=$numbersmembers[max]");
$newusername=$getnewestusers['username'];
$newuserid=$getnewestusers['userid'];
But that doesn't do all the stats :( I was sure there was a hack here at vBulletin.org but I couldn't find it ...
paulyy
11-24-2004, 11:17 PM
Ok, I'm getting there but it currently displays this;
Currently Active Users: 2
( members and guests)
Most users ever online was , at .
Threads: 1, Posts: 1, Members: 1
As you can see the members and guests within the brackets, along with the most ever users online with date aren't displayed. Anyone know how I would go about doing this? (Hopefully to put code in the phpinclude_start ..)
paulyy
11-25-2004, 07:21 PM
:D Done this myself, after realising I had to change the phrase 1="" etc. ;)
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.