This page is sponsored by:
10/10 spots available | Order a Link now | Our Sponsorship Program
Overview:
This is a plugin to display number of blocked access attempts of Bad Behavior Plugin.
Original mysql function for BB1.5 is by Mark, while the function for 2.x is from the Bad Behavior source code.
Requirements:
- WordPress 1.5 or above
- Bad Behavior Plugin 1.x or 2.x
Installing
- Download Bad Behavior Stats Plugin.
- Upload
bb_stats.phptowp-content/plugins/folder. - Activate the Plugin in WP-Admin.
- Goto Options > BB Stats. If you are upgrading from an earlier version, it is recommended that you click Default Options so as to clean up any old options.
- Add
<?php if (function_exists('bb_block_count')) bb_block_count(); ?>where you want to display the stats or enable the same from the Options page.
The Function:
bb_block_count()
The following options can be set through Options > BB Stats:
- $bb_no_of_days - the number of days you set the $wp_bb_logging_duration variable in
bad-behavior-wordpress.php. Default of both variables is 7. Applicable only for Bad Behavior 1.x - $add_footer - Automatically add stats to
wp_footer()if the template contains the code of it. - $wp_dash - Enable widget for WP-Dash. Will be displayed only if you have WP-Dash installed.
- $str - This is a textarea in which you can enter the text you want displayed on the site.
Customizing:
Add <?php if (function_exists('bb_block_count')) bb_block_count(); ?> where you want to display the stats.
It will display something like:
BBStats report: Bad Behavior has blocked 84 access attempts in the last 3 days.
Note: Using if (function_exists('bb_block_count')) in the above code ensures that your blog won’t break even if you deactivate the plugin.
You can customize the text that will be displayed by using the following:
- Use %count% to display the number of block attempts.
- Use %days% to display the number of days ($bb_no_of_days).
- Use %bburl% to display a link to Bad Behavior page.
- Use %bbstatsurl% to display a link to Bad Behavior Stats page.
- Use %totalcount% to display the total number of access attempts. (Only if verbose logging is enabled for Bad Behavior)
The default value of the text area is:
<br />%bbstatsurl% report: %bburl% has blocked <strong>%count%</strong> access attempts in the last %days% days.
Feel free to modify it as you please. However, I do request you to mention both %bbstatsurl% and %bburl% in the text so as to add a link back. It is not mandatory, but highly appreciable
Additionally, Bad Behavior Stats also comes with a widget for WP-Dash that will allow you to display the statistics on the dashboard that WP-Dash creates. WP-Dash is a good alternative to the current WordPress dashboard. It is available as a plugin and is currently in beta state. Since, the author of it requested me to embed the widget code into my plugin, I guess I’m among the first authors to create a widget for WP-Dash.
I have also made available the function bb_block_count_noecho() which has a return value instead of a echo. You can use it as follows:
$str = bb_block_count_noecho();
echo $str;
Lastly, you can reset to default options by clicking on Default Options. I recommend you do this once during upgrade if you are upgrading from any older version as it will clean up old variables which the plugin used.
ChangeLog:
- 2.1
- Link to Bad Behavior homepage fixed
Titleattributes added to the BBStats and Bad Behavior Links- New variable
%totalcount%added for displaying total number of access attempts if verbose logging is enabled. - Now, admin functions and wp-dash functions are only declared if on the admin page and if wp-dash is installed respectively, thereby saving on processing time.
- 2.0 - Compatibility Update
- Plugin now works with Bad Behavior 1.x and 2.x
- Only counts the number of blocked attempts.
- Number of blocked attempts can now be viewed under Options >> BB Stats as well.
- Few miscellaneous fixes
- 1.6 - Made compatible with Bad Behavior 1.2. Now counts both 412 and 403 errors.
- 1.5 - Yet another major update. You can now customize the text directly in the options panel. No more editting the plugin file. The code also has a widget for WP-Dash which will let you display the stats on the dashboard.
- 1.4 - Big Update. Code added to template may need to be updated. Now all options are settable through Options >> BB Stats.
- 1.3 - Mandatory Update.
- Fixed the plugin to work with 1.1.2 of Bad Behavior.
- Fixed the Cannot find table error that was being generated.
- Now checks if Bad Behavior is installed / activated and generates the appropriate message.
- Few miscellaneous fixes
- 1.2 - Major change. Code added to template needs to be updated.
- Added two more variables to the function viz. $bb_no_of_days and $only403.
- You can now modify $add_footer in the plugin file to choose if you want to display the stats automatically in wp_footer.
- Simplified install and upgrade as now you don’t need to edit the plugin file (unless you want the plugin to automatically insert the stats in footer).
- 1.1 - Fixed a bug where number of days was not being displayed.
- 1.0 - Release
To Do:
Pass $bb_no_of_days as an argument to the function(done with v1.2)Variable to enable/disable automatic addition of stats to(done with v1.2)wp_footerOptions configurable in Admin > Options(done with v1.4)Fetch and display the blocked access attempts’ details in WP Admin(done with v2.0)- WordPress Widget Support
- Count total entries in the table
Downloads
Current Version is 2.1
Support the Development
I’ve spent a good deal of time and money developing and maintaining the plugin. If you like the plugin and find it useful and would like to donate something for my work please do click the Paypal Donate button below. The payment is secure. I haven’t filled in any amount. Feel free to donate what you please. Any amount is welcome. Thank you ![]()
License
All files and their contents are licensed under the GNU General Public License (GPL).
Questions or Bugs
Known Bug
Wordpress 1.5 (Strayhorn) has a bug which prevents multiple plugins from creating administration interfaces at the same time. If you have another plugin which creates an administration panel under Options, temporarily disable it, configure BB Stats, then re-enable the other plugin. Once configured, BB Stats will operate normally.
If you have any questions or would like to report any bugs then please use the support forum.
The comments from the past version of Bad Behavior Stats have been archived.
Related Posts
- Bad Behavior Stats Plugin
- Bad Behavior Stats v1.2
- Bad Behavior Stats v1.3
- Bad Behavior Stats v1.4
- Bad Behavior Stats v1.5
- Bad Behavior Stats v1.6
- Bad Behavior Stats v2.0
- Bad Behavior Stats v2.1
- Post on WordPress Support Forum
- Bad Behavior Stats in the WordPress Admin Dashboard
31 Total Responses to “ Bad Behavior Stats / Bad Behaviour Stats / BBStats Plugin for WordPress ”
Comments:
Trackbacks & Pingbacks:
-
Pingback from Bad Behavior Stats v2.0 » Ajay - On the Road called Life!
July 21st, 2006 at 9:48 pm[...] Read more and download the plugin>> Why search for it when you can bookmark it?These icons link to social bookmarking sites where readers can share and discover new web pages. [...]
-
Pingback from Weblog Tools Collection » Bad Behavior Stats v2.0
July 21st, 2006 at 9:57 pm[...] Read more and download the plugin>> tagged bad behavior, bad behavior stats, bad behaviour and stats Related Posts from the Past: [...]
-
Pingback from Weblog Tools Collection » WP-Plugin: Bad Behavior Stats v2.1
July 27th, 2006 at 9:12 am[...] Read more and download the plugin>> tagged bad behavior, bad behavior stats and bad behaviour Related Posts from the Past: [...]
-
Pingback from Attack of the Bots! at Atsutane Dot Net
August 4th, 2006 at 9:36 pm[...] Attack of the Bots! Published 1 day ago - 0 Views in Software and Wordpress. BBStats report: Bad Behavior has blocked 93 access attempts in the last 7 days. [...]
-
Pingback from Protect your Wordpress blog from Spam » Technology News, Computer, Security, SEO Discussion, Blogger Hub
October 6th, 2006 at 9:52 pm[...] Preventing spams is an important thing to do and here’s what you are supposed to do to avoid your Wordpress blog from getting hit by spammers. Since the first time using the Wordpress blog, I have found two very effective plugins which do the job very well. One is Bad Behavior and the other one is Spam Karma. I am currently using Bad Behavior on my blog. Optionally, you can add the Bad Behavior Stats Plugin to display the number of blocked attempts on your blog. [...]
-
Pingback from No more bad behaviour! at Flex Daddy
October 20th, 2006 at 7:05 am[...] Hopefully I’ll have no more spam (or at least minimal spam) to deal with, as I have just installed Bad Bevahiour 2 and the BBStats plugin for WordPress. It was just getting out of control! And to it’s credit it has already blocked 26 malicious attempts including a few spam comments. I’ll leave it running for a few weeks to see how it goes, but if you have any trouble accessing flexdaddy.info or posting a comment please let me know by sending an email to andrew [at] flexdaddy [dot] info. Filed under: General | [...]
-
Pingback from Peekaboo / truly thankful
November 28th, 2006 at 9:08 am[...] Wow and wow is all I can say about the Bad Behaviour plugin. Simply put, it kills spam dead. It stops the spam before it gets logged as a hit (and to the wp_comments table, I think). It rocks and I am so glad I am using it together with my Spam Karma plugin. It’s been over 3 days and SK2 has caught just 4 spammy comments since I turned Bad Behaviour on. Ordinarily, I would have been hit with a never-ending stream of ugly sites. I’m using Ajay D’Souza’s Bad Behaviour stats plugin, but I will turn it off because I thought it would provide detailed stats in the admin interface. I don’t want to create a page to display my stats to the public. Also, I think the spam comments that are slipping through are being stripped of the links. This is when I review the caught spams from the Spam Karma admin panel. I don’t know if that is thanks to Bad Behaviour too or not. Anyway, I didn’t get a whole lot of work done today. I did take care of administrative business like getting some paperwork in before the deadline struck (i.e. tomorrow) and printing a whole bunch of crap just to look busy. I had a meeting with my T and my group today which was alright. A bit much for one day, but I needed to hear it. It just struck me that December is around the corner and I literally had to pinch myself. Next thing I know, 2010 will be around the corner. It feels really surreal to have been away from my family for this long (going on 5 years in a month’s time). There’s only so much pictures can tell you about people and pictures haven’t done justice to bringing back the feel of family for me. [...]

