Archive for Site Updates

Those who host their sites on my network for free in exchange for a link back to this site (and a pint or two) got a bit of an upgrade last night with near unlimited bandwidth and a doubling of available disk space.

This was possible in part due to a number of domains on my hosting list having lapsed thus freeing up space for those who still have active sites.

If your domain is one of those that has lapsed the hosted content has now been backed up and removed from the server with the files available on request. If you choose to re-register the domain and still wish to be hosted you can get in touch.

Now is also a good time to ask people to check their back links; there are a number of offenders in this area but usually this arises though inadvertent omission such as during a re-design or theme change.

Finally a quick reminder to ensure that your installed applications are kept up to date (there has been a WordPress update recently that not everyone has installed) and above all, happy blogging and enjoy the free hosting!

It will not be a surprise to some that I have bought yet another domain name, but this new one is a little bit special.

When tweeting we’re all accustomed to the shortening of URLs, most commonly using bit.ly, but in this day and age, personalisation is all the rage and can have important implications.

Lets say for example that someone posts a link to the BBC on twitter via bit.ly. Their service helpfully translates their URL so that it appears as bbc.in followed by the short code. That way everyone knows, that when they click on the link, they will end up at a site owned and operated by the BBC.

As well as inspiring confidence to click the link, origin is also transferred through re-tweets. What do I mean by that? Well, say I post an article and tweet about it using a bit.ly link. It is only once a user has clicked the link that they necessarily know it’s my article. Before that in the mind of the user, the article could in fact have originated from any twitter user who happens to have included the link in their tweet. Thus by having my own short code domain, my linked-to content can always be traced back to me, however a reader may have stumbled upon the link.

All well and good you might say, but does this really justify the expense? Well perhaps not, at least on it’s own. You see when you own and control a short code domain you can do clever things with it. For example, if I post a video on my site and link to it with a short code, the user must first traverse from short URL, to site, then in turn to video. What I can do if I own the short domain however is to make the short URL the actual permanent link for the content and save the user some hoop jumping. While I haven’t got a strategy for implementing this kind of thing yet, it’s certainly nice to have the option of doing so in the future.

The question you’re all asking then, why the .sh extension? Well, seeing as the .uk extension is not available for registration as a TLD I needed a suffix that both identified myself with the United Kingdom but also which was something related to me or my field of work; .sh does both of those things.

The domain suffix belongs to the island of Saint Helena, a British Overseas Territory and as an added bonus the .sh file extension is well known in the Linux and Unix world to denote a shell script which is quite possibly the most versatile way of accomplishing both manual and scheduled tasks on the platform. As an avid supporter of open source and long time Linux user, this fitted the bill perfectly.

So finally then, when you see a kjo.sh link, view it with trust – it will ALWAYS link you to a site under my control and you have my personal assurance that content served up from such sites will be safe. The root of the domain with no short code attached will form a permanent link to this article thereby explaining to the uninitiated who the short domain belongs to and proffering an explanation as to how and why it came into being.

I’ve added a thin navigation bar to the top of my site. This is partly because it was suggested by a couple of people at WordCamp who thought it would make certain parts of my site more prominent but also because I soon intend to cut down on side bar clutter and in the process develop a more dynamic homepage with more of my latest updates right there at your fingertips.

Twitter, Facebook and other social networking mediums are becoming more widely used than ever so I hope to integrate more of my content out there with what I post here; there are a lot of disjointed updates from me at the moment. Photos too are a big part of my updates here and I’d like to make them much more visible, in addition I want to emphasise that I value input from forum users about my open source software so I will look into making some of those posts more available too. Watch this space!

After a brief hiatus concerned with moving this site onto a new server and the excitement that brings (lost files, configuration issues, corrupted databases etc.), I’m back on the blog.

Regulars will notice some missing posts, about 2 weeks worth. This was due to an rsync accident prior to migration which resulted in my having to fall back on one of my full weekly backups, which just so happened not to have run last week.

Still, I should be thankful – I’ve seen bloggers lose their entire site with no backups and have had to start from day one. By comparison 2 weeks of data is nothing.

I would however still like to apologise to those who have lost forum posts and article comments. If you were waiting for a reply I advise you re-post as I have no record of ever having received your query. Users who registered on the forums in the last 2 weeks will have to re-register too.

Here’s hoping this site will see many good years of trouble free service in it’s new home!

Readers probably wouldn’t have taken much notice of the recent photo posts here and here on my site. The thing is though, these are a result of a bit of ingenious behind the scenes code that allows me to snap a picture with my BlackBerry camera and blog it in seconds thus allowing me to start a photo blog category that comprises of quick snippets with a photo for when a picture is more appropriate and I’m no where near a computer.

The real power behind this is Flickr but as those who know me will testify, I don’t like to use external services that take people away from my site, so I devised a way to bring the convenience of mobile Flickr uploads to my blog rather than to Flickr.

To begin with, the easy bit. I registered a Flickr account and installed the Flickr application on my BlackBerry. Now I can take a photo with the BlackBerry and send it to my Flickr photo stream with a title and a caption in a few seconds. Now comes the hard bit. Getting the stream on my blog and removing any Flickr artifacts along the way.

The saving grace here is that Flickr provides an RSS2 feed of any users photostream (so long as it’s set to public). In addition to this, there is a popular WordPress plugin called Feed WordPress that allows the syndication of RSS feeds onto your blog. I installed this plugin and subscribed to my Flickr feed with it. Now I was getting all photos posted to Flickr on my blog, I just had some cleaning up to do, and annoyingly, this is what took the time and effort.

Firstly Feed WordPress is designed to list all feeds coming into a blog as contributors so you can give appropriate credit. In my case though it was my own Flickr feed so I wanted to avoid this link category being shown on my site. To fix this I specifically excluded the category Feed WordPress had earmarked for contributors by specifying it in the arguments of the theme function that displays the links list. Users who are using a theme with widgets or who haven’t customised their site as much as I have might be able to use widgets to do this.

Secondly I had to change some Feed WordPress settings to get perfect operation. Mainly forcing all “posts” from Flickr to go into my Photo Blog category and also to ensure that all these would be attributed to my username. I also entered the default Flickr e-mail address, nobody@flickr.com, as an allowed user such that my Flickr entries would be syndicated without going through moderation. This would be a security risk if I wasn’t the only person who could add feeds to my syndication list or post to feeds already earmarked for syndication but as neither of these situations are true its ok.

Finally I needed to ensure that the actual body of the post appearing on my site showed the proper content. By proper content I mean a good sized image, linked to the original and showing nothing else alongside it but the caption and no reference to Flickr.

To do this I used a custom code modification to Feed WordPress which would extract the true location of the picture in the Flickr feed and store it as an attribute of the post. For those wishing to replicate what I have done here, the code below needs to be entered inside the SyndicatedPost class, at around line 1100 in the feedwordpress.php file of the Feed WordPress plugin.
if (isset($this->item['http://search.yahoo.com/mrss/']['content@url'])) :
$this->post['meta']['flickr_original_image'] = $this->item['http://search.yahoo.com/mrss/']['content@url'];
endif;

And there we have it, my own photo blog that leverages power from the Flickr system but which displays in my own way on my own site. If you want to try this by all means test out the above method and code but I must stress that this method is unsupported by me or anyone else. If you try it and get it to work, please comment below. It is worth noting that any phone with a camera and a Flickr upload program designed for it will work in place of a BlackBerry. To all that succeed with this method, happy photo blogging!

There has been a long standing Heisenbug on my site which would send users 404 headers, even when there was valid content to return. This wasn’t a significant problem for users who’s browsers would simply render the returned content anyway, but for those that wouldn’t (such as IE) this presented a significant problem in using several areas of my site.

The fix I have put in place simply assesses the link accessed by the user and if the link is in the database as being valid, it forces a 200 Ok status to be sent to the user, thus ensuring valid content will display in all browsers and the correct header will be returned with it.

If you have recently received a 404 error when trying to access a part of my site (particularly the contacts database) then I encourage you to try again.

