Version: 1.2.1, by ShiningArcanine
Developer Last Online: Nov 2023
Version: 3.5.4
Rating:
Released: 06-10-2005
Last Update: 06-08-2006
Installs: 680
Uses Plugins
No support by the author.
This is a derivative of Erwin's microstats hack for vBulletin 3.5.0's plugin system. The main difference is that by default it shows the page generation time and query count to the public. Server loads and Uncached Queries are shown only to administrators.
I had sent this to Erwin so he could release if he wanted to but instead he told me that I had permission to release it; hence why I am releasing it.
This should work with vBulletin 3.5.0 RC 1 through vBulletin 3.6.1 and later.
Installation is very simple. Just import the plugin via vBulletin's "Download / Upload Plugins" page in the Plugin System in the Admin Control Panel and you're done.
I'll try to correct any bugs that you find. Let me know if you like this plugin and don't forget to click the install link if you install this.
Optional config.php Variables
$config['Microstats']['replacementvariable']
Setting this variable will make microstats place its data before any instance of whatever you set this variable to. Be careful with this as you might see microstats in mutiple places. My suggestion is to use a unique comment in the HTML source to prevent any issues.
E.g. $config['Microstats']['replacementvariable'] = '<!-- display microstats here -->';
$config['Microstats']['adminonly']
Setting this variable to anything will make microstats display itself only to administrators.
E.g. $config['Microstats']['adminonly'] = true;
Update History
Product File: Uploaded a product file that replaced the plugin file.
Version 1.2.1: Fixed a bug that broke optional config.php settings
Version 1.2.0: 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
Version 1.1.0: Added names of uncached templates, included a bugfix for people who don't have proc avaliable on their system and made the code look a little nicer as well
Version 1.0.1: Bugfix for Windows users, sanitized the code to make it look nicer
Version 1.0.0: Initial Release
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
This was showing in my Admin CP redirect message when I logged into the Admin CP until I moved it up above the copyright message in the footer. Now it doesn't show in the redirect message any more. Is it supposed to work that way?
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'].
Someone knows if the queries executed by attachment.php and image.php are counted as well to the number of queries? Thanks.
No, it is only for the page. Any queries that anything the page links to makes won't be included in the figure.
Quote:
Originally Posted by Boofo
This was showing in my Admin CP redirect message when I logged into the Admin CP until I moved it up above the copyright message in the footer. Now it doesn't show in the redirect message any more. Is it supposed to work that way?
That would make sense as it looks for the body closing tag by default. When you changed the behavior, you probably didn't add whatever you configured microstats to look for to the redirect message.
No, it is only for the page. Any queries that anything the page links to makes won't be included in the figure.
That would make sense as it looks for the body closing tag by default. When you changed the behavior, you probably didn't add whatever you configured microstats to look for to the redirect message.
Ok, that makes sense. I added the line in the config file and told it to look for <!--display microstats here --> and put that above copyright in the footer. That is why it isn't showing up there now. Too bad, though, it was nice to have it there.
Ok, that makes sense. I added the line in the config file and told it to look for <!--display microstats here --> and put that above copyright in the footer. That is why it isn't showing up there now. Too bad, though, it was nice to have it there.
You'll have to modify the template that handles that if you'd like microstats to display its data there. I think the template is STANDARD_REDIRECT but I'm not sure.
You'll have to modify the template that handles that if you'd like microstats to display its data there. I think the template is STANDARD_REDIRECT but I'm not sure.
It's not a big deal, I guess. Thanks for clearing it up for me though. Works great! I might even add some more stats to it for my own board.
What do I have to do to get the stats/load to only show for my userID? I'm not sure if I can just wrap a "<if user =...>" conditional around the plugin xml without breaking anything.
What do I have to do to get the stats/load to only show for my userID? I'm not sure if I can just wrap a "<if user =...>" conditional around the plugin xml without breaking anything.
There are two ways that would work off the top of my head but the best of the two would be simply to modify the plugin and wrap it in an if() statement that contains the appropriate agrument.
I'm not really sure how this whole plugin stuff works.
What you are saying is that all plugin xml is pasted into the same spot? Yes, then it would work to just wrap an if-statement around it. I'll try and let you know the results!