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
  #202  
Old 06-17-2006, 05:34 PM
Surviver's Avatar
Surviver Surviver is offline
 
Join Date: Feb 2006
Location: Bonn, Germany
Posts: 382
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you very much for this nic modification

works perfectly

mfg Surviver
Reply With Quote
  #203  
Old 06-18-2006, 12:54 AM
Mosh's Avatar
Mosh Mosh is offline
 
Join Date: Aug 2004
Location: Melbourne, Australia
Posts: 1,968
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by TECK
Quote:
Originally Posted by jdsinclair
Hey TECK,

I am testing v 1.0.5 of your mod and I have this problem (see attachment)

Any way of fixing it so the colomns go straight across the screen?
It should not do it, that's why I built a column counter inside.
I just reinstalled again a brand new test board (3.6) with vBMicroStats and it's spanning properly the columns.

BTW, the hack changes in vBulletin 3.6 version.
I will release a new version when 3.6 is final.
Quote:
Originally Posted by jdsinclair
OK, I have narrowed it down.

When viewing as a guest it spans fine.

However when logged in, it does what it does in the what shows in the attachment I posted previously, with or without admin stats (ie spans across the length of the style selector and that is it).

EDIT: When logged out there is no style selector available.
Just bumping this, as I still need help on this.
Reply With Quote
  #204  
Old 06-19-2006, 10:02 AM
Delphiprogrammi Delphiprogrammi is offline
 
Join Date: Feb 2004
Location: Landen(Belgium)
Posts: 1,335
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hmmmmz,

Quote:
Warning: ksort() expects parameter 1 to be array, null given in /photopost/pp-inc.php(630) : eval()'d code on line 355

Warning: Invalid argument supplied for foreach() in /photopost/pp-inc.php(630) : eval()'d code on line 357
and if you put

PHP Code:
@ksort($tempusagecache); 
the error should not be displayed but still it's there so it must be something else PHP reports lines 355 / 357 line 357 is a comment and should be ignored by PHP am i getting nuts here ??????

line 355 is code about the vb3 integration maybe that has something todo with it
Reply With Quote
  #205  
Old 06-19-2006, 10:37 AM
Delphiprogrammi Delphiprogrammi is offline
 
Join Date: Feb 2004
Location: Landen(Belgium)
Posts: 1,335
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Delphiprogrammi
hmmmmz,



and if you put

PHP Code:
@ksort($tempusagecache); 
the error should not be displayed but still it's there so it must be something else PHP reports lines 355 / 357 line 357 is a comment and should be ignored by PHP am i getting nuts here ??????

line 355 is code about the vb3 integration maybe that has something todo with it
problem solved those two PHP errors are gone and the stats are showing up !

if you want to know how i did that give me a yell
Reply With Quote
  #206  
Old 06-19-2006, 03:33 PM
TECK's Avatar
TECK TECK is offline
 
Join Date: Nov 2001
Location: Canada
Posts: 4,182
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Please post it, others will have it as reference.
Reply With Quote
  #207  
Old 06-19-2006, 03:38 PM
TECK's Avatar
TECK TECK is offline
 
Join Date: Nov 2001
Location: Canada
Posts: 4,182
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by jdsinclair
Just bumping this, as I still need help on this.
JD, look at the html code and tell me if you see a colspan in the microstats template.
It has to be there, it's working fine for all boards, so far.
Is this an original board, unhacked?

This is the code it needs to be examined:
Code:
	// regular users template
	$users_template  = '<tr align="' . $stylevar['right'] . '">' . "\n";
	$users_template .= '	<td class="tcat"' . iif($show['colspan'], ' colspan="' . $colspan . '"') . '>' . "\n";
	$users_template .= '		<span class="smallfont">Page generated in ' . $total_time . ' seconds (' . $php_percent . ' - ' . $sql_percent . ') with ' . $query_count . ' queries</span>' . "\n";
	$users_template .= '	</td>' . "\n";
	$users_template .= '</tr>' . "\n";

	// administrator template
	$admin_template  = '<tr align="' . $stylevar['right'] . '">' . "\n";
	$admin_template .= '	<td class="alt1"' . iif($show['colspan'], ' colspan="' . $colspan . '"') . '>' . "\n";
	$admin_template .= '		<span class="smallfont">' . $memory_status . $debug_status . $gzip_status . $server_status . $templates_status . '</span>' . "\n";
	$admin_template .= '	</td>' . "\n";
	$admin_template .= '</tr>' . "\n";
Let me know what you see in your page source.
Thanks.
Reply With Quote
  #208  
Old 06-19-2006, 04:36 PM
Delphiprogrammi Delphiprogrammi is offline
 
Join Date: Feb 2004
Location: Landen(Belgium)
Posts: 1,335
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hello,

