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

Reply
 
Thread Tools
vBMicrostats Details »»
vBMicrostats
Version: 1.0.5, by TECK TECK is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Version: 3.5.4 Rating:
Released: 05-18-2006 Last Update: 05-21-2006 Installs: 92
Uses Plugins Template Edits
Code Changes  
No support by the author.

Finally, the vBMicroStats product for vBulletin 3.5.4 is here.
The previous versions of my mod were very solicited by vBulletin administrators...
I hope you will enjoy this new version as much you did the other ones.

Looking for VB 3.6.x version? It is here.

This mod with add at the bottom of each vBulletin (powered) page, the statistics listed below.
Also, it will help you troubleshoot and optimize your vBulletin board by viewing or comparing PHP/MySQL options and other statistics that are normally hidden in your forum pages.

Regular Users:
? Load time of specified page in microseconds
? Number of queries executed
? PHP percent page usage
? MySQL percent page usage

Administrators Only:
? Server memory usage per page (in Kb)
? DEBUG mode status
? Browser GZIP library compression status
? Server average loads
? Uncached templates (useful to troubleshoot the code)

The code modifications listed below were tested into a clean installed vBulletin board. They work 100%.
If you encounter any problems, feel free to post your questions here.

Step by step install instructions are posted into vbmicrostats.html file.
In order to perform an efficient modification of your files, I recommend you to use Dreamweaver (Coder Mode) or Textpad.
Both editors will allow you to complete all steps without any coding errors.

I tried to use the plugin system as much as I could, in order to avoid any unnecessary code modifications.
In order to set the right query execution time, you will need to perform 2 small code changes to each of the following files:
? class_core.php (folder /includes)
? init.php (folder /includes)

The code changes are very safe and designed not to interfere in any way with the vBulletin performance/functionality.
Make sure you modify, save and upload one file at the time to your server.
Then, simply run the product-plugin_vbmicrostats.xml file.

Once the product installed, don't forget to enable it.
Go to your vBulletin Options, click on BB MicroStats setting group and set all your options.

Show Your Support

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

Comments
  #32  
Old 05-19-2006, 05:17 AM
DementedMindz DementedMindz is offline
 
Join Date: Jan 2006
Posts: 1,474
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

here is what i mean if i remove the admin table the alt1 it groups both lines into one...
Reply With Quote
  #33  
Old 05-19-2006, 05:19 AM
TECK's Avatar
TECK TECK is offline
 
Join Date: Nov 2001
Location: Canada
Posts: 4,182
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Bob, post here the actual html code from the page source, not footer template. Start from the beginning of microstats code to the end of footer.
I will fix it, something is wrong with the row colspan, in my mod.
Reply With Quote
  #34  
Old 05-19-2006, 05:24 AM
EasyTarget EasyTarget is offline
 
Join Date: Nov 2004
Posts: 660
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

working good for me, though if I view the same exact page without any changes sometimes I'll get php close to 90% and every once in awhile I'll get the sql at like 70%.
Reply With Quote
  #35  
Old 05-19-2006, 05:30 AM
TECK's Avatar
TECK TECK is offline
 
Join Date: Nov 2001
Location: Canada
Posts: 4,182
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by DementedMindz
here is my screen shot so far of what i have going on... just tryin to figure out the admin table now
Patience, you are almost there ...
First segment of code is ok, but try this instead.
Find:
Code:
	$ms_output .= '		<span class="smallfont">Page generated in ' . $total_time . ' seconds (' . $php_percent . ' - ' . $sql_percent . ') with ' . $query_count . ' queries</span>' . "\n";
Replace it with:
Code:
	$ms_output .= 'Page generated in ' . $total_time . ' seconds (' . $php_percent . ' - ' . $sql_percent . ') with ' . $query_count . ' queries<br />';
Next, find:
Code:
		$ms_output .= '<tr align="' . $stylevar['right'] . '">' . "\n";
		$ms_output .= '	<td class="alt1"' . iif($show['quickchooser'] OR $show['languagechooser'], ' colspan="' . $colspan . '"') . '>' . "\n";
		$ms_output .= '		<span class="smallfont">' . $memory_status . $debug_status . $gzip_status . $server_status . $templates_status . '</span>' . "\n";
		$ms_output .= '	</td>' . "\n";
		$ms_output .= '</tr>' . "\n";
Replace it with:
Code:
$ms_output .= $memory_status . $debug_status . $gzip_status . $server_status . $templates_status;
Then, use this code in your footer template:
Code:
	$vbphrase[powered_by_vbulletin]<if condition="$show['microstats']"><br />
	{microstats}</if>
Reply With Quote
  #36  
Old 05-19-2006, 05:34 AM
Mr Chad's Avatar
Mr Chad Mr Chad is offline
 
