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)

cYbercOsmOnauT 06-28-2003 05:58 PM

Great hack.. but how about making it fit for 2.3.0 final? ;)

Kriek 06-29-2003 12:49 AM

/me frantically waves hands in air

I exceedingly concur.

Spark 06-29-2003 02:46 PM

Page generated in 0.30388701 seconds (36.21% PHP - 63.79% MySQL) with 23 queries.

*click install*

Bison 06-29-2003 03:32 PM

Quote:

06-12-03 at 02:52 PM Xelation said this in Post #847
Hey teck, I've got a problem with a step.. its interfering with another hack.. heres the problem on this step

Find:
PHP Code:

// ###################### Start dovars #######################
function dovars($newtext,$sendheader=1) {
  
// parses replacement vars

  
global $DB_site,$replacementsetid,$gzipoutput,$gziplevel,$newpmmsg;
  static 
$vars;

  if (
connection_status()) {
    exit;
  }

  if (!isset(
$vars)) {
    
$vars=$DB_site->query("SELECT findword,replaceword FROM replacement WHERE replacementsetid IN(-1,'$replacementsetid') ORDER BY replacementsetid DESC,replacementid DESC");
  } else {
    
$DB_site->data_seek(0,$vars);
  }

  while (
$var=$DB_site->fetch_array($vars)) {
    if (
$var['findword']!="") {
      
$newtext=str_replace($var['findword'],$var['replaceword'],$newtext);
    }
  } 

Replace it with:
PHP Code:

// ###################### Start dovars #######################
function dovars($newtext,$sendheader=1) {
  
// parses replacement vars

  
global $DB_site,$replacementsetid,$gzipoutput,$gziplevel,$newpmmsg,$microstats;
  static 
$vars;

  if (
connection_status()) {
    exit;
  }

  if (!isset(
$vars)) {
    
$vars=$DB_site->query("SELECT findword,replaceword FROM replacement WHERE replacementsetid IN(-1,'$replacementsetid') ORDER BY replacementsetid DESC,replacementid DESC");
  } else {
    
$DB_site->data_seek(0,$vars);
  }

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

  while (
$var=$DB_site->fetch_array($vars) and $i++) {
    if (
$var['findword']!="") {
      
$findwords[$i]=$var['findword'];
      
$replacewords[$i]=$var['replaceword'];
    }
  }

  
$newtext=str_replace($findwords,$replacewords,$newtext); 



I have this code instead:
PHP Code:

// ###################### Start dovars #######################
function dovars($newtext$sendheader 1)
{
    
// parses replacement vars

    
global $PHP_SELF$DB_site$replacementsetid$gzipoutput$gziplevel$newpmmsg;
    static 
$vars;

    if (
connection_status())
    {
        exit;
    }

    if (!
is_array($vars))
    {
        
// build an array of $vars containing find/replace values
        
$vars = array();
        
$replacements $DB_site->query("
            SELECT findword, replaceword, replacementsetid
            FROM replacement
            WHERE replacementsetid IN(-1, '" 
intval($replacementsetid) . "')
            ORDER BY replacementsetid, replacementid DESC
        "
);
        while (
$replacement $DB_site->fetch_array($replacements))
        {
            if (
$replacement['findword'] != '')
            {
                
$vars["$replacement[findword]"] = $replacement['replaceword'];
            }
        }
        unset(
$replacement);
        
$DB_site->free_result($replacements);
    }

    if (
PHPVERSION '4.0.5' or 1)
    {
        
// do each replacement in turn for PHP < 4.0.5
        
reset($vars);
        while(list(
$find$replace) = each($vars))
        {
            
$newtext str_replace($find$replace$newtext);
        }
    } 

how can I fix this problem? Ive tried many different ways to fix it myself but now your my resort. Hope you can help :)


Looks like you're still using 2.2.9, or trying to use this file [functions.php-v2.29] with 2.30 [hehe, re-applying those hacks can be a pain, huh?] ... you need to fill that whole section with what's included in the zipfile, in both places in the functions.php code. I did the same thing ... that's why I know what you did! ;)

Stadler 06-30-2003 06:35 PM

Regarding the Problems with @exec('uptime') in SAFE_MODE:

You can specify a safe_mode_exec_dir and move the uptime-script there. So just ask your host, if he does that for you. :)

HTH

d3nnis 07-15-2003 01:14 PM

how come my display looks weird?

Page generated in 1,058,278,383.14206004 seconds (100.00% PHP - 0.00% MySQL) with 23 queries.

the seconds... I used this attached file to edit.

d3nnis 07-15-2003 10:52 PM

Quote:

Yesterday at 11:14 PM d3nnis said this in Post #856
how come my display looks weird?

Page generated in 1,058,278,383.14206004 seconds (100.00% PHP - 0.00% MySQL) with 23 queries.


the seconds... I used this attached file to edit.

:rambo:

d3nnis 07-16-2003 11:48 AM

Quote:

Yesterday at 11:14 PM d3nnis said this in Post #856
how come my display looks weird?

Page generated in 1,058,278,383.14206004 seconds (100.00% PHP - 0.00% MySQL) with 23 queries.


the seconds... I used this attached file to edit.



anyone ard? my homepage and forums shows different page generation in secs...

homepage : http://www.keeptouch.net/
forums : http://forums.keeptouch.net/

do i need to modify the global file that comes with vbhome? : :ninja:

TECK 07-16-2003 09:37 PM

The fix is posted on the vbHL support forums... is basically a hack for vbHome.

d3nnis 07-17-2003 01:58 AM

Quote:

Today at 07:37 AM TECK said this in Post #859
The fix is posted on the vbHL support forums... is basically a hack for vbHome.

cool will check it out in your forum. Thank TECK!


All times are GMT. The time now is 09:13 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.01685 seconds
  • Memory Usage 1,779KB
  • 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
  • (3)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)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