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)

TECK 05-19-2006 05:47 AM

Quote:

Originally Posted by DementedMindz
lol im doing a backup thats why... but the queries you are seeing is from my vbadvanced page...

I remember how many members complained about the high number of queries present into this portal.
Well, you are lucky that you have only 24, even if this is extremly high.
I saw people running over 100 queries on a page and asked why their server was shutdown...

Read more here, on my first version:
https://vborg.vbsupport.ru/showthread.php?t=35811
That will explain also why the file edits are needed...

LOL, VB2... Check the screenshot. Wow. They used to have 17 queries on the frontpage.
Things changed a lot... Much better now. :)
Haha, read this post:
https://vborg.vbsupport.ru/showpost....3&postcount=54
Quote:

Originally Posted by psico
Version 1.2 has problems with vBPortal...
Shows the message under every Block on vBPortal!!!

Any solution for that?

And shows me 199 queries!!! mmmm

Holly crap! 199 babies on the roll...

Boofo 05-19-2006 05:51 AM

Quote:

Originally Posted by TECK
Bob, post here the actual html code from the page source, not footer template. Start from the beginning of microstats code to the end of footer.
I will fix it, something is wrong with the row colspan, in my mod.

That's ok, I got it showing for now at least. I won't waste and more of your time tonight with it but if you do get some free time in the next few days I would like to have the code in the original spot, with the table fixed. ;)

And thanks for bringing back memories with this update, Floren. I really needed it right now. ;)

TECK 05-19-2006 06:00 AM

Go ahead and post it, I need it because I want to fix the colspan bug.
Thanks Bobby.

Mr Chad 05-19-2006 06:04 AM

Quote:

Originally Posted by TECK
The $ms_output code you place it into your vBMicroStats Global Hook plugin.
The second, into your footer template, or any other template you like. ;)

lol yea i messed up, first time i was looking at the plugins it clicked the same one twice and didnt see any of the code you were talking about :P

Boofo 05-19-2006 06:05 AM

Quote:

Originally Posted by TECK
Go ahead and post it, I need it because I want to fix the colspan bug.
Thanks Bobby.

You want access to the Admin CP so you can play with it?

TECK 05-19-2006 06:09 AM

Is Ok, I see where is the problem.
Working on it as we speak.

Boofo 05-19-2006 06:12 AM

Quote:

Originally Posted by TECK
Is Ok, I see where is the problem.
Working on it as we speak.

Boy that was quick! LOL

packetattack 05-19-2006 06:12 AM

I've edited the files multiple times and I keep getting this persistent error after I upload them back up the server.

Parse error: parse error, unexpected T_CLASS, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /home/packetattack/forums.nycmaximas.org/html/includes/class_core.php on line 989. I keep redoing the files to no avail.

I'm using UltraEdit 32 and uploading the files in ASCII mode.

I check line 989 and this is what I have:

985: * @package vBulletin
986:* @version $Revision: 1.183.2.9 $
987:* @date $Date: 2006/02/09 17:44:52 $
988:*/
989:class vB_Database_MySQLi extends vB_Database
990:{
991: /**
992: * Array of function names, mapping a simple name 993:to the RDBMS specific function name
994: *
995: * @var array
996: */

Boofo 05-19-2006 06:35 AM

Floren, would it be easier to see the problem first hand on the site in the Admin CP? The skin itself might be causing it.

sensimilla 05-19-2006 06:59 AM

Hmmm... I did it twice step by step and its looking like this...
Any ideas ? TIA

Boofo 05-19-2006 07:04 AM

Quote:

Originally Posted by sensimilla
Hmmm... I did it twice step by step and its looking like this...
Any ideas ? TIA

Floren is working on the column span problem now. ;)

TECK 05-19-2006 07:23 AM

Problem fixed, version 1.0.2 released. The colspan increments were not working properly, so the table looked broken...
This upgrade is for those who want to use the original/unmodified template code.
Uninstall old version and re-install the new one. You only need to run the plugin, no other changes are needed. Don't you love vBulletin?

Enjoy.

