if ($thumb_size != 'o' && isset($file->media_thumb[$thumb_size])) { $p = path::info($file->file); $alpha = $p['extension'] == 'png' || $p['extension'] == 'PNG'; $thumb = sprintf($alpha ? $core->media->thumb_tp_alpha : $core->media->thumb_tp, $p['dirname'], $p['base'], '%s'); $thumb_file = sprintf($thumb, $thumb_size); $T = getimagesize($thumb_file); $stats = stat($thumb_file); echo '<h3>' . __('Thumbnail details') . '</h3>' . '<ul>' . '<li><strong>' . __('Image width:') . '</strong> ' . $T[0] . ' px</li>' . '<li><strong>' . __('Image height:') . '</strong> ' . $T[1] . ' px</li>' . '<li><strong>' . __('File size:') . '</strong> ' . files::size($stats[7]) . '</li>' . '<li><strong>' . __('File URL:') . '</strong> <a href="' . $file->media_thumb[$thumb_size] . '">' . $file->media_thumb[$thumb_size] . '</a></li>' . '</ul>'; } } // Show player if relevant if ($file_type[0] == 'audio') { echo dcMedia::audioPlayer($file->type, $file->file_url, $core->adminurl->get("admin.home", array('pf' => 'player_mp3.swf')), null, $core->blog->settings->system->media_flash_fallback); } if ($file_type[0] == 'video') { echo dcMedia::videoPlayer($file->type, $file->file_url, $core->adminurl->get("admin.home", array('pf' => 'player_flv.swf')), null, $core->blog->settings->system->media_flash_fallback); } echo '<h3>' . __('Media details') . '</h3>' . '<ul>' . '<li><strong>' . __('File owner:') . '</strong> ' . $file->media_user . '</li>' . '<li><strong>' . __('File type:') . '</strong> ' . $file->type . '</li>'; if ($file->media_image) { $S = getimagesize($file->file); echo '<li><strong>' . __('Image width:') . '</strong> ' . $S[0] . ' px</li>' . '<li><strong>' . __('Image height:') . '</strong> ' . $S[1] . ' px</li>'; unset($S); } echo '<li><strong>' . __('File size:') . '</strong> ' . files::size($file->size) . '</li>' . '<li><strong>' . __('File URL:') . '</strong> <a href="' . $file->file_url . '">' . $file->file_url . '</a></li>' . '</ul>'; if (empty($_GET['find_posts'])) { echo '<p><a class="button" href="' . $core->adminurl->get('admin.media.item', array_merge($page_url_params, array("find_posts" => 1, "tab" => "media-details-tab"))) . '">' . __('Show entries containing this media') . '</a></p>'; } else { echo '<h3>' . __('Entries containing this media') . '</h3>'; $params = array('post_type' => '', 'from' => 'LEFT OUTER JOIN ' . $core->prefix . 'post_media PM ON P.post_id = PM.post_id ', 'sql' => 'AND (' . 'PM.media_id = ' . (int) $id . ' ' . "OR post_content_xhtml LIKE '%" . $core->con->escape($file->relname) . "%' " . "OR post_excerpt_xhtml LIKE '%" . $core->con->escape($file->relname) . "%' "); if ($file->media_image) { # We look for thumbnails too