vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   vbMicroStats: page load time, queries, GZIP and PHP version (https://vborg.vbsupport.ru/showthread.php?t=35811)

Renegade 03-09-2002 02:11 AM

Cool hack, I might check it out!

lowlight 03-09-2002 02:23 AM

Mine isn't showing GZIP status... How can I do that?

TECK 03-09-2002 02:49 AM

use the $gziptext variable. i just released ver 1.2
it's self explanatory.

Reeve of shinra 03-09-2002 04:40 AM

Maybe its just late, but what variable is added to the footer?

Gamingforce 03-09-2002 04:56 AM

Awesome hack however just like the first one you should make it so that the user can add a variable to their footer instead of functions.php automatically printing it to the end. Many people like myself have custom footers at the bottom and it doesn't harm those who don't and helps those who do tremendously.

Thanks and keep up the great work!

TECK 03-09-2002 05:16 AM

Quote:

Originally posted by Reeve of shinra
Maybe its just late, but what variable is added to the footer?
there is no variable to be added to the footer.

Quote:

Originally posted by Gamingforce
Awesome hack however just like the first one you should make it so that the user can add a variable to their footer instead of functions.php automatically printing it to the end.
i tried. it gives incorrect values because you must load it before headers... that's why i changed the code and released ver 1.1. ;)
about the custom footer, insert the custom html code into your $vartext.

regards,
nakkid.

Admin 03-09-2002 05:20 AM

Funny, on this board the text is stuck in the footer HTML code... ;)

TECK 03-09-2002 05:25 AM

hehehe... sssssstttthhhh.. ;) dont sell industrial secrets...
i tried to make it easier for people FireFly.

now be nice... :D

freakyshiat 03-09-2002 07:48 AM

heres the original one if someone wants to uninstall it

freakyshiat 03-09-2002 08:06 AM

Quote:

Originally posted by FireFly
Funny, on this board the text is stuck in the footer HTML code... ;)
can you share how, master? :p

TECK 03-09-2002 09:29 AM

Fazle, i will see what i can do with it to make you happy.
vB.org variable test:
Code:

Page generated in 0.35182405 seconds (26.11% PHP - 73.89% MySQL) with 27 queries
the code above was called with a variable.
as you notice, the higher you place it on the page, the lower are the values...

Tim Wheatley 03-09-2002 09:51 AM

Why are my percentages coming through wrong??

Page generated in 0.1624170 (-5,389.35% PHP - 5,489.35% MySQL) seconds with 116 queries.
PHP version 4.1.2 (Debug mode) with GZIP compression library disabled.

TECK 03-09-2002 09:53 AM

reload the page, it will be ok. and btw, if you have 116 queries, you are in big trouble. you must check your hacked board. you have a huge error there.

hmmm.. i just checked your forum. you probably didnt updated all files. did you downloaded the previous version 1.1? in that case, you must clear your cookies to see the actual file. when you view the attachment, it will pull it the one from temp folder not the actual file.

make sure you edit forum/admin/db_mysql.php

let me know.

psico 03-09-2002 10:17 AM

Version 1.2 has problems with vBPortal...
Shows the message under every Block on vBPortal!!!

Any solution for that?

And shows me 199 queries!!! mmmm

TECK 03-09-2002 10:29 AM

i'm working on a mod right now, so you can enter a variable instead. it will cure your prob.. give me another 15min ;)

Admin 03-09-2002 11:30 AM

Quote:

Originally posted by psico
And shows me 199 queries!!! mmmm
LOL now I remember why we don't use vbPortal.

Tim Wheatley 03-09-2002 12:41 PM

It seems to be working now for me... did I clear cookies? I don't know. ;)

Jawelin 03-09-2002 04:51 PM

:(
I always get PHP percentage negative.... ????
(even reloading and reloading).

Always something like :
Quote:

Page generated in 0.37837 seconds (-54.60% PHP v4.1.2 - 154.60% MySQL) with 34 queries.
I DON'T have VbPortal and use vb 2.2.2 yet...
Thanks

Tim Wheatley 03-09-2002 05:01 PM

I have too many queries then I guess? Why would that be? Am I looping something?

TECK 03-09-2002 07:26 PM

yes you do. this is extremly high. after 50 queries, the server start to go on the red side. i'm surprised your host didnt contact you yet. ;)

ok.. i went to sleep yesterday. so i'm gonna start the mod right now. gimme 30min for my breakfest and keep in mind that i should do my luggage instead of posting here. tomorrow at 8 i have the plane taking me away to my baby sweet loving woman.. :D

Floris 03-09-2002 07:40 PM

Quote:

Originally posted by FireFly

LOL now I remember why we don't use vbPortal.

:) haha, but your's not free :P
I'll personally wait till v3 I think :>

