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)

Mickie D 02-06-2003 08:37 PM

ok no one replied for me but i decided to check a few things out :)

i installed XENON'S hack to drop queries and some how it fixed my problem but sometimes the main forum home calls 21 queries and i have seen it call 28 also ????

can anyone explain ???

SpeedStreet 02-06-2003 11:10 PM

Quote:

Originally posted by ranger2kxlt
speedstreet i get the same error

anyone have the fix? im on 2.2.9

FIXED

I simply removed the following code from the Start Dooutput replacement:

PHP Code:

 if ($debug==1) {
      
$debugmode='Debug Mode <font color="{ hovercolor}">ON</font>';
    } else {
      
$debugmode='Debug Mode OFF';
    }
    if (
$gzipoutput==1) {
      
$gziptext='GZIP <font color="{ hovercolor}">enabled</font> - level '.$gziplevel;
    } else {
      
$gziptext='GZIP disabled';
    } 


mhardin 02-09-2003 08:17 PM

Thanks Teck!

I installed it on two servers today. Works Great!

Mike

NexDog 02-10-2003 02:22 AM

Hmm, I seem to get 31 queries on the index page. Before I go ahead with Xenon's query decreasing hack, I'd like to know how to identify alot of these queries and cut down if possible.

Hacks installed:

Quick Reply
Chat
Arcade
Journal
Default PM
Karma
Local Time
Member Of The Day
ShoutBox
TopList
VBstory
Who was online today

There are a few others but those and a few of the above mentioned ones probably don't apply. What does anyone recommend?

NexDog 02-11-2003 04:09 AM

Surely someone could help me out? Got a few grand waiting here for the lucky fellow. :P

TECK 02-11-2003 09:16 AM

Please feel free to open a new thread in General Hacking Discussions, it has nothing to do with troubleshooting the hack itself.

NexDog 02-11-2003 09:45 AM

Good idea, Teck - will do. :)

Stu 02-11-2003 10:38 AM

Thanks Teck,
clicked Installed.... :)
I'm using this to evaluate a new Host Server so it's very useful.
I just had to alter it so that ALL Members could see the server loads, so I could get feedback from different users at different times, on the performance of the Server on test.

Kakarot 02-13-2003 08:51 PM

This hack doesn't quite work with vBulletin 2.3.0 installation-wise, simply because the....

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);
    }
  } 

..isn't found in the functions.php file...

TECK 02-13-2003 10:09 PM

I'm going to install vb230 and release an update when I have time. :)

tkeil69575 02-15-2003 11:04 AM

@kakarot
this worked for me with vb 2.3.0

PHP Code:

        while ($replacement $DB_site->fetch_array($replacements))
        {
            if (
$replacement['findword'] != '')
            {
                
$vars["$replacement[findword]"] = $replacement['replaceword'];
            }
            if (
$replacement['findword'] = '{getmicrostats}')
            {
            
$vars["$replacement[findword]"] = $microstats;
            }
        } 


Sebastian 02-16-2003 09:49 PM

@tkeil69575, what code chunk did you find to replace that with?

can't seem to get it to work with 2.3.0.

tkeil69575 02-16-2003 11:31 PM

sebastian,

see attached file

tina

ChuanSE 02-17-2003 03:18 AM

changed the requested lines in the php files without backing up those three :/

result

Parse error: parse error, unexpected $ in /usr/local/psa/home/vhosts/forums.puredj.com/httpdocs/admin/functions.php on line 2331

Fatal error: Call to undefined function: iif() in /usr/local/psa/home/vhosts/forums.puredj.com/httpdocs/admin/functions.php on line 352

I can't enter the board anymore :(
does anyone can pass me the global.php from root/ and db_msql.php & functions.php from root/admin/ for vb 2.2.9 plz

Thx,
PureDJ.com

Serge 02-17-2003 06:33 AM

You know you could just unzip vbulletin and take the those files from it.

blackice912 02-17-2003 06:41 PM

Quote:

Originally posted by tkeil69575
sebastian,

see attached file

tina

Works, thanks! :D

Tim Wheatley 02-22-2003 08:39 AM

Works for me too. If it doesn't, be sure you're not selecting the tags = [php]

TECK 02-22-2003 09:52 AM

Quote:

Originally posted by tkeil69575
@kakarot
this worked for me with vb 2.3.0

Code:

if ($replacement['findword'] = '{getmicrostats}')

Code:

if ( $replacement['findword'] =[high]=[/high] '{getmicrostats}' )

peanut666 02-24-2003 12:20 AM

thanks great hack

running fine on 2.2.9 with vbindex

Page generated in 0.13454604 seconds (81.56% PHP - 18.44% MySQL) with 19 queries.
[Debug Mode OFF] [PHP v4.3.0] [GZIP enabled - level 1] [Server Load: 0.14 ยป 0.12 : 0.09]

dont know what you recon on stats if there average or not

but hay it worked and im a newbie at this lol :banana:

Jawelin 02-25-2003 12:14 PM

Quote:

Originally posted by TECK

Code:

if ( $replacement['findword'] =[high]=[/high] '{getmicrostats}' )

I also noticed such assignment within the if-clause, but with this fix, question is: who puts '{getmicrostats}' value into replacement table ? :nervous:

Thank you very much for supporting this hack yet.
:)

SiXXGuNNZ 02-26-2003 05:39 AM

