Browse Source

Merge branch 'master' of github.com:Islandora/islandora

pull/105/head
root 14 years ago
parent
commit
9ef3dbc09e
  1. 43
      plugins/Exiftool.inc

43
plugins/Exiftool.inc

@ -33,29 +33,30 @@ class Exiftool {
function displayMetadata() { function displayMetadata() {
$output=''; $output='';
$exifDom = DOMDocument::loadXML($this->item->get_datastream_dissemination('EXIF')); $exifDom = DOMDocument::loadXML($this->item->get_datastream_dissemination('EXIF'));
if ($exifDom != NULL) {
$description = $exifDom->getElementsByTagNameNS('http://www.w3.org/1999/02/22-rdf-syntax-ns#','Description'); $description = $exifDom->getElementsByTagNameNS('http://www.w3.org/1999/02/22-rdf-syntax-ns#','Description');
if ($description->length > 0) { if ($description->length > 0) {
$description=$description->item(0); $description=$description->item(0);
$output .= '<div class="fedora_technical_metadata"><ul>'; $output .= '<div class="fedora_technical_metadata"><ul>';
for ($i=0;$i<$description->childNodes->length;$i++){ for ($i=0;$i<$description->childNodes->length;$i++){
$name=$description->childNodes->item($i)->nodeName; $name=$description->childNodes->item($i)->nodeName;
$value=$description->childNodes->item($i)->nodeValue; $value=$description->childNodes->item($i)->nodeValue;
if ($name != '#text' && !preg_match('/^System\:.*$/',$name) && trim($value) != '') { if ($name != '#text' && !preg_match('/^System\:.*$/',$name) && trim($value) != '') {
list($type,$name) = preg_split('/\:/',$name); list($type,$name) = preg_split('/\:/',$name);
$name = trim(preg_replace('/(?<!^)([A-Z][a-z]|(?<=[a-z])[A-Z])/'," $1", $name)); $name = trim(preg_replace('/(?<!^)([A-Z][a-z]|(?<=[a-z])[A-Z])/'," $1", $name));
$output .= '<li><b>'.$name. '</b>: '. $value .' </li>'; $output .= '<li><b>'.$name. '</b>: '. $value .' </li>';
}
} }
$output.='</ul></div>';
$fieldset = array(
'#title' => t("!text", array('!text' => 'Technical Metadata')),
'#collapsible' => TRUE,
'#collapsed' => TRUE,
'#value' => $output
);
$output = theme('fieldset', $fieldset);
} }
$output.='</ul></div>';
$fieldset = array(
'#title' => t("!text", array('!text' => 'Technical Metadata')),
'#collapsible' => TRUE,
'#collapsed' => TRUE,
'#value' => $output
);
$output = theme('fieldset', $fieldset);
} }
return $output; return $output;
} }

Loading…
Cancel
Save