Jump to content
xisto Community
Sign in to follow this  
cragllo

Script: Phpbb Mod, Total Users Registered Display the total users anywhere on your site.

Recommended Posts

This is for phpBB V2+
It displays the total number of registered users anywhere you want.

This file is called: phpbb-totalusers.php

<?php/*** Š2005 Craig lloyd. All rights reserved.** Mod Title:   Total Registered Users* Author:      Craig Lloyd* Description: Shows total number of registered users* Release:     v1.2, 10th May 2005**** Demo:                http://forums.xisto.com/no_longer_exists/ (stats box)* Installation Level:  Easy * Installation Time:   1 minute* Files To Edit:       This one * Included Files:      phpbb-totalusers.php**** Installation Notes:* Upload this file and set $config, * Include this into a page and your done!** ----------------------[ HOW TO INSTALL ]----------------------------* To display the total users, use the following code:** readfile("http://http://ww38.yoursite.com/phpbb-totalusers.php;;** with the php tags! NOTE: you NEED to include the full url to the* file including 'http://http://ww38.yoursite.com/&%2339; or it might not show!*///----------------------[ EDIT THIS INFO ]------------------------------$config = "forum/config.php";    // Path to the config.php file of your phpBB forum//----------------[ DO NOT EDIT BELOW HERE ]-----------------------include_once("$config"); $db = @mysql_connect("$dbhost", "$dbuser", "$dbpasswd") or die("cannot connect to host"); @mysql_select_db("$dbname",$db) or die("could not open database, connection to host ok"); $rows = mysql_num_rows(mysql_query("SELECT * FROM phpbb_users"));$total = $rows-1;echo "$total";// end?>
You only need to edit ONE thing, the $config variable,

change: forum/config.php
to: where your forums config.phph file is located

e.g. If your forum is installed in the folder: board
then you will change it to board/config.php

Hope this comes in useful to someone :P

Craig.
Edited by cragllo (see edit history)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.