View Full Version : Is there a simple non-vb stats hack?
thuffner
04-11-2003, 06:35 AM
I don't want to put tons of info of my board onto a non-vb page. I just want to have #members, # threads, and #posts.
I have searched for this, and have only came across hacks that show every single stat of your board on a non-vb page.
Any help is appreciated.
Thanks a lot. :)
Craigr
04-12-2003, 05:39 PM
Most of the hacks you can edit so that they display the information you want. Simply remove the additional information that you don't want to show.
Craig
Dean C
04-12-2003, 05:48 PM
If you look closely at the code in index.php there are these lines:
$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']);
As long as you have something like this it should work:
[php]
<?php
error_reporting(7);
require('./global.php');
$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']);
eval("dooutput(\"".gettemplate('yourtemplatename')."\");");
Dean C
04-12-2003, 05:49 PM
If you look closely at the code in index.php there are these lines:
$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']);
As long as you have something like this it should work:
<?php
error_reporting(7);
require('./global.php');
$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']);
eval("dooutput(\"".gettemplate('yourtemplatename')."\");");
?>
That would be the basis of it and you could include the variables which call the stats in the template ;)
Regards
- miSt
thuffner
04-12-2003, 08:01 PM
<Mr. Burns' impression>Eeeeeeexcellent.</Mr. Burns' impression>
Thanks a lot, it works great!
:)
Dean C
04-13-2003, 03:29 PM
I'm glad i could help you out :)
- miSt
Mijae
06-19-2004, 11:07 PM
Hrm, this wont work for me :(
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.