Technology Tales

Adventures & experiences in contemporary technology

WordPress plugin for removing post revisions from database

29th July 2008

WordPress 2.6 added post revisions as a new feature that is turned on by default. In an earlier post, I described how you could control this by editing wp-config.php and there are a number of plugins that purport to provide the same level of control through the administration screens. Even so, I decided to look at things from the housekeeping side of things and create my own plugin for clearing the database of revisions at one swoop. Currently, it takes out all revisions but I am thinking of adding the facility for selecting which revision to keep and which to delete. It goes without saying that you should back up your database first in case anything might go wrong.

Download Remove Revisions 1.0

Technical considerations regarding the discussion aspect of blogging

18th July 2008

Technical considerations regarding the discussion aspect of blogging

When making a start in the world of blogging, there are so many things to consider that you almost need a trial run first to learn the lingo. In fact, getting up to speed by using a service like that offered by Blogger or WordPress.com seems a very sensible starting point. Even so, the business is like building a house in that you only really know what you are doing after you have done the deed and made all the mistakes. That is particularly true when you go down the self-administered blog route. For starters, it’s so easy to pick the wrong domain name or hosting provider. Selecting your blogging software is the next step, but that may not be so tricky; WordPress does a reasonable job and there’s always Movable Type, Expression Engine, Drupal (yes, really) or Habari.

That mention of blogging software brings me to something that I encountered recently: commenting functionality. I am coming around to the idea that this is probably something that needs to be considered up front because of the nature of blogging. After all, anyone who reads The Blog Herald regularly should be familiar with the idea of blogging conversations and that means that the technology to make it happen should be easy for visitors to use and easy for bloggers to administer. However, the two can collide. For one thing, there are a myriad of choices available to the blogger and the blight of comment spam is ever pervasive and growing.

When it comes to comment spam, it is best to realise that there are two sources of responses to a blog post: visitor comments or trackbacks (pingbacks?) from other blogs. I reckon that the latter is probably the channel where most of the detritus travels and various anti-spam solutions are on offer to curb its spread. Names from the WordPress world like Akismet, Spam Karma, Simple Trackback Validation and Bad Behaviour come to mind. The former can also be used, particularly when the unscrupulous make use of low-cost labour in low-cost countries, and that’s when the thorny questions of user registration and CAPTCHA‘s arise. There is something to be said for not going to extremes with these and just sticking with less onerous rules and filtering on the server side.

I must admit to having staggering into forcing visitors to register prior to adding a comment and then making them log in thereafter. I think that it’s for security reasons, but WordPress creates a password and then sends it to the person who is registering rather than displaying on a web page. That can create another problem: what happens if the email fails to arrive? In the last week, this has happened with a visitor to my hillwalking blog and there could be a number of reasons for the non-arrival of the relevant email. One is ironic: being an automated email, it gets stuck in the spam filters of the recipient’s mailbox and so never gets to them. It could also be a bug with WordPress itself (I have raised a ticket and I am awaiting what Automattic might have to say to it) or a consequence of some setting made by a hosting provider. All of that makes it hard to track down the cause of the issue but it kicks off other thoughts as to its resolution. One is to remove the needed for registration and logging in the first place, but there are third-party services that may help too. The former has turned out to be the case for this blog and it seems to be performing well enough so it is an acceptable option.

When it comes to using third-party comment handling systems, what needs to be considered is how well they work with your blog. For instance, I gave Disqus a quick whirl and soon realised that I needed to update the themes for my WordPress blogs if I were to use it on an ongoing basis. Otherwise, it worked fine but I was left wondering if it would have been better to have brought it in when I started a blog rather than part way through and with comments made using the existing WordPress functionality. There’s also Intense Debate and I am almost certain that there are more like it but I’ll be sticking with what WordPress offers for now. The theme for my hillwalking blog has been modified to allow prospective commenters to get in touch with me if they are having problems. That is only an interim approach while I consider what the way forward will be.

WordPress 2.6 out in the wild

15th July 2008

