A glimpse into the future… Last updated:29 October 2010

I’ve been writing a little application over the last week for my wife’s website to do some behind the scenes stuff maintaining a shop inventory. Nothing excessively complicated.

What’s been different however is that since these aren’t pages intended (or even accessible) for public consumption, I’ve been able to write them solely for Firefox3 – and haven’t had to test them in anything else. Consequently, no worries about what IE6 will do to my nice layout. No worries about unsupported css. Very refreshing.

A little window into the future (hopefully) on what web design would be like if all browsers were standards compliant.

Website design – lessons learned Last updated:29 October 2010

I’ve just finished managing a web design project and was reflecting on lessons learned. Three big ones for me:

  • On this project we worked with an external design agency to develop the information architecture, user personas and user journeys. I was rather sceptical about this approach in this case as some work had already been done, but am now a convert to the cause. This work actually made a critical difference between a website that would have been just OK and one that’s really good.
  • We used a lot of mockups and clickable wireframes, and they really served to bring the project to life, and instil confidence in our project stakeholders. Even more true on a web project because it’s so visual. One prototype page is worth many Powerpoint slides.
  • As part of the design we did some “quick and dirty” user testing, where we rounded up a few potential users and sat them in front of a working mockup. This was useful for the design, but had the additional effect of adding a huge amount of weight to the design decisions, to the extent that these were almost never questioned subsequently – which I’m pretty sure would have happened without the testing.

Useful lessons for next time.

Paypal Website Payments Standard in the UK Last updated:29 October 2010

I was messing about with the Paypal “Website Payments Standard” yesterday, looking at a possible small scale trial on a site. Really easy to set up, but then I tried to do two more things, specifically, restrict orders to “home country” customers only, and calculate postage by weight.

After a lot of reading of help files and Googling, I eventually find that both these options are only supported for US customers – the “shipping by weight” despite it being all over the help pages and even giving you the option on screen – which then has no effect.

Thanks Paypal…

Stop WordPress adding <br/> tags Last updated:29 October 2010

Been swearing at WordPress this afternoon…

I’ve been trying to transfer an html form, which I had working perfectly on a static html page, onto a WordPress page. WordPress insisted on adding multiple <br/> tags where I didn’t want them. Mutter.

Eventually, after much searching, I identified a parameter within wp-includes/formatting.php, which allows you to disable this irritating feature. If you open formatting.php and find the function wpautop you’ll see this:

function wpautop($pee, $br = 1)

Change this to:

function wpautop($pee, $br = 0)

Save the file and publish it back to your server and that’s it. Works fine in WP2.8.

Note: WP 2.8.3 overwrites formatting.php so this change needs redoing.

Update 24 October 2010

Fed up with repeatedly doing this I’ve developed a WordPress plugin to address the issue. Give it a try and let me know if it works for you.

Body classes on WordPress pages Last updated:11 November 2010

I spent hours this weekend trying to apply a different body class to a WordPress page. Specifically, I wanted to apply a different class to WordPress pages as opposed to WordPress posts. Why? Because I wanted to be allow comments to be left on a number of pages which were previously outside WordPress, but I wanted the menu, in line with the rest of my site, to display the submenu for either web pages or photo pages, depending on the actual page displayed. My css controls this by using the body class.

Once I’d worked it out it was straightforward, inevitably. First off, I used the “Custom Fields” functionality to define a custom field called bodyclass, then set this to “web” or “photo” as my css requires. Easy so far.

I then amended header.php using WordPress conditional comments to use the bodyclass value for pages, and to use “blog” as standard for posts. The following statement did the trick here:

<body class="
<?php if (is_page()) echo get_post_meta($post->ID, 'bodyclass', true); 
else echo "blog";?>
">