Blog posts

CCK form field changes using Drupal's hook_form_alter don't work? Use #after_build

I ran into issues when trying to use drupal's hook_form_alter to change some attributes of cck fields in a node form. It appears that depending on the weight of the module the form_alter is in, it might get called before the actual form element has been processed.
To make sure, you can set a function to be called after the form has been properly created, but before rendering.
In your form alter, add the after build key to the form field's array:
$form['field_course_status']['#after_build'][] = 'course_disable_status_field';

Views query substitutions in Drupal 6

Was adapting some views handlers that were used in Open Atrium, and came across a number of places where I saw some strange constants with three stars either side of them, like: ***ATRIUM_ACTIVITY_TIMESTAMP***

Should you be building your next website in Drupal?

This is a guest blog post I did for IS Labs.

How to add Zoopy video to your Drupal site using CCK and the Embedded Media Field module

I recently created a provider plugin for Drupal's CCK emfield module which allows you allows you to embed a Zoopy video by pasting the url into a cck field:

zoopy page url pasted into cck field

This is a lot easier than having to copy the embed code provided by Zoopy and paste this into a textarea.

The provider plugin then extracts the video code and displays the video on your Drupal site:

My state of Drupal, today, 18 March 2009

These are some of the thoughts I shared at the Drupal Johannesburg meetup held on 11 March 2009.

Drupal Johannesburg 11 March meetup notes

My thoughts on the meetup

Carl from Cerebra demoing drupal goodnessFor me, it was great to see everyone again, although I was disappointed that there weren't more than 3 new faces among the 15 or so that turned up. We do need to do something to attract more new members. I particularly enjoyed hearing about what new modules people have discovered, and enjoyed the less formal discussions afterwards.

Quick Drupal setup using Acquia's DAMP stack

Acquia have released an all in one Drupal install which includes Acquia Drupal, Apache, MySQL, PHP, PhpMyAdmin, and an Acquia Drupal Control Panel, to allow users to easily test and play around with Drupal, without having to get into the technical details of installing separate instances of Apache, MySQL, PHP etc.

Check it out here: http://acquia.com/downloads

Drupal conference 2009 videos available on the Internet Archive

Drupal web developers, or anyone in fact wishing to learn more about Drupal would be well served checking out the videos from the latest Drupal conference "DrupalCon DC 2009", available at the Internet Archive.

At a first glance, here are links to some of the videos that caught my attention:

Drupal 500 Internal Server Error on shared hosting

Was getting irregular "500 Internal Server Error" pages on a new Drupal 6 install, running on shared hosting.

After some research it appears that the hosting company is running php5 as CGI which does not follow the PHP directives set in Drupal's .htaccess file:

The case for Drupal

In 2008, the Weill Cornell Medical Library made a case before its administration to use Drupal, the popular open source content management system.