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)

pipsy 05-05-2002 01:38 AM

nothing happens when i put {getmicrostats} in my footer template :( all i see it '' {getmicrostats} '' on my page :(
i'm obviously doing something wrong. and i have no idea what.

pipsily yours.

TECK 05-05-2002 02:38 AM

i'm sorry but i can't do nothing about it. please check you code. there are alot of changes so one little mistake can ruin it all. good luck.

FWC 05-05-2002 04:39 AM

Quote:

Originally posted by nakkid
i will change the file when VB226 will be oficially released. (today)
I modified and applied the hack to the new db_mysql.php that was released and it's working fine. :)

TECK 05-05-2002 04:47 AM

thanks.. :)
however the details link will not work anymore in 226. is ok, i will add the code separately. i will need the ok from some of the gurus here, to make sure the code is secure. as soon as 226 is released i will look into it.

until then, FWC, can you post more details about the change? i didnt have a chance to look into it. thanks.

FWC 05-05-2002 05:01 AM

I used Beyond Compare to compare my old hacked file and the new one. I just copied over the parts I thought were necessary for your hack to work. Explain and showqueries are gone now so I left all of that stuff out. I'll take a look at it and post what I added.

FWC 05-05-2002 05:14 AM

OK, it looks like I changed this:
PHP Code:

  function query($query_string) {
    global 
$query_count;
    
// do query

    
$this->query_id mysql_query($query_string,$this->link_id);
    if (!
$this->query_id) {
      
$this->halt("Invalid SQL: ".$query_string);
    }

    
$query_count++; 

To this:
PHP Code:

  function query($query_string) {
    global 
$query_count,$querytime;
    
// do query

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

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

    
$this->query_id mysql_query($query_string,$this->link_id);
    if (!
$this->query_id) {
      
$this->halt("Invalid SQL: ".$query_string);
    }

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

      
$aftertime=$endtime[0]-$starttime[0]+$endtime[1]-$starttime[1];
      
$querytime+=$aftertime-$beforetime

Now that I'm looking at it again, I don't think $showqueries and $explain are necessary in the global statement anymore.

TECK 05-05-2002 05:20 AM

they are unset? i didnt downloaded the new file. i wanted to wait for the 226 release. busy working on my website...

FWC 05-05-2002 05:32 AM

Yes, they are unset. I just took them out and everything seems to work fine.

TECK 05-05-2002 05:34 AM

can you edit the code above and remove them from global?
thanks.

NTLDR 05-05-2002 06:18 PM

The update in Post 306 (above) also worked fine for me with the updated 2.2.6 db_mysql.php on vB 2.2.4

Thanks for the update ;)


All times are GMT. The time now is 02:33 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.01934 seconds
  • Memory Usage 1,753KB
  • 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
  • (2)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (3)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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