You are here

function thickbox_field_formatter_info in Thickbox 5

Same name and namespace in other branches
  1. 6 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 180
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['thickbox][' . $preset['presetname']] = array(
        'label' => 'Thickbox: ' . $preset['presetname'],
        'field types' => array(
          'image',
        ),
      );
    }
  }
  return $formatters;
}