For the teckies who want to know exacly what I did. This is the added code segment:
Code:

        $colspan = 1;
        $language_count = 0;
        $style_count = 0;
        $style_id = -1;

        if ($vbulletin->languagecache === null)
        {
                $vbulletin->languagecache = array();
        }

        foreach ($vbulletin->languagecache AS $language)
        {
                if ($language['userselect'])
                {
                        $language_count++;
                }
        }

        if ($language_count > 0)
        {
                $colspan++;
        }

        if ($vbulletin->options['allowchangestyles'])
        {
                if (is_array($vbulletin->stylecache["$style_id"]))
                {
                        $style_cache =& $vbulletin->stylecache["$style_id"];
                }
                else if (is_array($vbulletin->stylecache[$style_id]))
                {
                        $style_cache =& $vbulletin->stylecache[$style_id];
                }
                else
                {
                        return;
                }

                foreach ($style_cache AS $x)
                {
                        foreach ($x AS $style)
                        {
                                if ($style['userselect'] OR $vbulletin->userinfo['permissions']['adminpermissions'] AND $vbulletin->bf_ugp_adminpermissions['cancontrolpanel'])
                                {
                                        $style_count++;
                                }
                        }
                }

                if ($style_count > 1)
                {
                        $colspan++;
                }
        }

        $show['colspan'] = iif($language_count > 0 OR $style_count > 1, true, false);


Boofo 05-19-2006 07:28 AM

Yes indeedy! Works like a charm. Just need to center it and do a tfoot instead of tcat and we are all set. Thank you, sir. You are still the Master to this old Grasshopper. ;)

TECK 05-19-2006 07:29 AM

Quote:

Originally Posted by packetattack
I've edited the files multiple times and I keep getting this persistent error after I upload them back up the server.

Parse error: parse error, unexpected T_CLASS, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}'

Use Textpad? :)
Unfortunatelly, I cannot post the hole functions, modified, vBulletin copyright policies, unless they changed their mind?
I wish I could help you more, but I cannot.
Try to contact one of the users who installed the mod successfully, to send you the edited files.

Oblivion Knight 05-19-2006 09:44 AM

Welcome back TECK, it's great to see this released for 3.5.x!

derekivey 05-19-2006 09:58 AM

Thanks for releasing a vB 3.5 version TECK! I will install it after school.

Derek

Logikos 05-19-2006 11:18 AM

What a great way to start your first released 3.5 hack! Welcome back.

/me clicks install

Logikos 05-19-2006 12:19 PM

Welp, I'm getting the following error.
Code:

Fatal error: Cannot redeclare mstimer_start() in c:\apache\www\demo\forums\includes\class_core.php on line 987
Here is class_core.php lines 983-1002
Code:

983        var $mstime_total = 0;
984        var $mstime_before = array();
985        var $msmemory_before = array();
986        function mstimer_start()
987        {
988                $this->mstime_before[] = microtime();
989        }
990        function mstimer_stop()
991        {
992                $mstime_after  = microtime();
993                $mspage_start  = explode(' ', TIMESTART);
994                $mspage_start  = $mspage_start[0] + $mspage_start[1];
995                $mstime_before = explode(' ', array_pop($this->mstime_before));
996                $mstime_before = $mstime_before[0] + $mstime_before[1] - $mspage_start;
997                $mstime_after  = explode(' ', $mstime_after);
998                $mstime_after  = $mstime_after[0] + $mstime_after[1] - $mspage_start;
999                $mstime_taken  = $mstime_after - $mstime_before;
1000
1001              $this->mstime_total += $mstime_taken;
1002      }

Any idea? I've tried 3x's before posting this.

Boofo 05-19-2006 12:21 PM

That's strange. It works great for me.

bang 05-19-2006 01:09 PM

a little hard to believe that a hack with this kind of functionality cannot avoid using file edits... :confused:

Logikos 05-19-2006 01:33 PM

In order to get the accurate results, file edits are necessary. I never have a problem editing files. We've all had to do it up untill 3.5.0. :p

Dan 05-19-2006 01:34 PM

Nice one TECK :) Was waiting for one like this.

TECK 05-19-2006 02:05 PM

Quote:

Originally Posted by LiveWire
In order to get the accurate results, file edits are necessary. I never have a problem editing files. We've all had to do it up untill 3.5.0. :p

Hi Ken, did you solved the problem?
You get an error like that if the mstimer_start is called twice...
Did you previously edited class_core.php or init.php for other mods?

The process is quite simple.
In init.php, at the top, you start the microtime clock, that's what function mstimer_start() does. Then you need the stop the clock at the bottom, with function mstimer_stop(). That's the reason you really need to edit the files, no hooks are present before or after the database connection, queries exec, etc.

In class_core.php, you simply insert those functions into the vB_Database MySQL and MySQLi class. They are called only once, depending on what type of SQL language you chosed.

I hope I was clear with my explanation. :)
Ken, please install the mod into an unmodded test board and let me know if the problem is solved.

BTW, thank you all for the warm welcome back. I really appreciate it. :)

yonglvnv 05-19-2006 04:10 PM

Just installed and works great in the forum section. However, in my photopost pages I'm seeing "{microstats} where the actual stats should be. Any ideas?

TECK 05-19-2006 05:26 PM

