Spammers have been busy!

The spammers were busy last night and this morning! I received some 20 comment spams and notifications are still coming in. So, now when you go into the comment moderation page, when you “delete” comments, they actually are deleted from the database now.
To delete old comment spams simply open up the “Deleted Comments” page and hit “Submit All”.
So, to the spammers.. don’t bother. You’re not going to get through here!
Later.. On suggestions from Pronnsias I modified the Comment Validation page further and put the comments inside textareas, and added links to the New, OK and Delete header fields. Clicking on them will auto-select the associated checkboxes. A Javascript error occurs but it still seems to work, in Mozilla at least.
Later still.. Until the storm of comment spam drops off, notification emails are disabled. Check the Comment Moderation link during the day if you see comment number increase during the day!

b2++ – 0.8

Finally, a new release of b2++! This is a minor release, putting the features we’ve been using here on blogs.linux.ie into a release for wider distribution!
New in this release:

  • Comment Moderation: Every comment, pingback and trackback must now be validated before they’re displayed. Bye bye comment spam!
  • Referer Blacklisting: You can add any referer in your backend to a blacklist. The next time someone visits from that site the referer doesn’t show up on your site.
  • Minor bugs with the smilies in b2edit.
  • Added Pirate Speak plugin by Dougal Campbell.

If you’re upgrading from b2++ 0.7, then download the upgrade package and copy the src/ directory into your b2++ install and run the upgrade script. That’ll update your database tables properly.
New users should of course download the full b2++ package.

New users: b2++ 0.8 tar.gz | zip
Existing users: b2++ 0.7 -> 0.8 upgrade tar.gz | zip

B2++ Referer Blacklist

I’ve just added a blacklist to the b2++ referer system.
It’s fairly simple. If you see an evil referer appearing on your page simply go to the referer admin page, select the checkbox next to that URl and hit the “Add To Blacklist” button.
I’ve briefly tested it and it seems to work fine, but if you encounter any problems please leave a comment here or email me at the usual address.
Now to blacklist that medication site that linked to me…

Smarty editor and theme chooser for WordPress

I’ve ported the Smarty template editor and theme chooser from here to WordPress. It’s available to download as a tarball.
Warning! This is highly experimental code. It will nuke your current WP installation so install it on a testing server. It’s not ready for public consumption, it’ll give you food poisoning, it’ll make bad things happen, it’ll cause massive problems for the .. oh, just try it on a test server, don’t use it on a production server at all.
Here’s the mail I sent to wp-dev last night:

What this adds:
1. Smarty template aware editor. This editor makes automatic backups of your template. To restore a previously edited template just click 1-5 next to the template name and save that template again. It’s a FIFO queue..
2. Template picker/chooser. The default WP template is there as well as “Blue Dash” that I did for b2++. Click on the “Use this theme” link to use the selected theme.
3. Smarty is included, so you don’t need to download that if you haven’t got it.

Anyway, here’s what you do with this lot:
1. Don’t install this over your current live WP installation as it’s only for testing!
2. Download the tarball. It creates a wp directory so move stuff around if you have to. Files should be overwritten, so backup, backup, backup!
3. In the wp-blogs/main directory you’ll want to chmod 777 the templates_c smartycache templates directories and chmod 666 templates/*
Fire up your browser and point it at your WP install!

cd wp-blogs/main/
chmod 777 templates_c smartycache templates
chmod 666 templates/*

Idea: Blog Gallery

Here’s something I sent to the WordPress dev list this morning…

Anyway, this morning after a hectic night taking some 250 photos of a friend’s band at a Christmas party it I was wondering how best to blog the best of them. Here’s what I thought of:
The blog entry will have a number of thumbnails (could be automatically created when the large size images are uploaded), and a space underneath, perhaps filled with the first image.
If a user clicks on one of the images then that image is displayed below the thumbnails via javascript. It’d be handy to have a “display all” button too (“dummy” <IMG src..> tags could load “blank.gif” or something until needed)

The Javascript bit is easy, it’s just changing the image src attribute, the PHP is easy. Making it easy for the potential user could be the most difficult bit. Hmm, that custom fields plugin could be handy!

The site was down this morning..

This weblog was out of service for a while, but I fixed the problem – the site error.log gave unusual errors about reading xml data. The only place I use xml is in reading data from blo.gs for my blogroll.
Unfortunately their site is down at the moment and their xml feeds are unavailable.
I never checked if the “fopen” to connect to their server succeeded, so when the routine tried to read data in it barfed. Here’s a quick fix to function.blogroll.php if you have the same problem:

Line 49:
if( $blogroll_remote_fp == false )
    return false;