Drupal Events Display

Many community websites run Drupal and use the event module to maintain a calendar of events that they organise or that are of relevance to their members.  I help maintain the website for two such organisations, Linux Australia and LUV.

The event module has one slight drawback, it displays the number of hours, days, weeks or months remaining until an event.

That's fine if it's two days, but not so useful if it's 29 days or 4 months - it means site visitors needs to try and convert that numbers of days into an actual date before they know what day of the week the event will be held. Or worse yet, click through to another page to obtain information that should have been on the front page to begin with.

For a time I used to manually modify the module and it's associated theme to simply display the date, overriding the days, months etc calculation that had occurred just before.

Last month I was given a copy of Pro Drupal Development and I've been reading bits and pieces of that when I've had time.

When this morning I was chatting with Mary, who maintains a LinuxChix Drupal, and mentioned this patch she indicated it would be helpful for her too. I decided to have a crack at sticking the date format configuration in an Administration menu, so it can be set by anyone with administrative access to Drupal.

It turns out it was even easier than I thought, so I submitted it as a patch to the module maintainer.  Fingers crossed it'll get accepted :-)  In the mean time, it's attached to this blog post if you're interested in it.

Plain text icon event-date-patch.txt3.7 KB

Add new comment