While building the Archdiocese of Saint Louis' website (launching Feb. 22, 2010), I needed an easy and quick way to allow users to caption images, without much hassle. On the old Joomla version of the website, users would have to upload an image, then insert it, then click on it, then click another button to add an image caption, set border properties, add padding, etc.

To cut through most of that mess, I set up an ImageField with Drupal's Insert module, which helps save a few clicks (and eliminates any need for users to navigate through directories and manage yet another set of files on the server itself—this approach is not altogether bad, but can be harder to teach to many people). But how to do image captions?

Easy! Just create an ImageCache preset that can be used by the Insert module when an image is inserted, and use a theme function (inside your Drupal theme's template.php file) to grab the Alternate text and convert it to a caption.

'; $output .= '

'. check_plain($alt) .'
'; return $output; } } ?>

One downside to this approach is the fact that users won't be able to see the caption while they're editing the page... but I might figure out something to fix that, perhaps with a JavaScript plugin for the TinyMCE editor (we use the WYSIWYG module to set up editor profiles on the new site).

[UPDATE: This is not quite working for me right now... works great for imagecache-built CCK ImageFields, but not with inserted images... might have to resort to a JavaScript-only solution for the time being.]

The new Archdiocesan website will launch on Monday, February 22... stay tuned!