Darren Mothersele

London based Drupal Web Developer
Facebook Twitter Drupal.org LinkedIn RSS Feed

module development

Theme Blocks module now on drupal.org

Now you can define Drupal blocks in your themes! With the Theme Blocks module I just submitted to drupal.org you can include blocks with your custom Drupal themes.

Sometimes you want a simple block for your Drupal site, and you have to create a module just to implement hook_block(). For simple blocks you end up creating the same code again and again for every site. Defining the template in hook_theme() then implementing hook_block() to make Drupal aware of your block. I have abstracted this process to make custom blocks as easy as adding a template file to your theme and a line to your theme.info file. See the project page on Drupal.org for more information.

Access Drupal CVS from behind a firewall using SSH tunnelling

Working behind a firewall and need to get an up-to-date dev version of a Drupal module from the Drupal CVS? I was just stuck with this problem, but here's how I solved it.

Luckily, port 22 was open for ssh connection, so I tunnel the CVS traffic (port 2401) via my own server. Simple two step process:

Drupal Development Environment

A major pain point for developers is migrating configuration from development versions of sites, to production environments. It's difficult in Drupal because configuration is in the database, and made more difficult when using CCK because content and configuration are so tightly coupled.

One approach to solving this is using a module to store your configuration and using "upgrade" hooks to deploy configuration changes and do any required content migration. A fellow Drupal developer Tim Millwood started a discussion on this and I threw in my two pence worth this morning.

Drupal Books

You may have noticed I added a new menu link to Drupal and Web Dev books. I've been adding Amazon links to useful books I have found here. Link to the book list

Node reference create for Drupal 6 CCK Node reference field

I posted about this in relation to Drupal 5 here. Now it's time to do this with Drupal 6...

Let's recap: Node reference field allows you to add a link from one content item to another. You add the reference to another existing node when you create a node with a nodereference field. The node being referenced must exist in order for this to work.

Cool things coming in Drupal 7...

Still porting everything to Drupal 6 at the moment, but might as well be looking forward to Drupal 7. Some of the cool features to look forward to, as taken from the guide to converting modules from Drupal 6 to Drupal 7:

Active Tags for Drupal

Drupal Active Tags Enchanced Taxonomy Tag Entry Widget

My Active Tags module is now available on Drupal.org

http://drupal.org/project/active_tags

The Drupal 6.x release is at first release (v1) with the basic tag entry enhancement. Some extra features are in the development version. Also, due to popular demand, there is a backported version available for Drupal 5.x

Drupal Views2 Handlers

Views2 is an awesome progression from the original views interface. I've got a feeling the new UI will not please everyone, but I really like the fact it gives a good overview of the current configuration of a view without having to explore lots of collapsible fieldsets.

Views2 is still Release Candidate status, but there's already good support for the new API in other contrib modules such as the excellent Flag module (the progression of views_bookmark). I was forced today to start getting my head around the new Views2 API because I am trying to do something with the BuddyList2 module that requires views - but BuddyList does not yet have Views integration. Here's what I found out...

Szeged 2008 Drupal Conference

My session at next week's Drupal conference has been confirmed. I will be presenting a few case studies from recent Drupal developments, and talking about Drupal APIs and Drupal as a Web Development Framework. Here's the abstract:

Drupal is often compared with other CMS products, but the true power of the platform is in it's flexibility and extensibility. Drupal, as a set of APIs, is a viable choice as a framework for developing powerful web apps. This session will demonstrate the use of Drupal APIs and Modules for web application development by means of a couple of case studies. Along the way we'll touch on comparisons with other frameworks from a developer perspective, and requirements for enterprise from a business perspective.

See you in Szeged!

Drupal Installation Profile Woes

Most of my work to date has been Drupal 5, but a new project I am involved in has required the switch to Drupal 6. On the whole I couldn't be happier - D6 is really nice in so many areas, and the switch has been pretty painless. Except - I'm now looking at Drupal installation profiles.

A couple of gotchas that I wasn't expecting...

Recent comments

Latest Posts