Drupal 7 code freeze is almost upon us, and you may now be considering upgrading your modules and themes. To make that process as easy as possible, I've been working hard to update the Coder module with all the necessary Drupal 6 to Drupal 7 reviews to help you identify where in your module or theme you need to make changes.
UPDATE: it is no longer necessary to do this, as the latest release of the migrate module supports md5 passwords. The hook names have also changed - the word 'destination' has been removed.
Recently I created a patch for the migrate module so you can export content sets, paste them into your module and have them automatically imported. This works in much the same way as Views handles default views in code, with the version in the database overriding the version in code. Using the Chaos Tools (ctools) module it was, relatively, easy to add this functionality. Here are the steps involved if you want to add it to your own module.
This week I went to CiviCRM Developer Camp in London, UK. I must admit I've never used CiviCRM and downloaded and installed it for the first time the day before! The camp, which was un-conference in style, was held over two days, and over 20 people attended. It was meant to be a camp for experienced users, but given the varying degrees of knowledge of the people attending, I think it was less techy or advanced than originally intended.
Recently, for the first time with Drupal 6, I needed to create a form where a variable number of fields could be added to it by simply clicking a 'Add more' button. I wanted to design a node form where users could create a custom compilation album of their favourite tracks. However the number of tracks would vary from album to album and so I wanted a way for users to be able to add more fields to the form without reloading the page. Now, yes I could have used CCK to build this custom content type, but I wanted to see how this could be done using Drupal's FAPI alone.
Recently I needed a create a multi-step node form in Drupal 6. Unlike other forms in Drupal, it wasn't as simple as configuring a new submit handler that sets
$form_state['rebuild'] to TRUE. After trying a few different ways and a bit of searching, I found the solution. The trick is to hide the 'submit' button and use
hook_form_alter() on the 'preview' button to regenerate the form for step 2. However, this is probably best explained with some sample code to illustrate.
Some of the highlights of Drupalcon DC for me were:
After a number of months since the last official release, new releases of the Lightbox2 module are now available - versions 5.x-2.9 and 6.x-1.9. It's been a long time coming, but it's well worth it, with over 70 individual changes. There's a whole bunch of new features, and bug fixes too.
New features include:
- Full 6.x support for the imagefield, filefield and emfield modules!
- New 'download' link feature for imagefields and image.module images. This also means the addition of a new 'download original image' permission. (6.x only)