View Full Version : Statistics Modifications - Live Forum Statistics on All Pages in Forum Header

Neutral Singh
23 Dec 2007, 03:01
Live Forum Statistics on All Pages in Header Template
Plugin Keywords: Statistics, Members, New Members, Forum, Statistics, Member Info, Forum, Stats, Member Stats

Please Don't Forget to Click Install

Requested by :
Myself :devious:

Context :
Searched through vb.org but could not find a similar plugin/hack. I wanted to show all vital forum stats like total posts, total threads, total members and newest member on each page of my forum (http://www.sikhphilosophy.net/) as well as vBa CMPS, in header template and this plugin performs exactly the same function.

What this plugin does ?
This plugin uses the 'global_start' hook and stores the desired information from your forum database into php variables and when called in 'header 'template, produces the desired results.

Utility :
Imagine... an unregistered/guest visits your website for the first time via a search engine link (95% of times its not the homepage that is found via a search engines link) and the first thing s/he notices is the forum header information and says wow!! this forum has got xxxx members, xxxxx threads, xxxxxx posts, why not get registered with this community and see what this forum has got in store for me. LOL!! quite true actually. ;)

Demo : http://www.sikhphilosophy.net
Any Screenshots : Demo is self-explanatory.

Warning : This plugin executes 5 queries per pageload.

Installation Instructions : (Also attached alongwith the plugin.)

Step by Step Instructions:
1. Ofcourse, download the Plugin.
2. Go to 'Plugin System' module in vb admin panel and click 'Download/Upload Plugins'.
3. Towards the botton of next screen, you will see a box table - 'Import Plugin Definitions XML File'. Click the 'Browse' button and select the Plugin Definitions XML File downloaded and saved somewhere on your computer. Click the 'Import' button and well... you are not quite yet done. LOL!!
4. Ok, Now go to Styles & Tempalte --> 'Styles Manager' and select the 'Common Templates' option from drop down menu and click the 'Go' button.
5. In the header template:

Find: (ususally at the end of the template file)
<!-- content table -->


Add Above:
<!-- Forum Stats in Header Template -->
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<div align="left"><span class="smallfont">| <b>Discussions:</b> $totalthreads | <b>Messages:</b> $totalposts | <b>Members: </b>$numbermembers | <b>Online: </b>$totalonline </b> | <b>Newest :</b> <a href="$vboptions[bburl]/member.php?u=$newuserid"><b>$newusername</b></a> (Welcome!)
<!-- Forum Stats in Header Template -->
Ofcourse you can customise this code to suit your website setup. ;)

9. And, now finally you are done! :)


Please Don't Forget to Click Install

ChU v2
23 Dec 2007, 03:11
Amazing! Asked him to update for 3.7 and did so within a few hours! Thanks again, works perfectly.

Neutral Singh
23 Dec 2007, 03:24
Thanks!! Please click install button for future support. ;)

23 Dec 2007, 07:23
Very nice, Ill definitely use this sometime.

06 Jan 2008, 22:15
Good work. thanks a lot :)

07 Jan 2008, 16:00
Guess what... the demo ain't working.

12 Jan 2008, 13:53
This is great thanks so much. I have a question though,. It shows up on my board with a dark blue background, I want it to be transparent to my board. How would I do that? Here is a screenshot of what I mean.


30 Mar 2008, 23:21
My customize :rolleyes:

Add template Header :

<!-- Forum Stats in Header Template -->
<div class="statsheader">

<span class="smallfont" style="float:$stylevar[left]"><b><a href="index.php">My forum</a></b></span>

<span class="smallfont" style="float:$stylevar[right]"><b>Discussions:</b> $totalthreads | <b>Messages:</b> $totalposts | <b>Members: </b>$numbermembers | <b>Online: </b>$totalonline </b> | <b>Newest :</b> <a href="$vboptions[bburl]/member.php?u=$newuserid"><b>$newusername</b></a> (Welcome!)</span>

<br />
<!-- Forum Stats in Header Template -->

Add Css :

.statsheader {
border-bottom:3px solid #5379B8;

Scroll your page, and bar is fixed.

Cédric ;)

Neutral Singh
22 Apr 2008, 17:29
haven't tested on 3.7.x series. Is this hack working fine?

22 Apr 2008, 21:22
Nick hack paaji.

25 May 2008, 12:38
I can't get this to work in 3.7 gold.

26 May 2008, 16:51
I would like to make this work so that the output actually shows on or over the logo image.

Much like in your preview link except I have an image as the logo instead of text.

Nice mod :)

26 May 2008, 16:58
interesting, but 5 queries are too much for me ... :)

28 May 2008, 16:39
Is it possible this could cause peoples virus scanners to go nuts? Since I added it there have been several complaints.

28 Jun 2008, 17:09
this doesnt work in 3.7.2?

02 Jul 2008, 15:34

03 Jul 2008, 18:15
Is it possible to add like the total amount of threads from a specific forum?

Neutral Singh
25 Sep 2008, 13:48
This should work on 3.7.3

03 Oct 2008, 19:40
5 queries per pageload!!! mmm


09 Oct 2008, 21:01
Is it possible to add like the total amount of guest and registered users and total record users witch date please ?

The full online information

12 Oct 2008, 15:49
no ideas please ?

Neutral Singh
12 Oct 2008, 18:08
sorry beyond the scope of this plugin. :)

14 Oct 2008, 06:29
Thank Nice

LG Alex
16 Dec 2008, 01:01
Screenshots of how you or someone else used it would be lovely

23 Dec 2008, 00:29
Thank you..

21 Jul 2009, 05:26
Cool , install it. How can i center the Bar? and also how can i write the name of the forum on the left side of the bar?

18 Aug 2009, 20:50
I have a question, why does it show up in Firefox but not IE? Is it something I'm doing? I haven't modified it at all except for placing it in the top right of my forum.

Edit: Nevermind, I figured out that it was the table around the code, I just stripped it away and it's working fine. :D