function thickbox_field_formatter_info in Thickbox 6
Same name and namespace in other branches
- 5 thickbox.module \thickbox_field_formatter_info()
Implementation of hook_field_formatter_info(). Adds certain thickbox+imagecache formatters to CCK image fields if imagefield.module and imagecache.module exist.
File
- ./
thickbox.module, line 153 - Author: Fredrik Jonsson fredrik at combonet dot se The thickbox module is a simple wrapper for the jquery plugin ThickBox http://jquery.com/demo/thickbox/.
Code
function thickbox_field_formatter_info() {
$formatters = array();
if (module_exists('imagefield') && module_exists('imagecache')) {
foreach (imagecache_presets() as $preset) {
$formatters[$preset['presetname'] . '][thickbox'] = array(
'label' => t('Thickbox: @preset image', array(
'@preset' => $preset['presetname'],
)),
'field types' => array(
'image',
'filefield',
),
);
}
}
return $formatters;
}