Blogs

Using Drupal's t (translate) function

Tags:

Following extensive experience of using Drupal to deliver intenationalised and localised websites, there are a few fundamental issues that keep catching us out - one of the main ones is ensuring that we use Drupal's t function approriately.

Here's a simple 'gotcha':

Wrong: <?php echo t('You are logged in as: ') . $username; ?>

Right: <?php echo t('You are logged in as: %username', array('%username' => $username)); ?>

To update or not to update?

There’s a sweet contentment knowing that a system is fully up to date and patched, but how uncomfortable it soon becomes when you find out there’s a new update or patch – leading to the nagging question of if / when to go through the grief of updating.

On the one hand, you know you should apply updates as soon as you can to get any potential benefit of new features, bugfixes or even improved security and performance – but anyone who has been around long enough will know that even the simplest patch can upset an otherwise stable system and be a royal pain to resolve.

Technology killed the Lithographic star

I had a friend around for Dinner the other night and being a drummer in a band he soon brought the conversation around to music. We shared our enthusiasm for the ipod but couldn't help reminiscing on the good old days when you could flick through and admire your new artwork be it CD or Vinyl whilst listening to your latest purchase.

3D do you see

After the terrifying release of Jaws 3D in 1983, terrifying of course for all of the wrong reasons the very eighties gimmick was very quickly cast aside for movies that focused more on content rather than style. However things have most certainly changed since then. Its true to say that there are still a fare few movies with truly unforgivable content but there are so many big hits out there that are pushing the boundaries and visually blowing us away all in mere 2D and it makes you wonder what the next big wow factor will be.

Books Glorious Books

In this ever expanding world of digital wonder it is still important to keep up with what's going on in the word of pen and paper. I am of course talking about books of a visual nature but should I ever feel compelled to pick up a worded novel over a graphic novel I will certainly let you know my thoughts.

Amazon Relational Database Service

Amazon have just announced a new addition to their web services family - Relational Database Service (RDS).

Build-vertising

A new website

I guess it's about time we launched a new website, however having been busy creating online solutions for clients over the last two years, there's the realisation that it's always harder to do something to promote yourselves.

Anyway, here we are are.  There's a lot more to follow very soon...

Limiting access to Drupal content types

There are contributed modules that extend Drupal’s innate desire that all content should be publicly visible – notably node privacy byrole and Content Access. If you’ve defined your own node in a module, you can also use node_access() to set access rights to that node type.

Storing dates in Drupal Schema API

This one caught me out for a good while – I’ve got my own data stored in a database using Drupal’s Schema API and one field I want is a date, so I used the ‘datetime’ type. But whenever I came to use a value anywhere I couldn’t get any of Drupal’s date formatting functions to work – they were expecting a unix timestamp (makes sense) but the Schema API uses ‘datetime’ as a field type on MySQL so was getting a MySQL date string in return.