Tim Wheatley 03-09-2002 07:56 PM

Quote:

Originally posted by nakkid
yes you do. this is extremly high. after 50 queries, the server start to go on the red side. i'm surprised your host didnt contact you yet. ;)
My host has contacted me, apologised and upgraded the server twice thinking their hardware wasn't strong enough - LOL

So - how do I find out what the problems are? I know how to edit, I understand how php works (i think) but don't know how to change how it works myself...

TECK 03-09-2002 10:25 PM

version 1.3 released. bugs fixed with vbPortal.

TECK 03-09-2002 10:27 PM

Quote:

Originally posted by Tim Wheatley
My host has contacted me, apologised and upgraded the server twice thinking their hardware wasn't strong enough - LOL

So - how do I find out what the problems are? I know how to edit, I understand how php works (i think) but don't know how to change how it works myself...

you should open a separate thread for this.

Jawelin 03-09-2002 10:58 PM

Quote:

Originally posted by Jawelin
:(
I always get PHP percentage negative.... ????
(even reloading and reloading).

Always something like :


I DON'T have VbPortal and use vb 2.2.2 yet...
Thanks

As said above, I always get negative php percent values.
So I started investigating... ;)

Could someone explain which is the meaning of
PHP Code:

  $starttime=explode(" ",$pagestarttime);
  
$endtime=explode(" ",$pageendtime);

  
$totaltime=$endtime[0]-$starttime[1];

 ... 
instead ....
  
$totaltime=$endtime[0]-$starttime[0]+$endtime[1]-$starttime[1]; 

??

Besides, actually I would prefer the first version of the hack, with an explicitly called variable to display microstats, instead of using the dooutput() function.
Mainly because I would control exactly where stats are displayed - would prefer footer only, not at the end of each page

Thanks a lot.
Bye

TECK 03-09-2002 11:01 PM

it gets the start time and end time to a specific location only.
did you try it to leave the value defaulted?
PHP Code:

$totaltime=$endtime[0]-$starttime[0]+$endtime[1]-$starttime[1]; 

when i leave it default, it gives a format like:
1,236,324,262.324626726 seconds
the negative time is due to some code misconfiguration only.

and btw, that's what ver 1.3 does (is template based) hihi...

Jawelin 03-10-2002 08:32 AM

Quote:

Originally posted by nakkid
it gets the start time and end time to a specific location only.
did you try it to leave the value defaulted?
PHP Code:

$totaltime=$endtime[0]-$starttime[0]+$endtime[1]-$starttime[1]; 

when i leave it default, it gives a format like:
1,236,324,262.324626726 seconds
the negative time is due to some code misconfiguration only.

and btw, that's what ver 1.3 does (is template based) hihi...

Nice! Now I appreciate much more the new 'philosophy' ...
:)
Same, I saw now you use
PHP Code:

$totaltime=$endtime[0]-$starttime[0]; 

(only 0 index value...)

Well. Even still doesn't work to me: the problem is - trying both versions with or without templates (wich I would prefer ...) - I have some difficulties modifying the dovars() function.
(already hacked with FF's Reader's name inside post which already puts a first-element replacement..)
Actually I wouldn't like to use another replacement handly-added and simply would use $microstats var directly in the footer template.
But it isn't enough to define it (as global) within the dooutput() function, as you did as a part of the hack.

Why ?
Any workaround ?

Excuse me, but would manage to understand the chinese-box inheritance of those php vars !!

Thanks a lot.
;)

TECK 03-10-2002 09:23 AM

you can add more then one index and value to your array:
PHP Code:

$findwords=array(=> '{getmicrostats}'=> '{bbusername}');
$replacewords=array(=> $microstats=> $bbusername);
$i=2

try it and let me know.

also dont forget that dooutput() is needed to call the headers and the time before it starts the page and it ends also. dovars() will only replace the variables. use this code for now:
PHP Code:

  // time format (how many digits you want to show)
  
$digits=7;

  
$totaltime=$endtime[0]-$starttime[0];
  
$trimmedtime=number_format($totaltime,$digits);
  
$percentphp=number_format(((($totaltime-$querytime)/$totaltime)*100), 2)."% PHP";
  
$percentsql=number_format((($querytime/$totaltime)*100), 2)."% MySQL";
  
