diff --git a/classes/FileItem.php b/classes/FileItem.php index 4d51f54..af6a47f 100644 --- a/classes/FileItem.php +++ b/classes/FileItem.php @@ -86,8 +86,24 @@ class FileItem extends Item . '?thumbnail='. Url::translate_uri($this -> parent_dir . $filename) . '"' . ' alt="' . $words -> __get('thumbnail of') . ' ' . $filename . '"' . ' />'; + $this -> thumb_link .= ' ' . $words -> __get('view') . ' ' . $words -> __get('file') . ''; } - if (THUMBNAIL_HEIGHT && in_array(self::ext($filename), array('avi', 'thm', 'mkv', 'asf', 'mov', 'wmv', '3gp'))) + elseif (THUMBNAIL_HEIGHT && in_array(self::ext($filename), array('thm', 'thm'))) + { + $this -> thumb_link = ' ' . $words -> __get('thumbnail of') . ' ' . $filename . ''; + $this -> thumb_link .= ' ' . $words -> __get('view') . ' ' . $words -> __get('file') . ''; + } + + if (THUMBNAIL_HEIGHT && in_array(self::ext($filename), array('avi', 'mkv', 'asf', 'mov', 'wmv', '3gp'))) { $mime = new MimeType($filename); $finfo = finfo_open(FILEINFO_MIME_TYPE); @@ -115,6 +131,10 @@ class FileItem extends Item . ' type="' . $file_mime . ', ' . $mimetype . ', application/octet-stream"' . ' />Your browser does not support the video element. '; } + $this -> thumb_link .= ' ' . $words -> __get('view') . ' ' . $words -> __get('file') . ''; } if (THUMBNAIL_HEIGHT && in_array(self::ext($filename), array('svg', 'xml'))) { diff --git a/classes/Image.php b/classes/Image.php index 368f641..d960e57 100644 --- a/classes/Image.php +++ b/classes/Image.php @@ -245,6 +245,13 @@ class Image $src = @imagecreatefromgif($file); break; } + /* + case 'thm': + { + $src = @exif_thumbnail($file, THUMBNAIL_HEIGHT, THUMBNAIL_HEIGHT, 'image/jpg'); + break; + } + */ case 'jpeg': case 'jpg': case 'jpe':