okay I took original text, and updated that with the info posted by tkeil69575 and then updated that with tecks php edit and it is not working :(

I will attach the file showing the changes I made, i tried both the template and hard coded versions.

version2 02-26-2003 06:21 PM

Hey guys.

Its not working because {getmicrostats} is not in the findword array. Just add {getmicrostats} to your replacement list via the admin control panel. Just leave the value (replace with) blank. Then it will work.

Convergys 02-26-2003 08:34 PM

I have tried this as well and can't get it working. I am just having problems with functions.php
I can send someone my file if you like and they can fix it?

Xyphen 02-27-2003 12:46 AM

I got it to work on vB2.3.0, did whatever the file said, didnt follow the fix for vB2.3.0 cuz it doesnt work, it only displays {getmicrostats}

PHP Code:

Page generated in 0.20730102 seconds (61.54PHP 38.46MySQLwith 49 queries.
[
Debug Mode OFF] [PHP v4.1.1] [GZIP disabled] [Server Load0.00 0.00 0.00

But I also get this error at the top of every page.

Quote:

Warning: Variable passed to reset() is not an array or object in /homepages/42/d74004174/htdocs/forums/admin/functions.php on line 602

Warning: Variable passed to each() is not an array or object in /homepages/42/d74004174/htdocs/forums/admin/functions.php on line 603

ChuanSE 02-27-2003 06:18 AM

well, i can't get it to work either, dunno
maybe you guyz should explain us like we are 3y old :)

cheers and thx

version2 02-27-2003 06:47 PM

*shrugs*

Crap, I dunno guys. I just followed the directions. Then after just getting {getmicrostats} displayed on each page I put it in the replacement table.

LeeCHeSSS 02-28-2003 10:22 AM

It's not an elegant fix though :(

TECK 02-28-2003 11:39 PM

The fix is easier then you think, no need to complicate your life like that. ;)
This the working version for VB 2.3.0...

neocorteqz 03-01-2003 03:53 PM

I'm still using the instuctions from version 2.1 of the hack on 2.3.0 and it works fine.

Lexserv 03-04-2003 07:10 AM

Hi TECK,

I'm not programmer but I've followed your every instruction in the text file, and still there are no results.

This is what I put in the footer:

<p align="center"><smallfont>
<!-- Do not remove this copyright notice -->
Powered by: vBulletin Version $templateversion<br>
Copyright &copy;2000 - 2002, Jelsoft Enterprises Limited.<br>
<!-- Do not remove this copyright notice -->
$copyrighttext<br>
{getmicrostats}
</smallfont></p>

What could I be doing wrong? Can you, or anyone, help me out here. Thanks in advance.

Edit: Never mind, I got it working now. :)

TLfuRy 03-04-2003 12:42 PM

I installed the new version of this hack after upgrading to 2.3.0, and nothing shows up in my footer now. I have uploaded the original files and re-applied the hack three times....and I'm sure I'm doing it right.

Any thoughts?

Xenon 03-04-2003 12:50 PM

Teck is currently not availabla, becaus of making holidays for three weeks ;)

but i can say the hack works with 2.3.0 on my board, so you must do something wrong i think...

TLfuRy 03-04-2003 12:54 PM

Thanks. I'll try it again.

Ghostsuit 03-04-2003 02:34 PM

Quote:

I installed the new version of this hack after upgrading to 2.3.0, and nothing shows up in my footer now. I have uploaded the original files and re-applied the hack three times....and I'm sure I'm doing it right.

Any thoughts?
I had this problem as well. You need to name the template microstats not home_microstats as it says in the instructions.

TLfuRy 03-04-2003 02:45 PM

That worked! Thanks!

Doubledoom 03-04-2003 05:49 PM

Installed and working for me on 2.3.0 RC3 with VBportal 3.0 (2.2) and showing on portal and forum pages correctly.

Needs correction as mentioned a little earlier but apart from that its fine.

Craigr 03-09-2003 06:38 PM

Thanks.

Craig

Talisman 03-13-2003 06:49 PM

Hi all,

Just installed this and ran into the conflict replacing variables in the dovars section of the ADMIN/functions.php file between this hack and Chen's {bbusername} auto name hack.

On pages 29 and 40/41 of this thread, I read that we can integrate the two by finding this in Teck's vbMicroStats hack:

PHP Code:

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

And replacing that with this:

PHP Code:

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

Well, this actually did not work in my case. The {bbusername} portion of the variables wasn't correct. To solve it, I had to replace it with this, instead:

PHP Code:

$findwords=array(=> '{getmicrostats}'=> '{bbusername}');
$replacewords=array(=> $microstats=> "$bbuserinfo[username]");
$i=2

Don't know if anyone else has had a problem with this, but thought I'd mention it, just in case.

Thanks for the great hack, Teck.

Cheers!

<< Now I'm off to lower the number of queries running rampant on all these pages before my site blows up. >>

Flash69 03-23-2003 05:45 AM

I had problems with this hack working on v 2.2.9 in the dovars section of the ADMIN/functions.php

PHP Code:

 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 had to change it to:

PHP Code:

 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 am a new vbulletin person but I think this is a typo in the main hack posted at the begining of this thread. If no-one else has had this problem please disregard this post. If I made a newbie mistake please disregard this post.

Thanks.
Flash

Flash69 03-23-2003 05:46 AM

Double post.


All times are GMT. The time now is 03:21 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.02860 seconds
  • Memory Usage 1,858KB
  • 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_code_printable
  • (9)bbcode_php_printable
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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