function template_preprocess_image_detail_view in Node Gallery 6.2
File
- theme/
theme.inc, line 79 - theme/theme.inc Node gallery theme functions
Code
function template_preprocess_image_detail_view(&$vars) {
$node = $vars['image'];
$config = $vars['config'];
$image_view = theme('image_view', $config['image_size']['preview'], $node);
switch ($config['original']['view_original']) {
case 'default':
$output = l($image_view, file_create_url($node->filepath), array(
'attributes' => array(
'target' => '_blank',
),
'html' => TRUE,
));
break;
case 'text':
$download_text = empty($config['original']['view_original_text']) ? t('Download the Original Image') : $config['original']['view_original_text'];
$output = $image_view;
$extra = '<div class="download-full-link">' . l($download_text, file_create_url($node->filepath), array(
'attributes' => array(
'target' => '_blank',
),
'html' => FALSE,
)) . '</div>';
break;
default:
$output = $image_view;
break;
}
$vars['image'] = $output;
$vars['extra'] = $extra;
}