$debugmode=(DEBUG)?" (Debug mode)":"";
  
$versionphp=phpversion();

  if (
strstr($HTTP_SERVER_VARS["HTTP_ACCEPT_ENCODING"], "gzip")) {
    
$gziptext="enabled";
  } else {
    
$gziptext="disabled";
  }

  
$vartext .= "Page generated in $trimmedtime seconds ($percentphp - $percentsql) with $query_count queries.<br>
               PHP version 
$versionphp$debugmode with GZIP library compression $gziptext."

no need to edit anymore dovars(). you can add html code to it.

Jawelin 03-10-2002 10:24 AM

Quote:

Originally posted by nakkid
you can add more then one index and value to your array:
PHP Code:

$findwords=array(=> '{getmicrostats}'=> '{bbusername}');
$replacewords=array(=> $microstats=> $bbusername); 

try it and let me know.

also dont forget that dooutput() is needed to call the headers and the time before it starts the page and it ends also. [...]

Thanks for the update to dovars()....
But, as said, I would prefer to use a simple $varbit to add to the footer template.
This because I could control better the place where that var is put (if I'd used the dooutput() with $vartext, that string would be added to EACH page, even those without footer code ... i.e. vb popup smilies, etc...)
Any case I'll use by now the replacement... :(

Thanks again
Bye

TECK 03-10-2002 10:34 AM

you cannot add a variable $varbit in dooutput() for the simple reason that you will have to edit every single dooutput() piece of code in every single script that uses that function. trust me, there are alot of them. this hack is about getting the right time before and after the page is loaded. the rest of variables are pulled from the server.

i do not understand why you cannot use the array values instead? like the way i show you above? you will be able to use both strings, whereever you want to place them.

Admin 03-10-2002 10:44 AM

Quote:

Originally posted by Jawelin
Thanks for the update to dovars()....
But, as said, I would prefer to use a simple $varbit to add to the footer template.
This because I could control better the place where that var is put (if I'd used the dooutput() with $vartext, that string would be added to EACH page, even those without footer code ... i.e. vb popup smilies, etc...)
Any case I'll use by now the replacement... :(

Thanks again
Bye

If you want to place the info in a diff place, install the latest version of the hack and just use {getmicrostats} instead of $varbit. It's that simple.

Jawelin 03-10-2002 10:51 AM

Ok. Ok.
Both of you persuaded me... :) I'm gonna use the replacement var adding it to FF's hack in dovars()... ;)
Thnx again and sorry for the time.

The Realist 03-10-2002 11:13 AM

I have cleared my cookies and all Iam seeing is this:

vB Load Time, Queries Execution, |
| GZIP Compression and PHP Version MICROSTATS |
| Version 1.0

Can someone send me the latest version please to:

realist@skytronic-forums.com

Thanks
:)

TECK 03-10-2002 11:19 AM

Quote:

Originally posted by The Realist
Can someone send me the latest version...
done. check your email.

Jawelin... look, i use the vbMicroStats variable here:
[high]{genininfo}[/high]

you can place [high]{getmicrostats}[/high] everywhere you want, as firefly mention it before. ;)

Jawelin 03-10-2002 11:29 AM

:) Thnx

The Realist 03-10-2002 01:40 PM

Thanks M8 :)

Quote:

Originally posted by nakkid
done. check your email

okrogius 03-10-2002 02:48 PM

Can I get the latest version emailed to me please? oleg@gaminguru.com Thanks in advance.

The Realist 03-10-2002 02:55 PM

Regarding the below after installing the latest hack.

Page generated in 0.0828900 seconds (19.67% PHP - 80.33% MySQL) with 34 queries.
PHP version 4.0.6 (Debug mode) with GZIP library compression disabled.

Its says that GZIP compression is disabled?

How can I get it to be enabled, it is enabled in VB admin panel and also installed on the server..... so why is it saying this?

Any help?

nafae 03-10-2002 02:56 PM

I get the same problem TR, it must just be the script not talking to the server properly or the server not outputting that gzip is enabled..

Lesane 03-10-2002 03:54 PM

Same here aswell and i know that gzip is enabled...

Page generated in 0.0575660 seconds (-4,066.49% PHP - 4,166.49% MySQL) with 41 queries.
PHP version 4.1.2 (Debug mode) with GZIP library compression disabled.


All times are GMT. The time now is 06:00 AM.

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.01864 seconds
  • Memory Usage 1,855KB
  • 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
  • (1)bbcode_code_printable
  • (7)bbcode_php_printable
  • (14)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (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