There was a time when I tested out a new WordPress release when it made its appearance but I now now keep tabs on development versions too. It helps me to be ready in ample time and avoid any ugly stuff appearing on either here or my hillwalking blog. On the surface, the changes made don’t seem so dramatic after the revamp of the administration interface that came with 2.5. Under the bonnet, a lot of bugs have been fixed and many behind the scenes features have been included for the first time. I’ll leave it for you to go to Planet WordPress or check out the relevant entry on the WordPress Development blog. You’ll find a Flash video tour of the latest version from Automattic below.

Of course, WordPress development doesn’t stop here and there are some considerable changes to the administration interface to come at some point if they ever make out into the mainstream from the crazyhorse branch. I’ll be continuing to keep an eye on how things go from here so as to be ready for whatever might be in the offing. For now, enjoy 2.6 but it’ll interesting to see where it all goes from here.

Some nice things coming through…

22nd May 2008

While everyone is making good use of WordPress 2.5.x, development continues apace for future releases of the popular blogging platform and there are some goodies coming through on the functionality front. Google Gears are being brought into play for speeding up the administration dashboard; this started out being more prominent before being made more unobtrusive. The other big change has been an overhaul of the theme gallery and, if the theme is compatible, an overview facility has been added too. So WordPress is being tweaked and improved in the background to make 2.6 an interesting release.

A spot of WordPress 2.5 administration panel colouration

23rd March 2008

The final release of WordPress 2.5 isn’t out yet but that hasn’t stopped me playing around with it and spotting a bug or two. Along the way, I have taken the chance to create a plugin that takes the old Earthtones palate into the new world. To accomplish this, I have taken the WordPress Classic colours stylesheet along with some template code from planetOzh and tweaked it accordingly. I may not have got to every possible nook and cranny for colouration but I hope to have covered most of them. You may even find it useful yourself.

Countrytones Screenshot

Download Countrytones

Alternatives to WordPress

26th February 2008

Movable Type was the leading blogging platform before Six Apart disappointed their users with their licensing and WordPress came into being. Now that WordPress would seem to be king of the hill, it’s tempting to conclude that there’s nothing else out there for those wanting a self-hosted blog. In fact, nothing could be further from the truth.

These days, Movable Type is available as an open source entity and I have been giving it a quick whirl. Importing from a WordPress export file is very swish and a quick spot of tinkering gets you a running in no time. Getting the thing set up can be a little confusing because the processing is done by CGI scripts and they need to live in your website’s cgi-bin directory while the actual blog is instantiated in another location. Aside from that complexity, things are not that offputting and the style of the administration and content management dashboard could show WordPress a thing or two. It’s partitioning of trackbacks from comments is another useful feature in this world pervaded by comment spam.

Habari is another option that I have encountered and it seems like early days for this one. The first impression that struck me was its minimalist feel but it will do most of what you ask of it when it comes to blogging. Nevertheless, importing and exporting is one area that needs more development and its handling of themes is a matter that warrants more exploration on my part. In summary, it seems to offer most of your needs, even if there is nothing to make it stand out from the crowd at this time.

I encountered another alternative platform in the pages of PC Plus called Expression Engine. It is commercial software but there is a free cut down version available without some of the modules. There is a bit more to the offering than blogging but you have to buy it to get features like wikis, forums and the like. As it happens, the blogging capability in the free version is creditable and it seems that you can manage multiple blogs through the same interface, a feature that has potential when it comes to using the software as a kind of CMS. It cannot directly import from WordPress but a Movable Type export file is accepted without a bother. With regards to changing the look and feel of the blog, I found that editing the index and stylesheet files through the administration interface produced good results quite easily and quickly. Maybe creating a new theme might be a worthwhile project to see how one can make a blog’s appearance fall into line with the other parts of a website. After all, Ellis Labs claim that the software should work the way that you do.

I only have done a quick spot of fiddling with any of the above but there is potential for further investigations to see what else they have to offer. I am sure that there are other alternatives and the CMS Drupal comes to mind for its having a blogging module, even if I didn’t find the main CMS functionality to be sufficiently flexible for my needs when I last tried it (a new version made it appearance recently); overly complex CSS was one bugbear for me. Even with all the possibilities, I won’t be spending too much of my time exploring this area. Suffice it to say, it’s not a completely WordPress world…

Keeping an eye on WordPress development II

22nd February 2008

