[Bug] Custom thumbnail for non-image file [Bug] Custom thumbnail for non-image file
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

[Bug] Custom thumbnail for non-image file

Started by Bonelyfish, February 01, 2005, 05:09:03 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Bonelyfish

Spent an hour to make a custom thumbnail for an AVI movie following the doc. There is a catch not mentioned but may be some of you already know:

For non-image file uploaded the extension should be in lowercase or the custom thumbnail won't display.

Hope this will help.

Hein Traag

It is already mentioned in http://forum.coppermine-gallery.net/index.php?topic=10273.msg38683#msg38683

Although i agree the first post in that thread should be edited a little to make it more clear that it should be lower case (although all examples are already in lower case)


toppa

If you prefer to not always have to remember to lower-case the file extension, you can go into include/functions.inc.php and in the get_pic_url function, change the line:

$file_base_name = str_replace('.'.$mime_content['extension'],'',basename($pic_row['filename']));

to

$file_base_name = str_replace('.'.$mime_content['extension'],'',strtolower(basename($pic_row['filename'])));

or, if you have PHP5, change str_replace to str_ireplace()