function theme_imagefield_image_imagecache_shadowbox in Shadowbox 5
Same name and namespace in other branches
- 5.2 shadowbox.module \theme_imagefield_image_imagecache_shadowbox()
- 6.4 shadowbox.module \theme_imagefield_image_imagecache_shadowbox()
- 6.2 shadowbox.module \theme_imagefield_image_imagecache_shadowbox()
- 6.3 shadowbox.module \theme_imagefield_image_imagecache_shadowbox()
Implementation of theme_imagefield_image_imagecache_shadowbox().
1 theme call to theme_imagefield_image_imagecache_shadowbox()
- shadowbox_field_formatter in ./
shadowbox.module - Implementation of hook_field_formatter().
File
- ./
shadowbox.module, line 613 - Shadowbox, a JavaScript media viewer application for displaying content in a modal dialogue.
Code
function theme_imagefield_image_imagecache_shadowbox($view_preset, $field, $item, $attributes = NULL, $gallery) {
$filepath = $item['filepath'];
$alt = $item['alt'];
$title = $item['title'];
$rel = $gallery ? 'shadowbox[' . $view_preset . ']' : 'shadowbox';
$link_attributes = array(
'rel' => $rel,
'title' => $item['title'] . $node_link,
);
if ($view_preset == 'original') {
$image = theme('shadowbox_image', $filepath, $alt, $title, $attributes);
}
else {
$image = theme('imagecache', $view_preset, $filepath, $alt, $item['title'], $attributes);
}
if ($item['shadowbox_preset'] == 'original') {
$output = l($image, file_create_url($filepath), $link_attributes, NULL, NULL, FALSE, TRUE);
}
else {
$output = l($image, shadowbox_imagecache_create_url($item['shadowbox_preset'], $filepath), $link_attributes, NULL, NULL, FALSE, TRUE);
}
return $output;
}