Join Date: Jul 2005
Posts: 911
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by TECK
Patience, you are almost there ...
First segment of code is ok, but try this instead.
Find:
Code:
	$ms_output .= '		<span class="smallfont">Page generated in ' . $total_time . ' seconds (' . $php_percent . ' - ' . $sql_percent . ') with ' . $query_count . ' queries</span>' . "\n";
Replace it with:
Code:
	$ms_output .= 'Page generated in ' . $total_time . ' seconds (' . $php_percent . ' - ' . $sql_percent . ') with ' . $query_count . ' queries<br />';
Next, find:
Code:
		$ms_output .= '<tr align="' . $stylevar['right'] . '">' . "\n";
		$ms_output .= '	<td class="alt1"' . iif($show['quickchooser'] OR $show['languagechooser'], ' colspan="' . $colspan . '"') . '>' . "\n";
		$ms_output .= '		<span class="smallfont">' . $memory_status . $debug_status . $gzip_status . $server_status . $templates_status . '</span>' . "\n";
		$ms_output .= '	</td>' . "\n";
		$ms_output .= '</tr>' . "\n";
Replace it with:
Code:
$ms_output .= $memory_status . $debug_status . $gzip_status . $server_status . $templates_status;
Then, use this code in your footer template:
Code:
	$vbphrase[powered_by_vbulletin]<if condition="$show['microstats']"><br />
	{microstats}</if>
where are you putting this code?
Reply With Quote
  #37  
Old 05-19-2006, 05:35 AM
DementedMindz DementedMindz is offline
 
Join Date: Jan 2006
Posts: 1,474
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

lol i just got it before i refreshed the page lol thank you very much here is my code in my vBMicroStats Global Hook if anyone wants it like this hope you dont mind if so ill remove it.... just remember members only see the top code not the bottom one...

also i placed my <if condition="$show['microstats']">{microstats}</if> in the copyright part of the footer like this

Code:
<div align="center">
	<div class="smallfont" align="center">
	<!-- Do not remove this copyright notice -->
<br />
	$vbphrase[powered_by_vbulletin]	
	<br />
<!-- Do not remove this copyright notice -->
</div>
	
	<div class="smallfont" align="center">
	<!-- Do not remove $cronimage or your scheduled tasks will cease to function -->
	$cronimage
	<!-- Do not remove $cronimage or your scheduled tasks will cease to function -->
	
	$vboptions[copyrighttext]
<if condition="$show['microstats']">{microstats}</if>
	</div>
</div>
Reply With Quote
  #38  
Old 05-19-2006, 05:39 AM
TECK's Avatar
TECK TECK is offline
 
Join Date: Nov 2001
Location: Canada
Posts: 4,182
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by EasyTarget
working good for me, though if I view the same exact page without any changes sometimes I'll get php close to 90% and every once in awhile I'll get the sql at like 70%.
Something is wrong with a mod installed, probably.
MySQL is a very smart language. If you run a query for the first time, it will execute it and also store it in the memory, in case you will need to perform it again. That saves server resources.
If you don't use it for a certain period of time, the process is dumped automatically.

This is where you see the critical points in your PHP pages. If every time you load a new page that have wierd mods enabled, MicroStats will warn you with the actual results, creating rightaway a question mark in your mind about the quality of the code you installed.

The best way to see what are the "clean" results of your PHP/MySQL code is to install MicroStats into an unmodded vBulletin test board. Then you can compare the clean results with your board results...
Reply With Quote
  #39  
Old 05-19-2006, 05:41 AM
TECK's Avatar
TECK TECK is offline
 
Join Date: Nov 2001
Location: Canada
Posts: 4,182
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by DementedMindz
just remember members only see the top code not the bottom one...
Hmm 24 queries? That's a lot! vBulletin have only 9 queries on the main page.
Watch the server load, it's close to the sky. The bold numbers should not be higher then 1.00, yours are over 3.00.
Are you on a shared server? If you are, contact your host and let them know.
Someone is eating a lot of CPU there...
Reply With Quote
  #40  
Old 05-19-2006, 05:43 AM
DementedMindz DementedMindz is offline
 
Join Date: Jan 2006
Posts: 1,474
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

lol im doing a backup thats why... but the queries you are seeing is from my vbadvanced page...
Reply With Quote
  #41  
Old 05-19-2006, 05:44 AM
TECK's Avatar
TECK TECK is offline
 
Join Date: Nov 2001
Location: Canada
Posts: 4,182
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Mr Chad
where are you putting this code?
The $ms_output code you place it into your vBMicroStats Global Hook plugin.
The second, into your footer template, or any other template you like.
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 05:37 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.04804 seconds
  • Memory Usage 2,329KB
  • 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
  • (11)bbcode_code
  • (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
  • (1)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