PDA

View Full Version : View Registered Users # On NON VB Pages.


badmeetsevil-
30 Jun 2001, 18:20
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.

badmeetsevil-
01 Jul 2001, 02:54
Here's the file .zip'ed if you don't want to make it into a .php file yourself.

boiboi
05 Jul 2001, 06:18
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!

badmeetsevil-
20 Jul 2001, 23:18
No, but I think tubedogg has a hack like that.. look at his signature, if you see a post of his.