Spam bombardment solved thanks to Bad Behaviour / Bad Behavior - Oh and I made a Log Reader Plugin

Note, I no longer use Bad Behaviour because of the wonderful Akismet. As a result I have no need to and won’t be maintaining this log reader. For a version that works with more recent versions of Bad Behaviour check here: http://www.jonathanmurray.com/wordpress/2006/07/08/. Also, if you make a new version please leave a comment so others that come here via Google will know, about it thanks.

I’ve received plenty of comment spam before, but over the past week or so it’s been really hitting me. I’ve been getting upwards of 100 spam comments per day. You won’t have noticed any on the site because they were all moderated, but man it was pissing me off to leave the computer for an hour and come back to a dozen or so “please moderate” emails. I tried out a few different plugins to try and solve my woes, but in the end settled on Bad Behaviour. I’m clearly not the only happy customer either, the post I just linked to has over 200 trackbacks.

Bad Behaviour has very successfully stopped the insane amount of comment spam that was overloading my inbox. There is just one MAJOR shortcoming of the WordPress plugin: It doesn’t display the logs in WordPress admin. Apparently it’s on the to do list, but since a privative log viewer for WordPress admin plugin would take about 10 mins to write, I wrote one.

It doesn’t display all the information Bad Behaviour logs, simply because it totally screws up the admin interface and most of it you probably don’t need to see anyway. I have chose the things I like to look at, but it is very easy to change. It’s very privative and easy to improve on, but I don’t have the time. If someone does improve on it, let me know.

Things that would be nice to add:

  • Paging
  • View more log info for particular entry
  • Delete items from the log
  • Probably more stuff as well.

Download it: Bad Behavior / Bad Behaviour Log Reader Plugin for WordPress

Installation

Just plop the unzipped file in your plugins directory, upload and activate. You can then check your log in the Options / BB Log Reader panel in your WordPress admin

Support

I don’t really plan to offer any support, because it’s so damn simple. If you can install and use Bad Behaviour then you should be able to do the same with the log reader. But please do leave a comment if you’re having trouble and I’ll see what I can do. Please also leave a comment if you improve it any, I’d like to offer any improvements you make from here as well (or at least link to your site - it’s all about sharing after all).

Change Log

0.2No longer throws an error if the log is empty.


12 Responses to “Spam bombardment solved thanks to Bad Behaviour / Bad Behavior - Oh and I made a Log Reader Plugin”


  1. 1 Rob

    Simon, you inspired me to install both Bad Behavior and your log reader. Thanks for your efforts! Unfortunately, I get an error on the foreach at line 27 of your script. I suspect it is because the log is freshly created and so empty. … I’ll have to wait and see what happens when I am spammed…
    Rob

  2. 2 Simon

    Hi Rob,

    You’re most likely correct. It’s a very quick and dirty script and I didn’t bother checking that the log table had some rows. I’m sure it won’t take long. :-)

    S.

  3. 3 Norm Gregory

    I am also getting the “line 27″ error.

    I assume you have to logging set to “TRUE” in BB script. Which I did turn on.

  4. 4 Simon

    Hi Norm,

    Yes, obviously you will need to turn logging on in Bad Behaviour or your log won’t have any entries to view. I have released a slightly updates script which will tell you if there aren’t any entries rather than just throwing an error.

    S.

  5. 5 Doncho Angelov

    Simon, Thanks for the plugin.

    I need to expand plugin’s code a bit, because I need more functionality.

    Since I do not see any license line in your file or here, you own the full copyright on the code.

    May I kindly ask you to allow me to build extended plugin, based on version 0.2? Please, send me an email, if you agree with that.

    Otherwise I will have to redo your work..

    Thanks again, good job!

  6. 6 Jonathan

    Bad Behavior 2.0 changed the database layout. Being a novice, I had to learn what I was looking at (PHP and MySQL), but I’ve hacked together what I believe to be appropriate changes to your plugin, including a little “chunker/truncate” function to display the really long blocks in segments that won’t ruin the layout of the admin panel. I’d be happy to share it, and plan on writing a little something on my own site to explain the changes. I’m still tweaking it, but so far, it works great!

    Thanks for the original, and the inspiration to adapt it to my needs.

  7. 7 Jonathan
  8. 8 Quix0r

    Can you please add htmlentities($some_variable, ENT_QUOTES) to make HTML visible in my admin area? This may drive my WordPress installation to a hack-able one because the attacker may include an image tag in his post. :(

  9. 9 Quix0r

    Opps, I didn’t read Jonathan’s blog. He has continued your work. But thanks anyway for this great software. :)

  10. 10 ysg

    asdf

  11. 11 Alfredo

    Its kinda hard of letting go of Akismet but I’ll give this a try on my other blogs.

  12. 12 Garry

    Akismet is activated on all of my sites powered by Drupal and Wordpress. It works excellent.

  1. 1 Matthew’s weblog » Spam troubles
  2. 2 ??????? » Blog Archive » Bad Behavior 1.2.3 ???
  3. 3 Jonathan Murray - News, comment, attitude » WordPress Plugins
  4. 4 Yowie’s World » Blog Archive » Installation of Bad Behaviour Plugin to stop Spam comments
  5. 5 Yowie’s World » Installation of Bad Behaviour Plugin to stop Spam comments
  6. 6 WP Plugins DB » Blog Archive » Bad Behavior / Bad Behaviour Log Reader
  7. 7 Erweiterung für Bad Behavior » Gedankenhabitat

Leave a Reply