function _emthumb_imagecache_formatter_default in Embedded Media Field 6
Same name and namespace in other branches
- 6.3 contrib/emthumb/emthumb.theme.inc \_emthumb_imagecache_formatter_default()
- 6.2 contrib/emthumb/emthumb.theme.inc \_emthumb_imagecache_formatter_default()
Returns the path to the imagecache image, or the original item if it's external.
9 calls to _emthumb_imagecache_formatter_default()
- theme_emthumb_imagecache_formatter_default in contrib/
emthumb/ emthumb.theme.inc - Returns the imagecache image by itself.
- theme_emthumb_imagecache_formatter_full in contrib/
emthumb/ emthumb.theme.inc - Returns the imagecache image linked to a full media display.
- theme_emthumb_imagecache_formatter_imagelink in contrib/
emthumb/ emthumb.theme.inc - Returns the imagecache image linked to the original image.
- theme_emthumb_imagecache_formatter_lightbox2 in contrib/
emthumb/ emthumb.theme.inc - Returns the imagecache image linked to a modal lightbox2.
- theme_emthumb_imagecache_formatter_linked in contrib/
emthumb/ emthumb.theme.inc - Returns the imagecache image linked to the node.
File
- contrib/
emthumb/ emthumb.theme.inc, line 144 - Theme functions for the Embedded Media Thumbnail module.
Code
function _emthumb_imagecache_formatter_default($element, $options = NULL) {
if (!isset($options)) {
$options = _emthumb_formatter_theme_helper($element);
}
if ($thumbnail = emthumb_thumbnail_path($options['item'])) {
return theme('imagecache', $options['presetname'], $thumbnail);
}
switch ($options['module']) {
case 'emvideo':
// Look for a local file first for imagecaching.
$options['return_url'] = $options['raw'] = TRUE;
$thumbnail = theme('emvideo_video_thumbnail', $options['field'], $options['item'], $options['formatter'], $options['node'], TRUE, $options);
if (url($thumbnail) != url($thumbnail, array(
'absolute' => TRUE,
))) {
return theme('imagecache', $options['presetname'], $thumbnail);
}
return theme('image', $thumbnail);
}
}