vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Live Forum Statistics on All Pages in Header (https://vborg.vbsupport.ru/showthread.php?t=95493)

Neutral Singh 09-01-2005 10:00 PM

Live Forum Statistics on All Pages in Header
 
Plugin Keywords: Forum, Stats, Statistics, Members, New Members, Forum, Statistics, Member Info

Please Don't Forget to Click --> https://vborg.vbsupport.ru/

Requested by :
Myself :devious:

Context :
Searched through vb.org but could not find a similar plugin/hack for vB3.5/vB3.0.x. 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.sikhism.us

Any Screenshots : Demo is self-explanatory.

Warning : This plugin executes 5 queries per page.

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 --> INSTALLEDhttps://vborg.vbsupport.ru/

ThePimp 09-02-2005 08:18 AM

Doesn't support table prefixes ie.. vb3_

Neutral Singh 09-02-2005 08:37 AM

Quote:

Originally Posted by ThePimp
Doesn't support table prefixes ie.. vb3_

Now it does!! XML updated. Thanks for the Pointer. ;)

turksengel 09-02-2005 09:04 AM

any screen ?

Neutral Singh 09-02-2005 09:33 AM

Visit the Demo Link --> http://www.sikhphilosophy.net

thetoolman 09-12-2005 08:37 PM

does it work in footer as well?

Boofo 09-12-2005 08:43 PM

You might want to let people know that this will run 5 queries on every page. Why not use the datastore? ;)

thetoolman 09-12-2005 08:50 PM

yes it works in footer too :)

Neutral Singh 09-15-2005 01:14 PM

Quote:

Originally Posted by Boofo
You might want to let people know that this will run 5 queries on every page. Why not use the datastore? ;)

How can we use datastore? Thanks. :)

Brandon Sheley 09-16-2005 02:22 AM

i'd like this, i'll wait untill the queries are cut down :)

hyproVision 09-16-2005 07:24 PM

Wow your site looks very much like www.webhostingtalk.com !

Blindchild02 09-17-2005 05:22 PM

Quote:

Originally Posted by hyproVision
Wow your site looks very much like www.webhostingtalk.com !

i was just about to say that
http://www.webhostingtalk.com/

hyproVision 09-19-2005 02:39 PM

This comes up when i install it:

There seems to have been a problem with the Test Forums database.
Please try again by clicking the Refresh button in your web browser.

An E-Mail has been dispatched to our Technical Staff, who you can also contact if the problem persists.

We apologise for any inconvenience.


Code:

Database error in vBulletin 3.5.0 Release Candidate 2:

Invalid SQL:
SELECT COUNT(DISTINCT(userid)) AS count FROM testboardsession WHERE session.userid>0 AND session.lastactivity>1127143369;

MySQL Error  : Unknown table 'session' in where clause
Error Number : 1109


HaYLaZ 09-19-2005 07:38 PM

ı made some code modifications about this and ı change the table:D
ı think it was very beatiful and changable all colours
replace the codes below wiht your old codes and ı put this codes to myforumhome template under $navbar code.You can see the example in attachment

PHP Code:

<!-- Forum Stats in Header Template -->
<
table width="100%" border="0" cellspacing="0" cellpadding="0">
  <
tr>
    <
td>
      <
table align="center" border="1">
<
tr>
<
td bordercolor="red"><div class="smallfont">
<
span style="color: red;"><b>Discussions:</b$totalthreads </span></div>
 
<
td bordercolor="blue"><div class="smallfont">
<
span style="color: blue;"><b>Messages:</b$totalposts </span></div>

<
td bordercolor="black"><div class="smallfont">
<
span style="color: black;"><b>Members: </b>$numbermembers </span></div>
 
<
td bordercolor="green"><div class="smallfont">
<
span style="color: green;"><b>Online: </b>$totalonline </b> </span></div

<
td bordercolor="purple"><div class="smallfont">
<
span style="color: purple;"><b>Newmember :</b> <a href="$vboptions[bburl]/member.php?u=$newuserid"><b>$newusername</b></a> (welcome!)</span></div>

 </
tr>
</
table>
<!-- 
Forum Stats in Header Template --> 


you can change colours yourself

