Drupaler

Syndicate content
Providing a space for British (or UK-based) Drupal developers to talk about their work, share ideas and further knowledge within the global Drupal community.
Updated: 52 min 34 sec ago

The Oxford Comma

Wed, 30/06/2010 - 15:59

Here's a little function I wrote today because I needed to be able to turn a list of between one and three items into a string like 'apples, oranges, and pears', 'apples and pears', or just 'stairs'.

I figured I might as well handle everything in one place, and throw in the option to have an 'or' instead of an 'and'. There may be occasions you don't want the Oxford comma, but I can't think of any.


/**

read more

Using Constants For Permission Names: WHY?

Wed, 30/06/2010 - 14:19

I keep seeing this sort of thing in so many modules:

define("MY_MODULE_PERM_ACCESS_WIDGETS", 'access widgets');
// Names changed to protect the guilty ;)

Am I missing something, or is this utterly pointless?

read more

Setting Up Git And Gitosis On CentOS 5.2

Wed, 09/06/2010 - 14:51

This article is a tweaked version of several tutorials around. Many of the original links courtesy of Adrian Simmons. Thanks to all the others who gave me loads of help in IRC and thanks to Jerad at Lullabot for inspiring me to dive in to Git with this article.

read more