Technical information on this site may be out of date : no updates since 2015

Keep Your Drupal Theme Simple

July 12, 2008 , posted under drupal css

When creating a Drupal theme it is tempting to start with one of the existing themes (Zen and Garland are often used) but I would argue against this approach.

If you start from another theme it feels good at the beginning; after all you start from a position where your site looks good. But the more customisations you make, the more you find that the old theme just adds complexity to your existing theme.

The way Drupal works is that each module can add it’s own CSS: so tabs, menu trees, filters and so on all come with some sensible styling by default. If you want it to look different you not only have to create the CSS to make it look how you want - you have to make sure this overrides the default rules.

So CSS in Drupal isn’t simple - don’t add to the complexity more than you need to.

Read More…

Mobile Internet reaching Critical Mass?

July 10, 2008 , posted under drupal web 3.0 web 2.0

Interesting report on the state of mobile internet

We offer that mobile Internet is today at a point of sufficient mass to sustain a chain reaction of rapid growth in consumer adoption and, in turn, mobile Internet marketing.

According to this in the UK 16% of mobile phone users use their phones to access the internet.

Read More…

SimpleTest - expecting Exceptions

June 30, 2008 , posted under php drupal testing

SimpleTest is a great testing framework for PHP, with a Drupal module available too.

Many tests are based on assert statements, but this patterns doesn’t work for functions which are expected to throw Exceptions. As at the time of writing Drupal’s simpletest module doesn’t catch exceptions and so the whole test run stalls.

In that case the following patterns are often useful.

Read More…

Drupal pager_query function

June 29, 2008 , posted under drupal

I’ve just been trying to get a paged query working with Drupal, and after a frustrating hour I realise the problem is that the function is case sensitive: see http://drupal.org/node/211925

Normally SQL keywords can be in any mixture of upper and lower case letters, Drupal has additional coding conventions which is great.

Read More…

Translating Drupal Websites

May 18, 2008 , posted under internationalisation drupal

I’ve worked on a few internationalised sites in the past and it always raises challenges, Drupal makes some things easy - this post provides some simple tips for planning your translation process.

This advice is aimed at sizeable sites with formal release processes.

Read More…

Drupal and Change Management

February 25, 2008 , posted under drupal best practice cms

Any complex website that needs updating has to be tested without affecting the users of the live site.

The challenge then is how to replicate the changes made on your test site on the live site.

If all the changes are in code then version control systems such as svn and cvs solve this problem very neatly.

But with a CMS such as Drupal some changes are inevitably required in the database.

Managing these changes without affecting the site content can be tricky.

Read More…