WordPress Plugins

New Note (20 Jul 07): Mr. Mist has improved on my and Simon’s work – his version can be found here, please give it a look!

NOTE: This post now contains the latest version alluded to in the comments – it can be copy/pasted from below, or downloaded in .ZIP format here.

Since moving to my new host and installing WordPress, I’ve spent a LOT of time looking at and installing plugins. One that I’m very happy to be using – after years of having to manually block and delete comment/trackback spam – is Bad Behavior. The one downside (or upside, depending on how informed you want to be!) is that it all works “behind the scenes”, and there is no easy way for the user to see what the program has been doing.

I came across the Bad Behavior Log Reader, and immediately downloaded a copy – but alas, it was written for an older version of BB. Fortunately for me, it was not complicated, and despite my complete lack of knowledge of MySQL and extremely limited (but growing daily!) knowledge of PHP, I was able to massage it into a form that works for the current version. I even added a little bit of functionality to make the output more user-friendly.

I left a comment on the original author’s board explaining this, and mentioned I’d post about it here in case anyone wanted to use and/or expand on my changes, so… with no further ado, here’s the code:

(Note: If you’d like my version of this reader, please use the download link (here’s another, if you missed the first).

14 Comments

  1. Hi Jonathan,

    Well done for continuing the development and thanks for the back link. I don’t use Bad Behavior any more which is why I’ve stoped development and am happy for you (or anyone) to take over.

    To be honest I’m surprised the author of BB itself haven’t taken the time to add a log reader.

    Cheers,
    Simon

  2. sorry to disturb you with this silly request but something is wrong. I copied your code and pasted into my online plugin editor and it went wrong. I tried pasting into my ssh terminal directly into the file but it seems something is wrong with the text encoding, during copy and paste it converts this

    get_results(“SELECT * FROM “.$table_prefix.“bad_behavior ORDER BY id DESC”)): ?>

    into this:

    get_results(.SELECT * FROM ..$table_prefix..bad_behavior ORDER BY id DESC.)): ?>

    could you maybe make another version, downloadable as phps or give me a hint how to copy your source code into my file??? I am totally at a loss I am not sure how to prevent this happening.

  3. I downloaded a free php editor now and although the copy process from firefox to the editor and then to the uploaded file is ok, I get different errors: the last one was: Parse error: parse error, unexpected T_STRING in /var/www/web3/web/wp2/wp-content/plugins/bad-behavior-log-reader.php on line 69

    and I cannot detect any error with my rudimenary coding skills.

    could you please mail me the working php file or make it available for download?

  4. Emailed you a copy of my own working version just now, which is slightly modified from the one here. I’ll look into making a clean version available for straight download to help avoid those problems for others.

    Thanks,

  5. Pingback: Leserblog der HNA

  6. I think I must have had the same thought-process as you, just a year later. And this time, when I went looking for a Bad Behaviour log reading plugin, I found your version.

    Anyway, I updated it because I fancied it to look a little smarter, and uploaded the results in my very first plugin. 🙂

  7. Pingback: Bad Behaviour Plugin » Wordpress Plugins

Comments are closed.