Neutral Singh 09-24-2005 09:00 AM

Quote:

Originally Posted by HaYLaZ
ı made some code modifications about this and ı change the table:D
ı think it was very beatiful and changable all colours
replace the codes below wiht your old codes and ı put this codes to myforumhome template under $navbar code.You can see the example in attachment

PHP Code:

<!-- Forum Stats in Header Template -->
<
table width="100%" border="0" cellspacing="0" cellpadding="0">
  <
tr>
    <
td>
      <
table align="center" border="1">
<
tr>
<
td bordercolor="red"><div class="smallfont">
<
span style="color: red;"><b>Discussions:</b$totalthreads </span></div>
 
<
td bordercolor="blue"><div class="smallfont">
<
span style="color: blue;"><b>Messages:</b$totalposts </span></div>

<
td bordercolor="black"><div class="smallfont">
<
span style="color: black;"><b>Members: </b>$numbermembers </span></div>
 
<
td bordercolor="green"><div class="smallfont">
<
span style="color: green;"><b>Online: </b>$totalonline </b> </span></div

<
td bordercolor="purple"><div class="smallfont">
<
span style="color: purple;"><b>Newmember :</b> <a href="$vboptions[bburl]/member.php?u=$newuserid"><b>$newusername</b></a> (welcome!)</span></div>

 </
tr>
</
table>
<!-- 
Forum Stats in Header Template --> 


you can change colours yourself

Yeah, hee hee, its duly called WHT Remix Style. ;)

Nice work HaYLaZ !! :)

Mr Chad 10-09-2005 07:14 AM

Quote:

Originally Posted by Neutral Singh
Yeah, hee hee, its duly called WHT Remix Style. ;)

Nice work HaYLaZ !! :)

didnt work w/ gold.

Mr Chad 10-09-2005 07:17 AM

Database error in vBulletin 3.5.0:

Invalid SQL:
SELECT COUNT(DISTINCT(userid)) AS count FROM x_session WHERE session.userid>0 AND session.lastactivity>11288029;

MySQL Error : Unknown table 'session' in where clause
Error Number : 1109
Date : Sunday, October 9th 2005 @ 04:17:09 AM
Script : http://www.thesite.com/
Referrer :
IP Address : x.x.x.x
Username : Chad
Classname : vb_database

Mr Chad 10-11-2005 03:33 AM

Quote:

Originally Posted by chatbum
Database error in vBulletin 3.5.0:

Invalid SQL:
SELECT COUNT(DISTINCT(userid)) AS count FROM x_session WHERE session.userid>0 AND session.lastactivity>11288029;

MySQL Error : Unknown table 'session' in where clause
Error Number : 1109
Date : Sunday, October 9th 2005 @ 04:17:09 AM
Script : http://www.thesite.com/
Referrer :
IP Address : x.x.x.x
Username : name
Classname : vb_database

why cant i get it to show how many users are online?

Mr Chad 10-13-2005 06:19 AM

? anyone

Mr Chad 10-24-2005 12:28 PM

Quote:

Originally Posted by chatbum
? anyone

how come you got it to work for online members...

Neutral Singh 10-28-2005 06:27 AM

Hey, sorry for a very very very late response. I have updated the xml plugin file now. Please let me know if it works fine now. That was due to missing TABLE_PREFIXes.

Mr Chad 10-28-2005 09:08 PM

Thank you that fixed my errors for total online, Your the best!

Neutral Singh 10-31-2005 02:51 AM

I am so glad that it worked for you. :)

Dark Riku 11-20-2005 06:31 PM

Just installed it, and im having issues :(

Code:

Database error in vBulletin 3.5.0:

Invalid SQL:
SELECT userid, username FROM vbuser WHERE vbuserid=881;

MySQL Error  : Unknown column 'vbuserid' in 'where clause'
Error Number : 1054
Date        : Sunday, November 20th 2005 @ 02:29:31 PM
Script      : http://www.123abc.com
Referrer    :
IP Address  : XxX.XxX.XxX.XxX
Username    : name123
Classname    : vb_database


SirJonathan 11-21-2005 04:24 AM

Know of any way to get these stats to appear on a non-VB page? A way to include them in a standard PHP page? :D - This looks like a great hack and I'd love to use it on my forum's homepage outside of my vB install!

-Jonathan

Dark Riku 11-21-2005 04:56 AM

I Really, dont know whats wrong, i installed it and follow the instructions, yet its not working ahh!!

Neutral Singh 11-21-2005 06:14 AM

Strange its working for 31 others including for me!! Are you using any table prefixes?

Quote:

Invalid SQL:
SELECT userid, username FROM vbuser WHERE vbuserid=881;

Dark Riku 11-21-2005 04:02 PM

Quote:

Originally Posted by Neutral Singh
Strange its working for 31 others including for me!! Are you using any table prefixes?

I honestly i dont know lol, all i did was install vb and try this o.O


['tableprefix'] = 'vb';

(Was in the config file, so yea i guess so)

Dark Riku 11-23-2005 04:05 AM

Im going to Bump this and see what happeneds

Neutral Singh 11-23-2005 08:13 AM

Quote:

I honestly i dont know lol, all i did was install vb and try this o.O


['tableprefix'] = 'vb';

(Was in the config file, so yea i guess so)

Ok just try this xml file. Hopefully, it should work for you. :)

Dark Riku 11-23-2005 04:45 PM

Quote:

Originally Posted by Neutral Singh
Ok just try this xml file. Hopefully, it should work for you. :)

Thanks so much :) Works like a charm

Neutral Singh 11-24-2005 05:03 AM

Thats gr8!! :)

proxyMX 12-10-2005 04:11 PM

Quote:

Originally Posted by Neutral Singh
Thats gr8!! :)

does this work for 3.5.2?

Lowfyr 12-17-2005 02:00 PM

Quote:

Originally Posted by proxyMX
does this work for 3.5.2?

yes, works fine for me - installed.

blueuniverse 12-21-2005 02:44 PM

Is it possible to show full details about those who are online with the plugin? By that I mean, exactly as it is on the forumhome with all online members listed.

blueuniverse 12-25-2005 08:56 PM

Any update on that?

The Chief 01-07-2006 02:06 AM

installed and works great ;)

[high]* The Chief clicks install[/high]

bashy 01-08-2006 06:51 PM

Hi peeps

Thanks for this, considered it installed and used your 1 HaYLaZ :)

Bashy

Quote:

Originally Posted by HaYLaZ
ı made some code modifications about this and ı change the table:D
ı think it was very beatiful and changable all colours
replace the codes below wiht your old codes and ı put this codes to myforumhome template under $navbar code.You can see the example in attachment

PHP Code:

<!-- Forum Stats in Header Template -->
<
table width="100%" border="0" cellspacing="0" cellpadding="0">
  <
tr>
    <
td>
      <
table align="center" border="1">
<
tr>
<
td bordercolor="red"><div class="smallfont">
<
span style="color: red;"><b>Discussions:</b$totalthreads </span></div>
 
<
td bordercolor="blue"><div class="smallfont">
<
span style="color: blue;"><b>Messages:</b$totalposts </span></div>

<
td bordercolor="black"><div class="smallfont">
<
span style="color: black;"><b>Members: </b>$numbermembers </span></div>
 
<
td bordercolor="green"><div class="smallfont">
<
span style="color: green;"><b>Online: </b>$totalonline </b> </span></div

<
td bordercolor="purple"><div class="smallfont">
<
span style="color: purple;"><b>Newmember :</b> <a href="$vboptions[bburl]/member.php?u=$newuserid"><b>$newusername</b></a> (welcome!)</span></div>

 </
tr>
</
table>
<!-- 
Forum Stats in Header Template --> 


you can change colours yourself


The Chief 01-09-2006 05:00 PM

Does anybody know how this could work with vB Drupal??

How we could get these functions to work with the vB Drupal header..??

version2 01-09-2006 05:04 PM

Quote:

Originally Posted by gamebgs
Does anybody know how this could work with vB Drupal??

How we could get these functions to work with the vB Drupal header..??

Any word on cutting down the queries?


All times are GMT. The time now is 04:49 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02944 seconds
  • Memory Usage 1,879KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code_printable
  • (3)bbcode_php_printable
  • (15)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete