Web Design and Build

Stop Wordpress adding <br/> tags Last updated:6 February 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.

The lifespan of IE6 Last updated:18 January 2010

Read an interesting article this morning about the use of Internet Explorer. Specifically, the article suggests that now that IE8 is launched, users will migrate from IE7, but many who are still using IE6 will remain, to the point that IE6 will become more popular than IE7. Sound mad? Not really, because many corporate web applications were designed for IE6 when it was effectively the only browser available, and they won’t work with IE7. Larger companies tend to be intrinsically risk-averse anyway, upgrading a browser is low priority – my own experience certainly supports the argument.

A couple of sets of web stats highlight the issue. Looking at some stats from a large public sector website, 80% of visitors are using IE, of which 40% use IE6. This website will be frequently accessed by people at work. By contrast, one of the sites I run, which tends towards consumer usage, has only 60% IE users, of which only 15% use IE6.

So the bad news is IE6 may live a lot longer than we might like…

CMS Round 3 – Drupal Last updated:21 October 2009

Having had a bash at Joomla I thought I’d have a go at Drupal this afternoon.

I found it much more akin to Joomla than Wordpress in the way it’s set up, although generally clearer and somewhat easier to understand. I was quickly able to create a couple of text-only pages and set up a menu. So far so good.

Also, valid code, perhaps a few less divs than Joomla.

Then I tried to add an image. Eventually realised I needed to add some more modules to do that. Fair enough I suppose, but it seems odd that the “base” installation comes with a translator, which I can’t imagine many people use, but no facility for adding images.

I was then able to easily create an image gallery. Good. But I still couldn’t, and at the time of writing this, after about 2 hours of messing about, I still can’t add an image to an ordinary page…

I therefore wouldn’t hold out much hope for my non-technical user.

Judging from the number of Google results, I’m not the only one who has had this problem – but even these didn’t help.

One day later…I have now added the supposedly missing modules, which I can see, but which still do not offer me any option to insert and image into a page.

Wordpress and Joomla as CMS Last updated:20 October 2009

I had a quick look this week at the possibility of using either Wordpress or Joomla as a content management system, to enable me potentially to build a website but for someone else to keep it updated. Talking about a smallish site, maybe 20 pages max, mostly static content, nothing fancy…

I started with Joomla, easy to download, easy to install, didn’t find the user interface very intuitive (so neither would a less web-savvy user). The standard installation, however, came with about 3800 files….! Don’t know which ones I didn’t need so had to FTP the whole lot onto a server to test, not ideal. Created a couple of pages very easily using the standard template, but I thought the resulting html was excessively long, and used tables throughout. It was also invalid (a <p> tag within a <span> tag, if you’re interested).  And this was for two paras of lorem ipsum. Not a great first impression.

Then I tried Wordpress, much better, much smaller initial install (the logic being that you then add on the bits you want), better user interface, valid code, no tables.

No contest, then.

Joomla as CMS – round two Last updated:20 October 2009

Had another attempt at Joomla this week as I thought perhaps I hadn’t been quite fair last time

Slightly more success, and this time I seemed to get valid code, using the JA-purity template. From my point of view, I find it considerably less intuitive from a developers perspective, and this carries through to a non-technical user perspective.

I found adding an image rather clunky (it’s not great in Wordpress either), and was surprised to find the image form allowing me to enter hspace and vspace attributes (now deprecated). Having said that, when I entered values it had no perceptible effect. So why’s it there?

The other odd thing I thought was the menu. In Wordpress if you add a page, it adds it to the menu automatically, but in Joomla you have to manually add the menu item. I guess this is a double-edged sword, but for a non-technical user adding the menu seemed a bit clunky. What I did like about the Joomla menu is that it comes with a built in “suckerfish” style dropdown.

The code generated, however, still seemed to have an advanced case of div-itis, and an unnecessary table.

So generally a bit more positive, but from a simplicity perspective, solely from a non-techy user’s point of view, I still prefer Wordpress.