code

Default values on form input elements that disappear when clicked on

Having an example or description value inside the form element for input elements that are missing a title or description. With this small code snippet as an example, this can be done in Drupal forms quite easily by adding these attributes to the form input item array.

Theme images in Drupal 7 - The new imagecache is image styles

ImageCache was the Drupal 6 way of doing things when you wanted a modified version of an already existing image on the site. Instead of manually manipulating the image and keeping a copy of it manually, you could setup an ImageCache preset which would be used to manipulate the image automatically.

In Drupal 7, this functionality is now in the core and it has also gone through some subtle changes to keep up with changes in the core.

Separating out form_alter functions in Drupal 7 modules

Separate out files ... reduce code loaded for most pages since main module files are loaded for every page load. Moving all code that isn't needed on every page load to different files speeds things up. Maybe. It sounds good in theory.

To make Drupal search for the default form_alter, and any other custom form, the module needs to hook_hook_info_alter().

Subscribe to RSS - code