To solve the problem with those two errors about ksort() and foreach() follow this steps
  • install vbmicrostats with the instructions provided
  • install thisPhotopost fix
  • edit pp-inc (instructions below)
  • edit forum/includes/xml/hooks_vbulletin.xml

in photopost file pp-inc.php find

PHP Code:
if ( !empty($vbfooter) && $headers != "no" 

replace with

PHP Code:
if ( !empty($vbfooter) && $headers != "no" 
{
require_once(
DIR '/includes/class_hook.php');
(
$hook vBulletinHook::fetch_hook('photopost_displaymicrostats')) ? eval($hook) : false;
print 
$vbfooter;

in forum/includes/xml/hooks_vbulletin.xml at the bottom

HTML Code:
<hooktype type="photopost">
<hook>photopost_displaymicrostats</hook>
 </hooktype>
make sure you change the hook location to the new one (step 2 in the list) upload all changed files in acsi mode

also make sure that your photopost admin => edit integration has been turned on
Reply With Quote
  #209  
Old 06-22-2006, 01:08 AM
Mosh's Avatar
Mosh Mosh is offline
 
Join Date: Aug 2004
Location: Melbourne, Australia
Posts: 1,968
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by TECK
JD, look at the html code and tell me if you see a colspan in the microstats template.
It has to be there, it's working fine for all boards, so far.
Is this an original board, unhacked?

This is the code it needs to be examined:
Code:
	// regular users template
	$users_template  = '<tr align="' . $stylevar['right'] . '">' . "\n";
	$users_template .= '	<td class="tcat"' . iif($show['colspan'], ' colspan="' . $colspan . '"') . '>' . "\n";
	$users_template .= '		<span class="smallfont">Page generated in ' . $total_time . ' seconds (' . $php_percent . ' - ' . $sql_percent . ') with ' . $query_count . ' queries</span>' . "\n";
	$users_template .= '	</td>' . "\n";
	$users_template .= '</tr>' . "\n";

	// administrator template
	$admin_template  = '<tr align="' . $stylevar['right'] . '">' . "\n";
	$admin_template .= '	<td class="alt1"' . iif($show['colspan'], ' colspan="' . $colspan . '"') . '>' . "\n";
	$admin_template .= '		<span class="smallfont">' . $memory_status . $debug_status . $gzip_status . $server_status . $templates_status . '</span>' . "\n";
	$admin_template .= '	</td>' . "\n";
	$admin_template .= '</tr>' . "\n";
Let me know what you see in your page source.
Thanks.
The code you posted above is exactly the same as in the vBMicroStats Global Hook.


OK, not logged in I see this:
Code:
<tr align="right">
	<td class="tcat">
		<span class="smallfont">Page generated in x.xxxx seconds (xx.xx% PHP - xx.xx% MySQL) with xx queries</span>
	</td>
</tr>
Logged in I see:
Code:
<tr align="right">
	<td class="tcat">
		<span class="smallfont">Page generated in X.XXXX seconds (XX.XX% PHP - XX.XX% MySQL) with XX queries</span>
	</td>
</tr>
<tr align="right">
	<td class="alt1">
		<span class="smallfont">DEBUG Mode OFF | GZIP ON (level 1) | <strong>X.XX</strong> : X.XX : X.XX | NO Uncached Templates</span>

	</td>
</tr>
But the code is aligned on the left side, like the pic I posted in my original post, it's width is the width of the style chooser.

Guests do not have access to choosing style, and only certain senior groups have access to choose a style, normal members can not choose style either.

That is what the situation is, hope you can help.
Reply With Quote
  #210  
Old 06-22-2006, 08:19 PM
TECK's Avatar
TECK TECK is offline
 
Join Date: Nov 2001
Location: Canada
Posts: 4,182
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by jdsinclair
Only certain senior groups have access to choose a style, normal members can not choose style either.
Is this normal behaviour or a hack? I'm still not used to VB3.5.x version.
If normal behaviour, in your board the colspan counter is set to 0, making the code tossed to the left.
Something is not right, since you are the only one experiencing this problem.
It's all related to the condition you display the dropdowns for style and language.
Reply With Quote
  #211  
Old 06-23-2006, 07:54 AM
Mosh's Avatar
Mosh Mosh is offline
 
Join Date: Aug 2004
Location: Melbourne, Australia
Posts: 1,968
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by TECK
Is this normal behaviour or a hack? I'm still not used to VB3.5.x version.
If normal behaviour, in your board the colspan counter is set to 0, making the code tossed to the left.
Something is not right, since you are the only one experiencing this problem.
It's all related to the condition you display the dropdowns for style and language.
It was a combination of a have of Andreas's and one of mine.

I just hard coded in the colspan and got rid of your checks which fixed the problem for me

Thanks for porting this great hack
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 06:55 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.05270 seconds
  • Memory Usage 2,343KB
  • 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
  • (4)bbcode_code
  • (1)bbcode_html
  • (4)bbcode_php
  • (9)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