vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   vBMicrostats (https://vborg.vbsupport.ru/showthread.php?t=116027)

succo 10-13-2006 05:00 AM

it works on 3.6.x, you only have to change completely the changes in class_core.php as the function name (and how it works) changed

i did it, but of course can't give others the changes to do without authorization from the author... anyway, try to look @ function &execute_query, that's the one to be modified (but of course NOT like in 3.5.x and vbmicrostats 1.05) :)

Snake 10-14-2006 12:09 AM

If you can't give it to others then why bother post here?

succo 10-20-2006 07:30 AM

i can't (and of course won't) without TECK's authorization, as he is the coder for this hack, but anyone can try to change that function by himself, and i was only giving a clue on what to change to make it work on 3.6.x, that's all

i didn't want to say 'i did it' as i didn't, i only used TECK's work and modified it to my purposes, but, as many ask for a port of this mod on 3.6.x and none gave any clue yet (and i don't know if anyone really did it), i'm only saying 'it can be done, look at this function', that's all :)

G_Man 11-16-2006 11:46 PM

Quote:

Originally Posted by BMamba (Post 1079985)
I'm waiting for version 3.6.x too :)

Gets in line. :D

Inferno Dragon 11-24-2006 05:59 PM

I also want it for vb3.6

maxicep 12-01-2006 11:31 AM

vbulletin.org using same hack on 3.6.4
can give admins to us ?

mcyates 12-02-2006 09:11 AM

when will this be released for vb 3.6

grecostimpy 12-07-2006 07:28 PM

jumps in line for 3.6.X hack

TECK 12-11-2006 03:27 PM

I did not forget about you guys. I`m working on a site.
So I will release soon the version for 3.6.x

Patince, it could take a month, depending on what I have to do first.
But I need this hack, so it will be done for the latest version.

sduckie2k5 12-15-2006 11:35 AM

Add me to the list, would like this for 3.6.4. Thanks

Eagle Creek 01-09-2007 10:40 PM

<i>Find:

function query_wrapper($buffered = true, &$link)
{
return $this->functions[$buffered ? 'query' : 'query_unbuffered']($this->sql, $link);
}</i>

I can't find it at all! 6.4 huh... Signing up.. Standing in que...

Raptor 01-15-2007 07:24 PM

yes would like for 3.6.4 also - thanks

LunaTech 01-19-2007 05:12 PM

Till TECK gets to this, all you have to do to get this working in 3.6.4 is change what you edit in class_core.php. Instead of the instructions given, replace execute_query in class_core.php with:

Code:

        function &execute_query($buffered = true, &$link)
        {
                $this->connection_recent =& $link;
                $this->querycount++;

                // start microstats timer
                $this->mstimer_start();
                $queryresult = $this->functions[$buffered ? 'query' : 'query_unbuffered']($this->sql, $link);
                $this->mstimer_stop();

                if ($queryresult)
                {
                        // unset $sql to lower memory .. this isn't an error, so it's not needed
                        $this->sql = '';

                        return $queryresult;
                }
                else
                {
                        $this->halt();

                        // unset $sql to lower memory .. error will have already been thrown
                        $this->sql = '';
                }
        }

        /**
        * vBMicroStats: Query execution time
        *
        * @return        string
        */
        var $mstime_total = 0;
        var $mstime_before = array();
        function mstimer_start()
        {
                $this->mstime_before[] = microtime();
        }
        function mstimer_stop($qtime_total = true)
        {
                $mstime_after  = microtime();
                $mspage_start  = explode(' ', TIMESTART);
                $mspage_start  = $mspage_start[0] + $mspage_start[1];
                $mstime_before = explode(' ', array_pop($this->mstime_before));
                $mstime_before = $mstime_before[0] + $mstime_before[1] - $mspage_start;
                $mstime_after  = explode(' ', $mstime_after);
                $mstime_after  = $mstime_after[0] + $mstime_after[1] - $mspage_start;
                $mstime_taken  = $mstime_after - $mstime_before;
                if ($qtime_total)
                {
                        $this->mstime_total += $mstime_taken;
                }
        }


COBRAws 01-23-2007 08:06 AM

any updates on this?

Thank you

Snake 01-23-2007 08:38 AM

Thanks, LunaTech. Seems to work just fine on 3.6 now. :)

sduckie2k5 01-31-2007 03:14 PM

Quote:

Originally Posted by LunaTech (Post 1162895)
Till TECK gets to this, all you have to do to get this working in 3.6.4 is change what you edit in class_core.php. Instead of the instructions given, replace execute_query in class_core.php with:

Code:

        function &execute_query($buffered = true, &$link)
        {
                $this->connection_recent =& $link;
                $this->querycount++;

                // start microstats timer
                $this->mstimer_start();
                $queryresult = $this->functions[$buffered ? 'query' : 'query_unbuffered']($this->sql, $link);
                $this->mstimer_stop();

                if ($queryresult)
                {
                        // unset $sql to lower memory .. this isn't an error, so it's not needed
                        $this->sql = '';

                        return $queryresult;
                }
                else
                {
                        $this->halt();

                        // unset $sql to lower memory .. error will have already been thrown
                        $this->sql = '';
                }
        }

        /**
        * vBMicroStats: Query execution time
        *
        * @return        string
        */
        var $mstime_total = 0;
        var $mstime_before = array();
        function mstimer_start()
        {
                $this->mstime_before[] = microtime();
        }
        function mstimer_stop($qtime_total = true)
        {
                $mstime_after  = microtime();
                $mspage_start  = explode(' ', TIMESTART);
                $mspage_start  = $mspage_start[0] + $mspage_start[1];
                $mstime_before = explode(' ', array_pop($this->mstime_before));
                $mstime_before = $mstime_before[0] + $mstime_before[1] - $mspage_start;
                $mstime_after  = explode(' ', $mstime_after);
                $mstime_after  = $mstime_after[0] + $mstime_after[1] - $mspage_start;
                $mstime_taken  = $mstime_after - $mstime_before;
                if ($qtime_total)
                {
                        $this->mstime_total += $mstime_taken;
                }
        }


Not sure I follow, replace all instances of execute_query with the above code? Thanx

stomph 02-01-2007 01:31 AM

Thank you!

Realm of Horror Comics 02-03-2007 10:09 AM

Great mod, thanks!! :D

TECK 02-25-2007 07:44 PM

<a href="https://vborg.vbsupport.ru/showthread.php?t=140449" target="_blank">https://vborg.vbsupport.ru/showthread.php?t=140449</a>


All times are GMT. The time now is 01: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.01712 seconds
  • Memory Usage 1,773KB
  • 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_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (19)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