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)
-   -   Microstats - load times, server loads, queries, uncached templates (https://vborg.vbsupport.ru/showthread.php?t=82900)

Christine 06-23-2005 12:58 AM

Thanks for the port SA -- flawless install and working like a champ.

:)

sHORTYWZ 06-23-2005 03:24 AM

Quote:

Originally Posted by ShiningArcanine
Wow, that was a quick response. You responded before I edited my post. ^_^;;

Would you be able to give me me those specifics? They might be helpful in figuring out why you're seeing what you're seeing.

PHP 4.3.11
MYSQL 4.1.8
Linux

I'm just quite perplexed as to why these two forums, hosted on the same box display differently.. for some reason both parts of the if statement are being executed on the second forum.

DBs 06-23-2005 08:34 AM

I too get the same, both parts of the load statement get executed and displayed.

TrentTech 06-23-2005 10:10 AM

/me installs

Thanks SA!

Megatekno 06-23-2005 03:56 PM

Thank ShiningArcanine

MentaL 06-28-2005 01:20 PM

gr8!!

EvilHawk 06-29-2005 11:51 AM

Nice plugin!

To display the load average at a freeBSD server I had to replace this
Code:

if ($loadavg = @file_get_contents("/proc/loadavg")) {
       
                $regs = explode(" ",$loadavg);

With this
Code:

$loadavg = `sysctl vm.loadavg|cut -d" " -f3-5`;
if ($loadavg)
 {
                        $regs = explode(" ",$loadavg);

this should also work at netbsd & openbsd servers! ;)

akanevsky 07-11-2005 11:13 AM

Screenshots please?

akanevsky 07-11-2005 11:23 AM

Quote:

EvilHawk
I think you could also make a conditional that would execute one code if it is *BSD, and another code if it is *nix, couldn't you? It's displayed by the phpinfo() function, however I'm not sure how to retrieve it by a custom script. Could probably use a system command?

Dream 07-11-2005 07:06 PM

this is great, the only thing that annoys me is it show up in places like the "attach manager" window and messes with the layout.

faast 07-18-2005 09:03 PM

stupid qustion >> what is a query?

Snake 08-01-2005 06:36 PM

Will this work on RC1?

BamaStangGuy 08-01-2005 06:58 PM

What about people that have not whitespace below the footer?

Like my site:

http://www.mustangevolution.com/forum

Notice if I install this hack it pushes up the red bar at the bottom and looks weird... anyway to relocate the output text?

ShiningArcanine 08-01-2005 07:28 PM

I was thinking of making a new version that allows this to be set from config.php.

Quote:

Originally Posted by Snake
Will this work on RC1?

I'm using it on RC1. There really aren't any changes Jelsoft should make to vBulletin in the foreseeable future that would break this modification.

Quote:

Originally Posted by BrentWilson
What about people that have not whitespace below the footer?

Like my site:

http://www.mustangevolution.com/forum

Notice if I install this hack it pushes up the red bar at the bottom and looks weird... anyway to relocate the output text?

You'll want to modify it so that the line that looks for "</body>" and replaces it with "*microstats stuff*</body>" looks for something else.

Snake 08-01-2005 07:46 PM

Oh boy this is a great hack but could you make a feature where administrators are "only" allowed to view the mircrostats? There is no point to show it up to the other members really. :\

akanevsky 08-01-2005 08:01 PM

Screenshot, please? Seriously... :(

BamaStangGuy 08-01-2005 09:44 PM

Quote:

Originally Posted by Dark Visor
Screenshot, please? Seriously... :(

Someone already posted one!

akanevsky 08-01-2005 09:47 PM

Where?

ShiningArcanine 08-02-2005 01:16 AM

Quote:

Originally Posted by Snake
Oh boy this is a great hack but could you make a feature where administrators are "only" allowed to view the mircrostats? There is no point to show it up to the other members really. :\

Right now, administrators are the only ones allowed to view server loads.

Personally I like seeing execution times and query counts displayed on vBulletin so you'll have to modify it if you want it to display that information only to administrators.

Christine 08-02-2005 01:23 AM

Quote:

Originally Posted by Dark Visor
Where?

https://vborg.vbsupport.ru/showpost....3&postcount=32

https://vborg.vbsupport.ru/showpost....4&postcount=30

ShiningArcanine 08-02-2005 01:47 AM

Okay, everyone. I took some time and wrote version 1.2.0. Here is the changelog:

-Added OpenBSD, FreeBSD and NetBSD support
-Added Replacement variable setting in config.php
-Added Display only to Administrators Setting in config.php
-Fixed bug affecting Linux/Unix servers that have exec('uptime') support and not /proc/loadavg support.

The replacement variable setting basically allows you to have the stock modification place its data before something other than "</body>." Everything else should be shelf explanatory.

Edit: So much for having to edit microstats so it is displayed only to administrators. :laugh: :ninja:

InfiniteWebby 08-02-2005 03:00 AM

The server load averages aren't working for me. I put in some flags and it seems that the code is entering the is admin if statement but not entering any of the load average if statements.

I don't know about other people but I would appreciate it heaps if the variables were in the vbulletin options rather than the config file because as simple as it may be I still consider adding lines to your config a file edit and simply opening and ftp program is a pain in the bum.

ShiningArcanine 08-02-2005 10:48 AM

What do you mean by they aren't working for you? Are they not being displayed? If you're not running Linux/Unix/FreeBSD/OpenBSD/NetBSD that is to be expected.

InfiniteWebby 08-02-2005 10:52 AM

I am running on a linux server and the server loads are not showing at all...

ShiningArcanine 08-02-2005 10:55 AM

Did the previous version work? Does your server support exec('uptime') or /proc/loadavg?

InfiniteWebby 08-02-2005 10:57 AM

Didn't try the previous version and I don't know... probably not by the looks of it.

Boofo 08-02-2005 11:02 AM

Quote:

Originally Posted by AnimeWebby
I am running on a linux server and the server loads are not showing at all...

I'm running on a Linux server and they show fine for me. ;)

Blam Forumz 08-02-2005 11:19 AM

Same here

ShiningArcanine 08-02-2005 03:42 PM

Quote:

Originally Posted by AnimeWebby
Didn't try the previous version and I don't know... probably not by the looks of it.

Ask your web host if either method is supported. Chances are both aren't.

Snake 08-02-2005 05:13 PM

I have upgraded the plugin and members can still view the microstats. Any idea?

Biker_GA 08-02-2005 05:19 PM

Did you modify config.php?

Snake 08-02-2005 06:25 PM

Uh no. What do I've to do exactly in confهg.php file?

Biker_GA 08-02-2005 06:26 PM

Read the instructions at the top?

Snake 08-02-2005 06:31 PM

Quote:

$config['Microstats']['adminonly'] = true;
I have placed the above code already in config.php and it is still visible to the members.

ShiningArcanine 08-02-2005 08:05 PM

Quote:

Originally Posted by Snake
I have placed the above code already in config.php and it is still visible to the members.

This a bug in microstats. Basically, I used $config['Microstats']['adminonly'] in microstats's PHP code and vBulletin changes its name to $vbulletin->config['Microstats']['adminonly']. I didn't think such a simple thing needed testing. ^_^;;

I've released version 1.2.1 to fix this bug.

akanevsky 08-02-2005 08:19 PM

Thank you very much :banana:

Snake 08-03-2005 08:32 AM

Quote:

Originally Posted by ShiningArcanine
This a bug in microstats. Basically, I used $config['Microstats']['adminonly'] in microstats's PHP code and vBulletin changes its name to $vbulletin->config['Microstats']['adminonly']. I didn't think such a simple thing needed testing. ^_^;;

I've released version 1.2.1 to fix this bug.

Ha I knew there's a bug somewhere around. :P Thanks.

Snake 08-03-2005 08:34 AM

Btw, I have upgraded to 1.2.1 and everything but my members say they can still view the microstats. :( Here's how my config.php file looks like.

Quote:

// ****** SUPER ADMINISTRATORS ******
// The users specified below will have permission to access the administrator permissions
// page, which controls the permissions of other administrators
$config['SpecialUsers']['superadministrators'] = '1';

// ****** MySQLI OPTIONS *****
// PHP can be instructed to set connection paramaters by reading from the
// file named in 'ini_file'. Please use a full path to the file.
// Used to set the connection's default character set
// Example:
// $config['Mysqli']['ini_file'] = 'c:\program files\MySQL\MySQL Server 4.1\my.ini';
$config['Mysqli']['ini_file'] = '';

// ****** MICROSTATS OPTIONS *****
// Setting this variable to anything will make microstats display itself only to administrators.
$vbulletin->config['Microstats']['adminonly'] = 'true';
I have done everything right, so there might a bug somewhere again. ;)

Boofo 08-03-2005 08:45 AM

Is there a way to move this above the copyright notice with a break in between it and the copyright?

EDIT: Disregard this post. I found it in the first post, sorry. ;)

ShiningArcanine 08-03-2005 08:30 PM

Quote:

Originally Posted by Snake
Btw, I have upgraded to 1.2.1 and everything but my members say they can still view the microstats. :( Here's how my config.php file looks like.



I have done everything right, so there might a bug somewhere again. ;)

That line in config.php should say:

PHP Code:

$config['Microstats']['adminonly'] = true

I did regression testing before I released 1.2.1 so I would be sure that microstats wouldn't have the same bug twice. In my response to your post, I mentioned $vbulletin->config['Microstats']['adminonly'] because vBulletin changes $config['Microstats']['adminonly'] to $vbulletin->config['Microstats']['adminonly'] later in the script but as far as anything in config.php is concerned, the variable is $config['Microstats']['adminonly'].


All times are GMT. The time now is 04: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.01675 seconds
  • Memory Usage 1,824KB
  • 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
  • (1)bbcode_php_printable
  • (15)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