PhotoPost does not use the vBulletin $output, then?
This code line (in vBMicroStats Global Hook) should help you:
Code:

$output = str_replace('{microstats}', $ms_output, $output);
$output is the vBulletin html code output and $ms_output is the MicroStats one.
The code line listed above with search in the $output for the {microstats} string and replace it with the actual $ms_output html code.
Probably you have a mod installed that merges PhotoPost with vBulletin?
I'm not familiar with this software, so unfortunatelly I could not support it.
I wish I could help you more.

Maybe other members who have experience with PhotoPost could help you better.
I would post this question in the vB3.5 Modification Questions forum.
It shouldn't be hard to fix your problem.

If you have an answer, please post it here so I can link it in the first post.
Thanks. :)

BTW, 27 installs in 12 hours? Thank you! It really means a lot to me.

Logikos 05-19-2006 05:29 PM

hmmm, it shows that you have updated your file since my last post. I'll give it another shot.

DementedMindz 05-19-2006 05:54 PM

Quote:

Originally Posted by TECK
BTW, 27 installs in 12 hours? Thank you! It really means a lot to me.


i think the mod is great thats why you see so many people installing it... but not only that your support is amazing...

TECK 05-19-2006 06:38 PM

Version 1.0.3 released. If you have a previous version installed, all you have to do is uninstall the old product and re-install the new one.
No other code modifications in files are needed.

The new version improves the UNIX/Win32 Server Memory option. If fixes 2 bugs.
First bug: Originally the code was piping the entire process list through grep.
Instead, we should search only for what we are interested in... done.
This was tested on a Linux RedHat server. It should work with any UNIX systems.
Let me know if you have any wierd errors on the page.

Second bug: I fixed another little bug related to the Win32 part of code.
This was tested on Win XP Pro SP2 with IIS. It should work also with Win2003 Server.

Snake 05-19-2006 06:39 PM

Man I have been waiting for this goodie from a very long time. Thank you very much, sir! :D

Boofo 05-19-2006 07:00 PM

Quote:

Originally Posted by TECK
Version 1.0.3 released. If you have a previous version installed, all you have to do is uninstall the old product and re-install the new one.
No other code modifications in files are needed.

The new version improves the UNIX/Win32 Server Memory option. If fixes 2 bugs.
First bug: Originally the code was piping the entire process list through grep.
Instead, we should search only for what we are interested in... done.
This was tested on a Linux RedHat server. It should work with any UNIX systems.
Let me know if you have any wierd errors on the page.

Second bug: I fixed another little bug related to the Win32 part of code.
This was tested on Win XP Pro SP2 with IIS. It should work also with Win2003 Server.

If we are using that stats below the copyright, do we use the same code in your post or has that changed now?

TECK 05-19-2006 07:18 PM

It's the same code, in the hook template. You can keep the same code Bob.
I don't want you guys to scream ... :)

Version 1.0.4 released.
By fixing the server memory bugs I created a new one. Way to go Floren!
Anyway, it's fixed. Do the same thing, simply uninstall the old product and install the new one. No other code modifications are needed.

Boofo 05-19-2006 07:21 PM

Quote:

Originally Posted by TECK
It's the same code, in the hook template. You can keep the same code Bob.
I don't want you guys to scream ... :)

And you know I will be the one screaming the loudest. ;)

Quote:

Version 1.0.4 released.
By fixing the server memory bugs I created a new one. Way to go Floren!
Anyway, it's fixed. Do the same thing, simply uninstall the old product and install the new one. No other code modifications are needed.
Thank you, sir. Always a pleasure. ;)

DementedMindz 05-19-2006 07:30 PM

here we go ill update mine lets see how long this takes me again lol can i still use my same code from last night? or is there a bug in that code?

TECK 05-19-2006 07:50 PM

You keep the same hook template code you edited.
I'm not going to make you post another screenshot. :)

Guys, I need you to test this mod into an unmodded board and a server with APC or eAccelerator installed.
Let me know if you have any wierd errors.

DementedMindz 05-19-2006 08:04 PM

thank you

TECK 05-19-2006 08:10 PM

Let me know if the memory usage it's displaying 0 or 0.20... I think not every server likes it... we might need to go back to Grep.
I just test it into another UNIX server and it shows 0Kb. grrr...

DementedMindz 05-19-2006 08:12 PM

mine is showing 0.20KB Used....

TECK 05-19-2006 08:20 PM

With 1.0.4? Please post the mod version and the memory used value. Anyone else?

DementedMindz 05-19-2006 08:21 PM

yes thats with 1.0.4... 0.20KB Used

Logikos 05-19-2006 08:39 PM

I think because i'm testing this on mt localhost is what my problem is. I'll install on my live board and see what the reslults are.


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