IPB

Welcome Guest ( Log In | Register )



Tags
This content has not been tagged yet
 
Reply to this topicStart new topic

Script: Phpbb Mod, Total Users Registered

, Display the total users anywhere on your site.


cragllo
no avatar
Privileged Member
*********
Group: Members
Posts: 933
Joined: 24-August 04
Member No.: 892
myCENT:ZERO



Post #1 post May 11 2005, 04:51 PM
This is for phpBB V2+
It displays the total number of registered users anywhere you want.

This file is called: phpbb-totalusers.php
CODE
<?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://www.toxicsims.co.uk/ (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://www.YOURSITE.com/phpbb-totalusers.php");
*
* with the php tags! NOTE: you NEED to include the full url to the
* file including 'http://www.YOURSITE.com/' 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 tongue.gif

Craig.

This post has been edited by cragllo: May 11 2005, 05:27 PM
Go to the top of the page
+Quote Post
Florisjuh
no avatar
Proud to be hosted
*********
Group: Members
Posts: 992
Joined: 11-July 04
From: NL
Member No.: 75



Post #2 post May 12 2005, 03:26 PM
Very nice piece of code, thanks forcontributing with us smile.gif
Go to the top of the page
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

    Topic Title Replies Topic Starter Views Last Action
No New Posts   5 Shibbeh 16,074 20th August 2004 - 10:04 PM
Last post by: ill
No New Posts 4 zip_mc 13,280 22nd September 2009 - 10:26 AM
Last post by: akira550
No New Posts   5 zip_mc 7,598 10th August 2004 - 11:42 AM
Last post by: mmbg
No New Posts   9 shadowx 3,222 12th October 2009 - 07:12 PM
Last post by: manish-mohania
No New Posts   2 CodeName_88 3,431 17th August 2004 - 04:08 PM
Last post by: Greven il-Vec
No New Posts   4 xmae 9,133 24th August 2006 - 03:21 PM
Last post by: juice
No New Posts   7 football123213 15,572 20th August 2004 - 12:25 AM
Last post by: ill
No new   15 -prodigy- 14,130 27th February 2005 - 10:22 PM
Last post by: alexia
No New Posts   2 -Pandemonium- 12,053 22nd August 2004 - 04:25 AM
Last post by: -Pandemonium-
No New Posts   4 Too_Hot 6,830 15th June 2009 - 07:14 AM
Last post by: gannimel
No New Posts   8 -Pandemonium- 9,295 25th August 2004 - 04:00 PM
Last post by: -Pandemonium-
No New Posts   1 hatebreed 5,835 5th September 2004 - 02:05 PM
Last post by: redsky
No New Posts   0 Raptrex 7,103 6th September 2004 - 11:19 PM
Last post by: Raptrex
No New Posts   11 dozen 10,440 13th September 2004 - 07:26 PM
Last post by: melkonianarg
No new   14 CiaraRae 6,886 29th September 2004 - 06:12 AM
Last post by: ipunto21


 



RSS Open Discussion Time is now: 7th November 2009 - 02:01 AM

Web Hosting Powered by ComputingHost.com.