Welcome Guest ( Log In | Register)



 
Reply to this topicStart new topic
> Script: Phpbb Mod, Total Users Registered, Display the total users anywhere on your site.
cragllo
post May 11 2005, 04:51 PM
Post #1


Privileged Member
*********

Group: Members
Posts: 933
Joined: 24-August 04
Member No.: 892



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
post May 12 2005, 03:26 PM
Post #2


Proud to be hosted
*********

Group: Members
Posts: 992
Joined: 11-July 04
From: NL
Member No.: 75



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

Topics Topics
  1. Many Php Script Sites(16)
  2. Script: Php Jukebox(4)
  3. Parse: Error Unexpected T_lnumber(4)
  4. Watermark Your Image With Simple Php Script(35)
  5. Wappychat_oldskool(15)
  6. Free Auction Script(6)
  7. Wappy Buddy V1.10 - Tibia Gold Edition By Wappy & Jon Roig(3)
  8. What Kind Of Script Do You Need ?(15)
  9. Creatting A Playlist Through Php(5)
  10. Very Simple Online Now Script(4)
  11. Html Code Tester. Online Script(15)
  12. Xbox Gamertag Profile On Site(2)
  13. Php Downloads Script(4)
  14. Script Help Required: Undefined Variable(3)
  15. Script Not Working(6)
  1. Library Script(6)
  2. How Would I Go About Making A Simple "counting" Script?(3)
  3. Forum Script(3)
  4. Php Rediret Script(12)
  5. How To Display Images Of A Directory(4)
  6. Download Script For Mp3 Files(0)
  7. How Do I Connect To Live Database With Php Script?(6)
  8. Need Help Installing Dolphin Community Script!(5)
  9. Guessing Php Script(2)
  10. How To Make A View New Post Script?(5)
  11. How To Print In Php(9)
  12. Php Guest Online Script(3)
  13. How To Make Php Newsletter Script(3)


 



- Lo-Fi Version Time is now: 11th October 2008 - 04:31 AM