I don’t know if this might become a series but a sequel to an earlier post might be a sign of things to come. I was pulling another version of WordPress from Subversion and noted a lot of updated files coming through, more than usual. Curiosity led to my having a look and there have been a few obvious tweaks. The most noticeable of these is that the Plugins portlet was now active, making its role clearer. The role? Apparently, it feeds a random selection of WordPress plugins from those included in WordPress.org’s own listings. It might be useful or an annoying diversion but we’ll see what comes; it is unconfigurable for now. Otherwise, the admin screens look a little sharper, especially to the ones for editing and managing content. I’ll continue to await the arrival of the ability to apply admin screen themes: its a "TODO" on the dashboard screen and could be interesting if it were to come about. We’ll see…

Keeping an eye on future WordPress releases

16th February 2008

While I haven’t mentioned WordPress in a while, it’s now heading for version 2.5 after 2.4 was skipped. Because I want to ensure that upgrading doesn’t cause problems for my blogs, I have been picking up nightly builds with Subversion from WordPress.org. The following is the command to be used and it works fine on my Ubuntu system in the folder where I want the WordPress installation directory to live. If you wish to find out more about Subversion, there is a free book on the web.

svn co http://svn.automattic.com/wordpress/trunk/

The main event is the new dashboard and that seems to be taking cues from Movable Type (I gave that a whirl recently so I may say something here about it yet). Everything is still there along with tantalising hints of prospects for customisation. In the interim, you can change the front page feeds so that they originate from other than the world of WordPress, not a bad thing given that I found WordPress Planet feeds were annoying often. Alternate theme support for the dashboard seems to be on the to-do list, as is something for plugins; we’ll see what comes of the latter. Otherwise, nothing seems to be changed or, more importantly, broken and I am able to get a mirror of my outdoors blog up and running with the only problems of any note coming from the new web address, not at all major. For now, I’ll continue to keep tabs on what’s happening and being forewarned of any future problems is a big bonus.

Update:

Recently, I found a good summary of what to expect on Blog Herald. This is one for a return visit, methinks.

WordPress update messages

27th October 2007

I have all sorts of messages littering my blog dashboard this morning telling me to upgrade to WordPress 2.3.1; I suppose that I’d better set to work with upgrading then. However, this is never something that I do without first testing on my offline blogs. And then, there’s the need to save some tweaks to WordPress source code ahead of time. I know that I could create my own plugins but that involves finding the correct hooks and it’s a subject for another time, anyway.

Changing the appearance of WordPress admin pages

15th October 2007

There seems to be a percolation of plugins that aim to change the appearance of WordPress administration pages from their day-glow blue to something more pleasing; Earthtones is the one that I use for this blog but I have also been known to use WP Tiger Administration as well. Both options work well, though the latter needs some adjustments to work as well with WordPress 2.3 as it does with the 2.2 line. One area that they both fail to influence is the appearance of the upload screen. It doesn’t help that upload.php, the underlying PHP script, is a dual purpose animal: used in an iframe in the post editing page and standalone for upload management. Curiously, you can only upload files on the post editing page and not on the upload management screen, a definite quirk. The thing that really stops these admin theme plugins gaining any sort of purchase with upload.php is that it also uses an auxiliary stylesheet, upload.css, that is called after the WordPress function hook has been defined; if it came before this, then the styles in upload.css could be overridden. You could edit upload.php and edit the replacement stylesheet but the former activity would require repeating at every WordPress upgrade. I chose to edit upload.css and will keep that is a safe place so that I can replace the file following an upgrade. If upload.php was treated like every other admin script, then this would be unnecessary. A useful suggestion for Automattic, perhaps?

  • All the views that you find expressed on here in postings and articles are mine alone and not those of any organisation with which I have any association, through work or otherwise. As regards editorial policy, whatever appears here is entirely of my own choice and not that of any other person or organisation.

  • Please note that everything you find here is copyrighted material. The content may be available to read without charge and without advertising but it is not to be reproduced without attribution. As it happens, a number of the images are sourced from stock libraries like iStockPhoto so they certainly are not for abstraction.

  • With regards to any comments left on the site, I expect them to be civil in tone of voice and reserve the right to reject any that are either inappropriate or irrelevant. Comment review is subject to automated processing as well as manual inspection but whatever is said is the sole responsibility of the individual contributor.