You are here

function theme_imagefield_image_imagecache_thickbox in Thickbox 5

Same name and namespace in other branches
  1. 6 thickbox.module \theme_imagefield_image_imagecache_thickbox()

Implementation of theme_imagefield_image_imagecache_thickbox().

1 theme call to theme_imagefield_image_imagecache_thickbox()
thickbox_field_formatter in ./thickbox.module
Implementation of hook_field_formatter().

File

./thickbox.module, line 230
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 theme_imagefield_image_imagecache_thickbox($namespace, $field, $path, $alt = '', $title = '', $gid = '', $attributes = NULL) {
  if (!empty($path)) {
    $attributes = drupal_attributes($attributes);
    $imagecache_path = imagecache_create_url($namespace, $path);
    $image = '<img src="' . $imagecache_path . '" alt="' . check_plain($alt) . '" ' . $attributes . ' />';
    return l($image, file_create_url($path), array(
      'title' => $title,
      'class' => 'thickbox',
      'rel' => 'gallery-' . $gid,
    ), NULL, NULL, FALSE, TRUE);
  }
}