July 26th, 2006 at 4:34 am
w00t!!! It is ready! Ajay, you rock! I’ll be installing this in a few seconds!
I will try sending a small donation to you in the next few days, I respect the work of software developers and recognize all the work and effort you guys put in your work. Whenever I can, I try to help.
Again, thank you so much! Way cool!
July 26th, 2006 at 4:49 am
Installed and your plugin works like a charm! Bravo!
July 26th, 2006 at 6:37 am
As I promised
Thanks in advance for the donation, really will help now that I am going to be unemployed for quite a while. (ok this is shameless)
July 26th, 2006 at 8:04 am
thanks for the plugins but. I have problem when installed it.
It display message “Please install / activate Bad Behavior”
I has installed bad behaviour 2.0.1 and bad behaviour stast 1.6
Wheri did wrong on installation?
Thanks
July 26th, 2006 at 8:12 am
ah sorry. i miss the ver. 2.0. now with ver 2.0 is working great
July 26th, 2006 at 9:11 am
Now can you please fix the URL for Bad Behavior? Thanks
July 26th, 2006 at 12:35 pm
Hi Michael,
Didn’t realize the change in the URL. Will release an update with the new URL
August 3rd, 2006 at 11:09 am
The plugin works like a treat! Thanks again guys!
May 9th, 2007 at 3:36 am
I wonder can I combine Bad Behaviour with Akismet on my blogs powered by wordpress?
May 9th, 2007 at 6:44 pm
Just install both Garry
May 31st, 2007 at 11:22 pm
Exactly what is this plugin supposed to do? I’m looking at plugins but this page seems a little vague (even with all the copy!) Maybe I’ve been up for a little too long!
July 10th, 2007 at 4:26 pm
Ajay, does it work ok with WordPress 2.2.1?
July 10th, 2007 at 5:59 pm
I’m not sure about this. Haven’t had the opportunity to test it. Are you noticing any discrepancies?
July 20th, 2007 at 3:44 am
I have a problem with Wordpress 2.2.1, has someone it running with this wp version?
August 6th, 2007 at 11:55 am
How to use $add_footer to a custom made template?
August 6th, 2007 at 11:57 am
I am using it with WordPress 2.2.1, and no problem
August 13th, 2007 at 4:02 pm
For now, I am sticking with Akismet only. Once the comment spam goes up, I’ll probably start using bad behavior as well
September 11th, 2007 at 8:58 pm
I’m using it 2.2.1 too. All fine. So Marс it is running with this version.
September 24th, 2007 at 11:01 pm
Ajay, does it work ok with WordPress 2.2.1?
September 24th, 2007 at 11:19 pm
I believe it does
October 1st, 2007 at 7:58 am
Julian, for me it works with WordPress 2.2.1
October 4th, 2007 at 11:23 am
Nice plugin thanks a bunch for this, currently I have been using askimet to help with comments, which is good but I am look at other moderation solutions also.
October 8th, 2007 at 6:59 am
Ajay, does it work ok with WordPress 2.2.1?
October 8th, 2007 at 12:45 pm
I haven’t tested it with 2.2.1 or above. However, technically it should work. If you notice any problems, please do let me know…