My blog reached a frightening milestone today – I’ve received 100,000 spam comments since I started the site. Thankfully all of these comments never reached the public gaze as they were blocked by Akismet, however its worrying to think that such a high proportion of my comments were spam.

As it stands I have round about 1,000 comments on my blog, this means that a mere 1% of the comments I have received so far have been legitimate. Scary really isn’t it.

I’ve noticed a fair few album views have taken place in my new photo gallery since its launch and while I’m happy to see people are taking an interest, it is a little disappointing to find that no comments have been made on any of the pictures. It was at this point I realised that perhaps folks didn’t realise that you could pass comment on gallery items and so I thought I’d make a point of mentioning here that you can.

I’ve got both current photographs and galleries dating back many years so whether you are an old school friend marveling at how we’ve all changed or someone catching up on how things went at graduation there is sure to be something worth adding your words to. Have fun!

Just a quick heads-up that over the last 48 hours or so there may have been issues accessing some, if not a great many, pages on this site. I’d just like to apologise for this and say that all of the issues with the server configuration have now been fixed and normal service should have resumed.

Over the past two years my photo gallery has been populated with countless pictures of all the places and events I have visited. When it first went online it was also seeded with pictures dating back many years, some of the pictures were in fact so old that they had been scanned in from prints which came from the first film camera I’d ever owned.

Times change though and while the gallery (powered by Gallery2) did the job, there were problems. Server load seemed to be a significant issue. Load spikes happened sporadically and plugins which allowed the gallery to work with WordPress compounded the problem. There was also complexities involved in uploading photos. A gallery had to be created, the pictures uploaded to the server, and then the location of these uploads “pointed out” to the gallery script so they could be “imported” to the gallery its self. These initial uploads then had to be deleted to free up space. While uploading pictures direct was possible it was laborious for large galleries such as the kind you create when you return from holiday. Adding titles, captions and comments was also a hassle to the extent where I decided not to do it at all.

I sought a new gallery solution which would primarily address the server load issues but also bring other benefits and found it in the lightweight photo gallery software known as ZenPhoto. The primary attraction was the incredibly small install size of around 1Mb (taking into account that I required few of the plugins and only one theme). This brought with it the performance boosts one would expect from a smaller but well written code base.

The added bonus is the features. There is a file based upload system. You create a gallery in the web interface. This creates a directory on the server. You then upload your original digital camera photos to this directory. ZenPhoto then does the rest; ensuring uploaded pictures are added to the database and that thumbnails and smaller representations of the images are cached. As all this is done on the fly as pictures are viewed rather than all at once, server loads are kept down still further.

Another nice feature is that because the original photos are more easily retained a link can be provided to download the image direct, meaning those with a desire to order prints can do so without contacting me. While retaining the original was an option with Gallery2 it never seemed quite as intuitive and simple to do as it is with ZenPhoto.

Also provided is a built in reader for EXIF data contained within images. While Gallery2 had this feature it came as a plugin (which no doubt incurred performance issues) and needed to be added to your theme. While I’m sure not everyone wants this, I do and indeed consider that it should be standard in all online photo galleries.

The final seriously nice thing is the AJAX supported themes. Simply put this allows you to quickly upload a gallery as described above (in pretty much the same time it takes your connection to upload the images) and then as you step through the images for the first time (I always used to do this anyway to check things were OK) you can add a title and caption to each image by just clicking your cursor on the field, editing the content and clicking submit. The form lets you know when its saved and you can then move onto the next image. It strikes me that this feature alone means that in the time it took me to merely get a large gallery of photos uploaded with Gallery2, I can get them uploaded and also add titles and captions with ZenPhoto.

There is of course the option to customise the URL structure of galleries with ZenPhoto so that when the time comes in the near future to move all my past galleries to the new setup I won’t have to trawl my site updating links which is always nice.

You will no doubt notice that only one gallery is currently online (the long awaited photos of my graduation) but rest assured the other photos will follow soon so the gallery is back to its former glory. Please play around with the new features and leave some comments on some of the pictures if you fancy doing so.

If you like the new gallery or particularly if you decide try out ZenPhoto (or even to use it on your site) I’d be interested to hear from you in comments.