function theme_imagepicker_fview in Image Picker 7
2 theme calls to theme_imagepicker_fview()
File
- ./
imagepicker.module, line 1578 - @author Bob Hutchinson http://drupal.org/user/52366 @copyright GNU GPL
Code
function theme_imagepicker_fview($variables) {
$img = $variables['img'];
$imgpath = $variables['imgpath'];
$info = $variables['info'];
$exifinfo = $variables['exifinfo'];
$output = '<div id="imgp_img_view">';
$output .= $img->img_title ? '<div id="imgp_img_view_title">' . $img->img_title . '</div>' : '';
$output .= '<img id="imgp_img_view_img" src="' . $imgpath . '" alt="' . $img->img_title . '" title="' . $img->img_name . '" />';
$output .= $img->img_description ? '<div id="imgp_img_view_desc">' . nl2br($img->img_description) . '</div>' : '';
$output .= '<div>';
$output .= t('Width') . ": " . $info['width'] . " ";
$output .= t('Height') . ": " . $info['height'] . " ";
$output .= t('Type') . ": " . $info['extension'] . " ";
$output .= t('Size') . ": " . $info['file_size'];
$output .= '</div>';
if ($exifinfo) {
$output .= '<a id="imgp_trig">' . t('Show/Hide Exif Info') . '</a>';
$output .= '<div id="imgp_targ" >';
if (is_array($exifinfo)) {
// using php function exif_read_data().
foreach ($exifinfo as $key => $section) {
$header = array(
array(
'data' => drupal_ucfirst(drupal_strtolower($key)),
'colspan' => 2,
),
);
$rows = array();
foreach ($section as $name => $val) {
if ($key == 'COMMENT') {
$a = explode(':', $val);
$rows[] = array(
$a[0] . ':',
$a[1],
);
}
else {
$rows[] = array(
$name . ': ',
$val,
);
}
}
$output .= theme('table', array(
'header' => $header,
'rows' => $rows,
));
unset($header);
unset($rows);
}
}
else {
// from an external source eg exiftool
$output .= '<pre>' . check_plain($exifinfo) . '</pre>';
}
$output .= '</div>';
}
$output .= '</div>';
return $output;
}