Custom Formatters 1.2 - It just got easier.

When I first released the Custom Formatters module I was sure I had made the task of creating a CCK Formatter easy, but instead I had only made it easier. It turns out I was looking at the module from the perspective of a developer with a sound knowledge of PHP and the Drupal API, not from the perspective of a user with only basic HTML knowledge, so with this new (likely short term) view on module development, I give you Custom Formatters 1.2.

The biggest change is the addition of the 'basic' editing mode, allowing users to create custom CCK formatters with only HTML and tokens (supplied by the Token module).

Below you can see an example of two formatters, an advanced and a basic formatter, both outputting the CCK field as an image:

Advanced (PHP) version:

return theme('image', $element['#item']['filepath']);

Basic (HTML) version:

<img src="[filefield-filepath]" />

While both of these formatters are acceptable, the second is clearly the simpler for both developers and non-developers to understand.

 
Also added in 1.2 is support for the Insert module, allowing you to easily inject images themed with your custom formatter into your node.

To download the latest version, or for more information, checkout the Custom Formatters project page.

© 2007 - 2010 deciphered.net. All rights Reserved.