February 24, 2005

Backtracking on those trackbacks …

No sooner had I converted my site over to use WP 1.5 (after making the earlier entry about planning to do so), I got hit by one of those bits of new trackback spam – ugh! My first reaction was that perhaps the new trackback and pingback blacklisting features that I’d added to WPBlacklist weren’t working anymore due to some change in WP 1.5 (I had actually done the work before WP 1.5 was released …). I had almost gotten my development stuff ready to debug the code when I thought to go back and check on the trackback spam I’d received. Turned out that they’d come up with yet another variation on "texas holdem" – in their case, it was texas hold’em -. My initial reaction was to simply add an entry to the blacklist for the new variation and go on but then I decided to check how many entries I had in the blacklist for just the word texas and I was amazed to discover that I had over 300 entries! So I decided to come up with a regular expression which would catch all variations of texas holdem and after a little mucking around, the final masterpiece was "texas.*?hold.*?em" :p

Of course, the above may identify some benign stuff as spam as well but for the moment, I don’t care – I will deal with it when it happens :p (Oh if anybody is going to comment on this entry, you’d better not use the words texas holdem :p) I then set about deleting all the individual blacklist items which would be replaced by the regular expression and discovered that I could remove 316 items! Of course, I don’t know how many (probably all) would come back when I next update from Jay Allen’s central list but for the moment, I am happy the way things are 🙂 And the icing on the cake was just as I got done deleting all those 316 items, a new e-mail comes in saying that a comment was automatically deleted by WPBlacklist. The offender? The self-same guy with that new variation on the dreaded texas poker theme – gotcha sucker!! :p If anybody is eagerly awaiting the new WPBlacklist, I am happy enough with the way it is working at the moment (and what better way to test than in a production environment? :p) and so just have to make the necessary documentation changes, pack it all up, update the WPBlacklist page and then upload it. I promise that I’ll do that sometime tonight 🙂

Tags: , ,
Posted by Fahim at 4:26 pm  |  7 Comments

Pressing Updates

The next big release of WordPress, WP 1.5 code name Strayhorn, was released last week and unfortunately, they broke some of the stuff as far as plugins went 🙁 Since I use my own WPBlacklist plugin to safeguard against comment spam on this site, that meant that I couldn’t upgrade to WP 1.5 just yet. Of course, in the meantime, I’ve been getting inquiries about when I would fix WPBlacklist so that it would actually work with WP 1.5. I was planning to do all of this over the wekend but unfortunately, I got caught up in a different coding project – one involving C code and mingw32 … so lots of fun there :p – and so couldn’t do what I had originally planned to do – which was install WP 1.5 and get WPBlacklist working with it.

Yesterday, I finally decided to take the plunge and do the work even if I didn’t have enough time to work at it as I would have over a weekend. Of course, I didn’t install WP 1.5 on this site since I didn’t want to have to do without WPBlacklist in case I couldn’t get things working immediately – instead, I installed it on my development machine and I should say that the upgrade process went very smoothly. It wasn’t as painful as I’d thought it would be since they’d added a new template feature to WP in 1.5 and I had thought that I might have to redo the template for my site all over again. Actually, it wasn’t that hard at all. All I had to do was remove a few lines from my old template, replace a few lines and move it to a new location and I was done 🙂 The WPBlacklist changes weren’t that smooth though :p

Initially I was stumped because I wasn’t seeing errors where I was supposed to see errors – or at least, was expecting errors. So I spent quite a bit of time trying to figure out why I wasn’t seeing errors. Finally it turned out that the errors weren’t where I thought they would be :p In short, I spent a good hour running around in circles. Finally, once I got past that bit, I was able to make the code changes in a very short time and get things working. However, I am not too confident that I’ve caught all the little things that need to be fixed and so am taking another day to go through it all and to fix up the code, spruce up the documentation and so on. Then I’ll probably upgrade the site, install WPBlacklist here and see how it goes. If all goes well, then you should see the new plugin available for download in a couple of days – I promise 🙂

Tags: ,
Posted by Fahim at 10:49 am  |  4 Comments