mediaFile->getId(); $class = 'select mediafile mf_' . $this->mediaFile->getIcoClass(); $info = trim($this->formatDimensions('') . ' ' . $this->formatDate() . ' ' . $this->formatFileSize()); $jump = $this->scrollIntoView ? 'id="scroll__here"' : ''; echo '
'; echo '' . $this->formatDisplayName() . ' '; echo '(' . $info . ')' . NL; // view button $link = ml($id, '', true); echo ' '; // mediamanager button $link = wl('', ['do' => 'media', 'image' => $id, 'ns' => getNS($id)]); echo ' '; // delete button if ($this->mediaFile->isWritable() && $this->mediaFile->userPermission() >= AUTH_DELETE) { $link = DOKU_BASE . 'lib/exe/mediamanager.php?delete=' . rawurlencode($id) . '&sectok=' . getSecurityToken(); echo ' ' . '' . $lang['btn_delete'] . ''; } echo '
'; echo $lang['mediausage'] . ' {{:' . $id . '}}'; echo '
'; if ($this->mediaFile->isImage()) $this->showDetails(); echo '
' . NL; echo '
' . NL; } /** * Show Thumbnail and EXIF data */ protected function showDetails() { $id = $this->mediaFile->getId(); echo '
'; echo '
'; echo ''; echo $this->getPreviewHtml(120, 120); echo ''; echo '
'; // read EXIF/IPTC data $t = $this->mediaFile->getMeta()->getField(['IPTC.Headline', 'xmp.dc:title']); $d = $this->mediaFile->getMeta()->getField([ 'IPTC.Caption', 'EXIF.UserComment', 'EXIF.TIFFImageDescription', 'EXIF.TIFFUserComment' ]); if (PhpString::strlen($d) > 250) $d = PhpString::substr($d, 0, 250) . '...'; $k = $this->mediaFile->getMeta()->getField(['IPTC.Keywords', 'IPTC.Category', 'xmp.dc:subject']); // print EXIF/IPTC data if ($t || $d || $k) { echo '

'; if ($t) echo '' . hsc($t) . '
'; if ($d) echo hsc($d) . '
'; if ($t) echo '' . hsc($k) . ''; echo '

'; } echo '
'; } }