Technology Tales

Adventures & experiences in contemporary technology

A change in appearance

7th May 2008

Over the course of it’s short history, this blog has had four different themes, the latest of which being my own customised variant of Dezzain’s Zoxengen. It’s predecessor’s have included Andreas04, Andreas09 and Prosumer. I have tinkered with all of these to varying degrees but each has offered me a certain something before I set about my tweaks. Zoxengen is no different and its clean lines and Web 2.0 feel attracted my attention. Other little features like seeing related posts listing on a post’s comments page or listing the tags associated with a post under its title line are, I hope, useful little extras. Correcting English (I may be digging a hole for myself here) and removing advertising slots (for me, this blogging business is a hobby so you’ll find no ads on any of my blogs) both seem to be a necessary tasks when implementing themes these times but the really major change was to make the design more flexible when it comes to different screen sizes, something that I hope to have achieved by allowing it to fill more of the browser window. There may be more changes, hopefully small, but I hope that you find the result as pleasing on the eye as I do.

Update: The blog’s current theme came with a lot of text that was written in poor English. While I should have got rid of all of it from the theme by now, there may be some still lurking here somewhere. If I find any more, it’ll get sorted. If something has escaped my notice for whatever reason, please let me know.

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

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.

What about a book on WordPress development?

7th October 2007

Here’s something that I would really appreciate: a book on code cutting for WordPress customisation and extension. Having the Codex is all very fine but having a dead tree compendium that you can peruse at your leisure is a definite bonus. If there was a way to get the Codex on PDF and print it all off for easier reading, that would be progress. I believe that a publisher did plan to bring to the market something like what I want but author and publisher parted company, a pity. It would be great to see something like Apress’ Pro Drupal Development for WordPress. What about it, Automattic folks?

WordPress database error: [Can’t create table … (errno: 121)]

22nd September 2007

I was trying to upgrade one of my test blogs to WordPress 2.3 RC1 when I got error messages like the above littering the screen during the installation. The PHP functions mysql_noerr (or mysqli_noerr) and mysql_error (or mysqli_error) seem to have been busily at work. These messages told me that the upgrade hadn’t worked so I went off googling as usual and perusing the MySQL tomes in my possession. Not for the first time, the web yielded nothing but dross and, in the end, I tried deleting the relevant database and starting from scratch again. That resolved the problem.

The reason for database deletion sorting things out is that MySQL got confused when there was a mismatch between what was in the file system and what its InnoDB table was saying. I think that the cause of this was that I naively copied in tables using Windows Explorer. Deleting the database cleared the air and all was well once I allowed WordPress to do the needful in its time honoured way. Another lesson learned for the future and I wish that frustration wasn’t part of the learning experience too…

A feast of plugins

6th July 2007

Themed Login

Here’s a useful idea: get your blog login page to look like it’s part of your blog. It does work well on my hillwalking blog but you do have to watch how it behaves with whatever theme you are using. Strangely, I couldn’t get it to work on my offline blog, the development mirror of what you see online. The ability to set what page is displayed after logging in or logging out is an especially useful inclusion.

My Category Order

My Link Order

My Page Order

These sound like really good ideas: being able to control the running order of things on your blog sidebar is a good thing. What scuppered my using them is that you need widgets turned on for the effect to work and i have seen issues with how ID’s have been set when things are widgetised.

More on mod_rewrite

25th June 2007

Today, I caught sight of an article on anti-plagiarism tools at The Blog Herald and among the tricks was to use mod-rewrite to stop people “borrowing” both your images and your bandwidth. The gist is that you set up one or more conditions that exclude websites from the application of a rule forbidding access to images; the logic is that if the website referencing an image is not one of the websites listed in the conditions, then it doesn’t get to display any of your images.

RewriteCond %{HTTP_REFERER} !^http://(www\.)?awebsite.com(/)?.*$ [NC]

RewriteRule .*\.(gif|jpe?g|png|bmp)$ [F,NC]

The wonders of mod_rewrite

24th June 2007

When I wrote about tidying dynamic URL’s a little while back, I had no inkling that that would be a second part to the tale. My discovery of mod_rewrite, an Apache module that facilitates URL translation. The effect is that one URL is presented to the user in the browser address bar, and the exact same URL is also seen by search engines, while another is passed to the server for processing. It might sound like subterfuge but it works very well once you manage to get it set up properly. The web host for my hillwalking blog/photo gallery has everything configured such it is ready to go but the same did not apply to the offline Apache 2.2.x server that I have going on my own Windows XP box. There were two parts to getting it working there:

  1. Activating mod-rewrite on the server: this is as easy as uncommenting a line in the httpd.conf file for the site (the line in question is: LoadModule rewrite_module modules/mod_rewrite.so).
  2. Ensuring that the .htaccess file in the root of the web server directory is active. You need to set the values of the AllowOverride directives for the server root and CGI directories to All so that .htaccess is active. Not doing it for the latter will result in the an error beginning with the following: Options FollowSymLinks or SymLinksIfOwnerMatch is off which implies that RewriteRule directive is forbidden. Having Allow from All set for the required directories is another option to consider when you see errors like that.

Once you have got the above sorted, adding this line to .htaccess: RewriteEngine On. Preceding it with an Options directive to ensure that FollowSymLinks and SymLinksIfOwnerMatch are switched on does no harm at all and may even be needed to get things running. That done, you can set about putting mod_write to work with lines like this:

RewriteRule ^pages/(.*)/?$ pages.php?query=$1

The effect of this is to take http://www.website.com/pages/input and convert it into a form for action by the server; in this case, that is http://www.website.com/pages.php?query=input. Anything contained by a bracket is assigned to the value of a system-named variable. If you have several bracketed sections, they are assigned to sequentially numbered variables as follows: $1 for the first, $2 for the second and so on. It’s all good stuff when you get it going and not only does it make things look much neater but it also possesses an advantage when it comes to future-proofing too. Web addresses can be kept constant over time, even if things change behind the scenes. It means that returning visitors will find what they saw the last time that they visited and surely must ensure good karma in eyes of those all important search engines.

IE6 and JavaScript performance

22nd June 2007

Having been exposed to an application at work that uses a lot of JavaScript, I fully appreciate what some mean when they talk about IE6’s inefficient handling of JavaScript. After seeing a web page taking an age to reload and your CPU taking a hammering because of JavaScript processing, the penny does tend to drop… Needless to say, this very much impacts the world of AJAX-driven web applications with their heavy dependence of client-side JavaScript. While IE7 does come to the rescue, there remain plenty of IE6 users still out there and this is reflect in website statistics. This reflects a certain level of inertia in the browser market that not only afflicts the uptake of IE7 but also the likes of Mozilla, Opera and Safari. It also means that anyone developing AJAX applications very much needs to continue testing in IE6, especially if the product of their labours is for wider public use. An example of such an application is Zimbra, an open source web application for messaging and collaboration, and the people behind it have generously share the results of their browser performance benchmarking. They did comparisons of IE6 vs. IE7 and Firefox 2 vs. IE7. IE6 easily came out as the worst in these while Firefox 2 was the best. I suppose that the next question to be asked centres around the type of code that is processed inefficiently by IE6. I wouldn’t be at all surprised if a list emerged but here’s one: using Microsoft’s proprietary innerHTML object to update the DOM for a web page format. Having a quick trawl on Google, this came up for mention as a cause of memory leaks. It is also a Microsoft innovation that never got taken up by those overseeing web standards, hardly a surprise since a spot of DOM scripting achieves the same end. It may be faster to code than any alternatives, and it does have some support from other browsers, but it does seem to have got a bad name and so should be avoided if possible. That said, it would be interesting to see a performance comparsion between innerHTML and DOM methods in IE6.

TechnologyTales.com has moved server…

18th June 2007

The last week on WordPress.com has featured decisions that some may question, to say the least. For instance, the death of Feed Stats was something that I saw as a retrograde step. Next, I saw a slight change to the appearance of my blog that led me to take full control of the situation; a previous discussion with WordPress.com staff about changing a theme to the way that I wanted it to be got me nowhere so I wasn’t about to try again… I might miss having advance notice of where WordPress goes next but I am not sure that I want to be a guinea pig either.

So, you now find this hosted by Streamline.net and, apart from a lengthy hiatus (at least, it felt like forever thanks to recurring thoughts of PageRank loss; yes, I know that sounds silly…) spent awaiting FTP access to be sorted out, the set up ran smoothly enough; I think that my request for transfer from a Windows server to a Linux one might have been the cause of the delay. Setting up a MySQL database was a breeze and it’s part of the package too. In fact, the Pro package that I am using is £31.99 ex VAT per annum, not bad at all, and, teething problems out of the way, it’ll be interesting to see how things will fare from now on.

Having a self-hosted WordPress installation is nothing new to me since I do it for my hillwalking blog and everything came together very quickly this time around. knowing what plug-ins add real value was a definite help: Bad Behaviour and Ultimate GA headed the list but a Spam Karma 2 is another option. Feedburner integration is another potential item on the configuration list. I have stuck with the Andreas09 theme but am unsure as to how far I will take customising it; it’s not a high priority right now. In fact, I may find another three-column layout that takes my eye now that I am not limited to the offerings available from WordPress.com.

The posts from the old blog have arrived over here and that seems to have worked fine first time around thanks the WordPress’ import/export functionality. I still have to get the images over but there’ll be time for that yet. Another thing on the to do list is to transfer over the links and set up any text and RSS widgets that have been a feature of the previous rendition of the blog. That means linking to wp-links-opml.php on the old blog using the import links functionality. There is no other link export function and you can only import into a single category; a link import/export plug-in that retains the link category information would be a bonus.

While I wonder if I have made a rod for my own back with my having two self-hosted WordPress blogs, it does feel good to have more control and it’ll be interesting where where this journey goes next.

  • 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.