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;

WP and Smarty

As I mentioned before I’m working on integrating b2++ and WordPress. To that end I’ve started on Smarty Template support and just this evening I checked in a few changes to WordPress CVS.
From my limited experience of sf.net CVS, it could be a few days before anon CVS will get those changes but watch out for them if you’re interested in that sort of thing!

The future of b2++

What’s happening? You’ve no doubt noticed updates from time to time on blogs.linux.ie but no new release has been made in a long time, despite the fact that comment moderation and referer tracking is now in.
Spurred by Geoff (finally, sorry!), and others who have mailed I’d like to fill in some of the blanks:

  1. b2++ will most likely be consumed by WordPress. AFAIK, I’m the only user of b2++ on the WP dev team, so making the transition from b2++ to WP painless might be more trouble than debugging b2++ install problems for Windows users!
  2. After I released a mod for WP that added Smarty Template support there was a trickle of interest but I got bogged down by trying to do too much at the one time (making WP multi-blog aware) and I burned myself out. That and the fact that my personal life has been in major upheavel for the past 2 months. A few people know why I posted “Nothing Today” a month ago…
  3. I volunteered to help with WP, but frankly, the prospect of redoing the same work I did for b2++ is daunting and just a little bit uninteresting for me. Note the word, uninteresting – that’s a powerful motivator in a volunteer project. I know things things can be done better in WP as I’ll be able to knock ideas off the heads of the other WP developers.

Will there be another b2++ release? Not likely, fork it if you like, but chances are good that WP will have many of the features of b2++ in the next few months.
If you need a community blog site, then go for b2++. In the future I want to make WP as compatible with b2++ as possible, thus providing for an upgrade path.