Last updated March 19, 2010. Created by Alan D. on October 5, 2009.
Log in to edit this page.
An extended ImageField widget that adds new form fields to an ImageField widget. All processing, including storage, is done via ImageField. This module simply allows you to easily extend the currently available form fields; alt, description, title, etc, and either let the themers to run their magic, you can use the Custom Formatter module or use the new CCK formatter to display the additional text fields (Help hiding the labels can be found here
Security note
Remember security if you handle the data yourself. The recommended method to handle the text fields are:
Typical text field (no HTML)
<?php
$no_markup = isset($data['no_markup']['body']) ? check_plain($data['no_markup']['body']) : NULL;
?>Text field with tags (HTML)
<?php
# You can use filter_xss_admin for TRUSTED users.
$free_text = isset($data['free_text']['body']) ? filter_xss($data['free_text']['body']) : NULL;
?>Rich text (WYSIWYG)
<?php
$rich_text = '';
if (isset($data['rich_text']) && !empty($data['rich_text']['body'])) {
$rich_text = check_markup($data['rich_text']['body'], $data['rich_text']['format'], FALSE);
}
?>Remember that the title from the key|title pairs is also user input. Run this through check_plain() too!
The following pages are used to help demonstrate possible theming uses.