Developer Zone

Drupal 7 Development by Example, Beginner's Guide by Kurt Madel

Image of Drupal 7 Development by Example Beginner's Guide

Having just finished a read through of Drupal 7 Development by Example Beginner's Guide (, my first impressions are very good. The author takes quite a holistic approach to some of the more advanced techniques required during a site build and walks through them in a methodical and easy to follow manner.

Helping out with Drupal Accessibility

While a coder may not have a great deal of time or indeed the answer to any of the accessibility problems encountered in using Drupal, there are still numerous ways that some minor coding skills can used to massively help out with the accessibility of Drupal.

While this is written specifically with Accessibility in mind the skills are very transferrable and can be used for any initiative you may want to help out with.

Most new development is happening in Drupal 8 at the moment so you will need to get the latest version of that first:

Boldy Theme Live Preview setup instructions

This is a very rough start to the setup instructions, more will be added as I progress and full english will be added rather than the rough notes that exist at present

Site Demo

There is a demo site available to see how this theme looks in comparison to the site5 version, it can be found at: or

Git Workflow - An Update

Now that Drupal have moved from CVS to the git versioning system, I realised that my github workflow can get even more of a workout and is doubly useful to me as I can now use it for Drupal contributions as well. The previous workflow is here: Github Workflow.

There are only a couple of differences between using Drupal's git and github.

The only post you'll ever need to test a template

The only post you'll ever need to test a template

The aim of this post is to write a page that contains all the elements of html that I'll ever use. For the purpose of theme development to ensure all elements are properly styled.

The purpose of this HTML is to help determine what default settings are with CSS and to make sure that all possible HTML Elements are included in this HTML so as to not miss any possible Elements when designing a site.

A birthday function

When you get older you need to write functions to help you though the day:

Block Hotmail email addresses in user signup

I was recently asked to block users from signing up to a drupal site using a hotmail email address.

To achieve this I wrote a small module that will intercept the validate operation of the user module and add in an extra validation on the mail field of the user registration or edit form.

Create your dot info file:

; $Id$
name = Hotmail Check
description = "Removes the ability to login with a hotmail email address."
core = 6.x

Then create your dot module file: hotmail_check.module

Backup a drupal site - both database and site files through cron

I wrote a little linux bash script that I get cron to run each night to create a backup of my drupal site. I may expand it later to include auto deletion of older files and database dumps, but for the meantime I will just manage the backup files manually.

Basically create a file and call it something like

Drupal 6 l() - the missing link documentation

The format

The drupal 6 link function takes the format of:

l($text, $path, $options = array())

This will format an internal Drupal link.

This function correctly handles aliased paths, and allows themes to highlight
links to the current page correctly, so all internal links output by modules
should be generated by this function if possible.


$text - The text to be enclosed with the anchor tag.

$path - The Drupal path being linked to, such as "admin/content/node". Can be an external or internal URL.

Programmatically set the defaults for a new content type

When programmatically creating a new content type I would like to set the default publishing options, comment settings and upload settings, as the content type is installed, so I create a dot install file for the content type with the following: