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)

d3nnis 07-17-2003 03:29 PM

found my fix.

http://www.teckwizards.com/forum/sho...=&threadid=364

Thanks TECK! :)

noppid 07-23-2003 03:15 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 :)


We are using 2.3.0 and have a similar issue. The code to replace is different then that specified in the hack. When we try to replace what seems the correct code we get these errors...

Warning: reset(): Passed variable is not an array or object in /functions.php on line 690

Warning: Variable passed to each() is not an array or object in /functions.php on line 691

Anyone else having issues like this?

Thanks

EDIT: The fix is here...
https://vborg.vbsupport.ru/showthrea...&pagenumber=56

EVO VIII Chris 08-12-2003 12:24 AM

Anyone got a fix for vB 2.3.2 yet? I was using it but when I upgraded to 2.3.2 it stopped working. I know they only changed a few files so the fix is probably simple, anyone know if there is one yet?

albibak 08-13-2003 07:24 AM

Thanks for this hack, I test it now :p

mbaskett 08-27-2003 04:42 AM

Quote:

06-14-03 at 04:46 AM User_001 said this in Post #848
has anyone even tried this on vB3?? just curious. :)

Yes, and I still haven't gotten it to work. However, we're not supposed to publicly discuss VB3 hacks until after it's released in a final version....

limey 08-29-2003 02:48 AM

doesn't work for me here:
http://www.pokeritis.com/
or here
http://www.pokeritis.com/archive

but it works for me here:
http://www.pokeritis.com/forums/index.php

and I have installed this on another site before--and reinstalled this like 3x. The one difference is that this site is running 2.3.0 and others are 2.2.9.

Gary King 08-29-2003 12:17 PM

You need to make a modification to make it work correctly with vBHomeLite.

limey 08-29-2003 09:59 PM

whats the modification? I have it up and running on two other sites with vbhomelite...so I'm very interested to see which step I have missed.

StrykerContact 09-02-2003 04:07 AM

Mine only displayes {getmicrostats} in my footer when I place it there, I have tried naming it home_microstats and just microstats for the template name, neither work. Please help.

Megadeuce 09-02-2003 09:17 PM

HELP!
I tried to install this hack and messed up my board. I alsost managed to get back to my starting point but I get these errors:

Parse error: parse error in /home2/usasport/public_html/admin/functions.php on line 944

Fatal error: Call to undefined function: vbsetcookie() in /home2/usasport/public_html/admin/sessions.php on line 205

These are coming from my archive pages. Can anyone help?

Thanks in advance.


All times are GMT. The time now is 09:33 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.03020 seconds
  • Memory Usage 1,775KB
  • 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
  • (2)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