Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.6 > vBulletin 3.6 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Live Forum Statistics on All Pages in Forum Header Details »»
Live Forum Statistics on All Pages in Forum Header
Version: 1.00, by Neutral Singh Neutral Singh is offline
Developer Last Online: Feb 2016 Show Printable Version Email this Page

Category: Statistics Modifications - Version: 3.6.4 Rating:
Released: 10-11-2006 Last Update: Never Installs: 63
Uses Plugins Template Edits
 
No support by the author.

Live Forum Statistics on All Pages in Header Template
Plugin Keywords: Member info,Statistics, Members, New Members, Forum, Statistics, Member Info, Forum, 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 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.)
Code:
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 -->
$spacer_open
 
$_phpinclude_output
 
 
 
Add Above:
<!-- Forum Stats in Header Template -->
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
   <td>
    <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!)
</span></div>
    </td>
</tr>
</table>
<!-- Forum Stats in Header Template -->
Ofcourse you can customise this code to suit your website setup.

9. And, now finally you are done!


Enjoy!!

Please Don't Forget to Click Install

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #32  
Old 04-09-2008, 07:56 PM
testebr testebr is offline
 
Join Date: Jan 2004
Posts: 353
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Read this topic for you understand how to save that five querys of your plugin.
Reply With Quote
  #33  
Old 04-11-2008, 12:13 PM
testebr testebr is offline
 
Join Date: Jan 2004
Posts: 353
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Create new plugin:

Hook Location: init_startup

Plugin PHP Code: $datastore_fetch[] = "'userstats'";

And done, all variables enable in any template with ZERO new query.
Reply With Quote
  #34  
Old 04-12-2008, 05:56 PM
amirlol amirlol is offline
 
Join Date: Oct 2005
Location: FUNEX.IR
Posts: 26
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks
Reply With Quote
  #35  
Old 08-05-2008, 09:54 AM
w1z4rd w1z4rd is offline
 
Join Date: Feb 2005
Location: MooseTown
Posts: 46
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by codershark View Post
any screenshots available ? running also on 3.7 ?
Runs using 3.7x on my test board.

Quote:
Originally Posted by testebr View Post
Create new plugin:

Hook Location: init_startup

Plugin PHP Code: $datastore_fetch[] = "'userstats'";

And done, all variables enable in any template with ZERO new query.
Thanks for that :up:
Reply With Quote
  #36  
Old 12-07-2008, 01:29 PM
Scovic Scovic is offline
 
Join Date: Jan 2007
Posts: 63
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by testebr View Post
Create new plugin:

Hook Location: init_startup

Plugin PHP Code: $datastore_fetch[] = "'userstats'";

And done, all variables enable in any template with ZERO new query.
I cant get this to work.
How do I call "userstats"?

$totalthreads
$totalposts
$numbermembers etc

doesnt show anything.

Thanks
Reply With Quote
  #37  
Old 10-13-2009, 11:16 PM
Qleb's Avatar
Qleb Qleb is offline
 
Join Date: Sep 2008
Location: Lebanon
Posts: 121
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i love u man
Reply With Quote
  #38  
Old 10-13-2009, 11:27 PM
Qleb's Avatar
Qleb Qleb is offline
 
Join Date: Sep 2008
Location: Lebanon
Posts: 121
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

to show pictures total in any where, use this in to the same plugin

add this to

admincp --> edit plugins

add it above every thing

PHP Code:
$pictures    $db->query_first("SELECT COUNT(*) AS picture,MAX(pictureid) AS max FROM " TABLE_PREFIX "picture");
$allpictures number_format($pictures['picture']); 

in template any where :

Total pictures : $allpictures

Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:39 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05482 seconds
  • Memory Usage 2,291KB
  • Queries Executed 22 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_code
  • (1)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (8)post_thanks_box
  • (8)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (8)post_thanks_postbit_info
  • (7)postbit
  • (8)postbit_onlinestatus
  • (8)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete