Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Add-ons

Reply
 
Thread Tools
Microstats - load times, server loads, queries, uncached templates Details »»
Microstats - load times, server loads, queries, uncached templates
Version: 1.2.1, by ShiningArcanine ShiningArcanine is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Version: 3.5.4 Rating:
Released: 06-10-2005 Last Update: 06-08-2006 Installs: 680
Uses Plugins
 
No support by the author.

This is a derivative of Erwin's microstats hack for vBulletin 3.5.0's plugin system. The main difference is that by default it shows the page generation time and query count to the public. Server loads and Uncached Queries are shown only to administrators.

I had sent this to Erwin so he could release if he wanted to but instead he told me that I had permission to release it; hence why I am releasing it.

This should work with vBulletin 3.5.0 RC 1 through vBulletin 3.6.1 and later.

Installation is very simple. Just import the plugin via vBulletin's "Download / Upload Plugins" page in the Plugin System in the Admin Control Panel and you're done.

I'll try to correct any bugs that you find. Let me know if you like this plugin and don't forget to click the install link if you install this.

Optional config.php Variables


$config['Microstats']['replacementvariable']

Setting this variable will make microstats place its data before any instance of whatever you set this variable to. Be careful with this as you might see microstats in mutiple places. My suggestion is to use a unique comment in the HTML source to prevent any issues.

E.g. $config['Microstats']['replacementvariable'] = '<!-- display microstats here -->';

$config['Microstats']['adminonly']

Setting this variable to anything will make microstats display itself only to administrators.

E.g. $config['Microstats']['adminonly'] = true;

Update History


Product File: Uploaded a product file that replaced the plugin file.
Version 1.2.1: Fixed a bug that broke optional config.php settings
Version 1.2.0: Added OpenBSD, FreeBSD and NetBSD support; added Replacement variable setting in config.php; added Display only to Administrators Setting in config.php; fixed bug affecting Linux/Unix servers that have exec('uptime') support and not /proc/loadavg support
Version 1.1.0: Added names of uncached templates, included a bugfix for people who don't have proc avaliable on their system and made the code look a little nicer as well
Version 1.0.1: Bugfix for Windows users, sanitized the code to make it look nicer
Version 1.0.0: Initial Release

Show Your Support

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

Comments
  #142  
Old 10-15-2005, 08:36 AM
Rabbitoh Warren's Avatar
Rabbitoh Warren Rabbitoh Warren is offline
 
Join Date: Sep 2003
Posts: 79
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Oblivion Knight
Here you go, sir. One product, packaged and tested..

I upped the version number to 1.3.0, hope you don't mind.
Also, I changed the replacement variable stuff slightly as vBulletin doesn't seem to like html comments as a default value for a setting.
Is it just a matter of uploading the product file to complete installation? Because I just did that and no stats are appearing on my forum.
Reply With Quote
  #143  
Old 10-15-2005, 08:46 AM
Oblivion Knight's Avatar
Oblivion Knight Oblivion Knight is offline
 
Join Date: May 2002
Location: Sheffield, UK
Posts: 1,757
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Rabbitoh Warren
Is it just a matter of uploading the product file to complete installation? Because I just did that and no stats are appearing on my forum.
As mentioned in the setting, you should place the replacement variable in your footer template..

So if you're using the default setup, just put %microstats% after the copyright stuff.
Reply With Quote
  #144  
Old 10-15-2005, 11:28 PM
ForYou ForYou is offline
 
Join Date: Nov 2001
Posts: 273
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hello ,

when i install the hack ,

it's look like in main page ,

Page generated in 4.64159 seconds with 22 queries (1 queries for uncached templates) [Server Loads: 0.94 0.65 : 0.65]
Uncached templates: forumhome_latestthreadbit (10)

is this correct
Reply With Quote
  #145  
Old 10-15-2005, 11:57 PM
Moparx Moparx is offline
 
Join Date: Jul 2004
Posts: 120
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

its working fine. you need to fix the uncached template you have
Reply With Quote
  #146  
Old 10-17-2005, 01:26 PM
Rabbitoh Warren's Avatar
Rabbitoh Warren Rabbitoh Warren is offline
 
Join Date: Sep 2003
Posts: 79
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Oblivion Knight
So if you're using the default setup, just put %microstats% after the copyright stuff.
Yep, did that and it's working. I as admin can see the stats but my normal users only see the text %microstats%. Any idea how I can fix that?
Reply With Quote
  #147  
Old 10-17-2005, 02:07 PM
Oblivion Knight's Avatar
Oblivion Knight Oblivion Knight is offline
 
Join Date: May 2002
Location: Sheffield, UK
Posts: 1,757
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Rabbitoh Warren
Yep, did that and it's working. I as admin can see the stats but my normal users only see the text %microstats%. Any idea how I can fix that?
Interesting.. I'll have to look into that one tonight.


Edit: Fixed.

Sorry about the inconvenience, the attachment has been updated to 1.3.1 and you should just be able to overwrite it via the Product Manager..
Reply With Quote
  #148  
Old 10-17-2005, 02:40 PM
eoc_Jason's Avatar
eoc_Jason eoc_Jason is offline
 
Join Date: Dec 2001
Location: Houston, TX
Posts: 493
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Here's one that I made based on the 3.0.x MS hack. I liked how it used the drop-down box style for the cached / uncached templates. Just thought I would share incase someone wanted the older style too. I hard-coded it to use {ms} as the replacement variable, but you can set it to whatever you want quite easily.
Reply With Quote
  #149  
Old 10-17-2005, 02:47 PM
Oblivion Knight's Avatar
Oblivion Knight Oblivion Knight is offline
 
Join Date: May 2002
Location: Sheffield, UK
Posts: 1,757
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks Jason, I'll have a play around with this later - I prefer TECK's layout too.
Reply With Quote
  #150  
Old 10-21-2005, 11:03 PM
Joshua5692 Joshua5692 is offline
 
Join Date: Oct 2005
Posts: 27
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This was by far the easiest plug and play add on I have put in yet!

Thanks ShiningArcanine for all your efforts. I installed on 3.5.0 and it is flawless and exactly as described. I do have a question though.

We have a few select members with dual identities, and the fact that they are an administrator is hidden from the public. Their primary group is just a public group. Is there anyway at all that we can allow the administrators who are not in the Admin group as their primary? I am not asking you to modify your release, it is great. But if you could just point me into the right line of code?
Reply With Quote
  #151  
Old 10-21-2005, 11:39 PM
ShiningArcanine ShiningArcanine is offline
 
Join Date: May 2003
Posts: 105
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Joshua5692
This was by far the easiest plug and play add on I have put in yet!

Thanks ShiningArcanine for all your efforts. I installed on 3.5.0 and it is flawless and exactly as described. I do have a question though.

We have a few select members with dual identities, and the fact that they are an administrator is hidden from the public. Their primary group is just a public group. Is there anyway at all that we can allow the administrators who are not in the Admin group as their primary? I am not asking you to modify your release, it is great. But if you could just point me into the right line of code?
I actually did contemplate this when I wrote 1.2.x but I decided against doing it at the time because I didn't want to have so much complexity that the plugin would become bloated. You'll want to find the following line:

PHP Code:
if (($vbulletin->config['Microstats']['adminonly'] and $vbulletin->userinfo['usergroupid'] == 6) or !$vbulletin->config['Microstats']['adminonly']){ 
And change it to

PHP Code:
if (($vbulletin->config['Microstats']['adminonly'] and ($vbulletin->userinfo['usergroupid'] == or $vbulletin->userinfo['usergroupid'] == *)) or !$vbulletin->config['Microstats']['adminonly']){ 
Changing * to the usergroup id.
Reply With Quote
Reply

Thread Tools

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 08:36 AM.


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.08378 seconds
  • Memory Usage 2,317KB
  • Queries Executed 25 (?)
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
  • (2)bbcode_php
  • (5)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
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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