function theme_imagepicker_view in Image Picker 6.2
3 theme calls to theme_imagepicker_view()
File
- ./
imagepicker.module, line 1441 - Enables permitted roles to upload images for insertion into configured nodes.
Code
function theme_imagepicker_view($img, $imgpath, $info, $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'] . '</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', $header, $rows);
unset($header);
unset($rows);
}
$output .= '</div>';
}
else {
// from an external source eg exiftool
$output .= '<pre>';
$output .= check_plain($exifinfo);
$output .= '</pre>';
$output .= '</div>';
}
}
$output .= '</div>';
return $output;
}