Helpful Information
 
 
Category: vBulletin 2.x Full Releases
View Registered Users # On NON VB Pages.

WORKS FOR ANY VBULLETIN VERSION

Okay. Well here it is... put this into a file, and save it as registered.php .. then make an #include to put it on any .shtml page on your site.


<?php

require("admin/cnfg.php");

$dbclassname="admin/db_$dbservertype.php";
require($dbclassname);

$DB_site=new DB_Sql_vb;

$DB_site->appname="VBulletin";
$DB_site->appshortname="VBulletin (forum)";
$DB_site->database=$dbname;
$DB_site->server=$servername;
$DB_site->user=$dbusername;
$DB_site->password=$dbpassword;

$DB_site->connect();


$numbersmembers=$DB_site->query_first("SELECT COUNT(userid) AS users FROM user");
$numbermembers=$numbersmembers[users];

echo "$numbermembers";

?>


Upload this .php file in your VBulletin directory, so if your VBulletin directory is, blah.com/forums, upload into forums, so it would be blah.com/forums/registered.php.

Where you put the include, is where it will show the number of registered users on your board.

Enjoy.

Here's the file .zip'ed if you don't want to make it into a .php file yourself.

Nice little hack. Do you happen to have a hack for the last active or most active forums that can be included outside vb? Thanks!

No, but I think tubedogg has a hack like that.. look at his signature, if you see a post of his.










privacy (GDPR)