Custom thumbs issue Custom thumbs issue
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Custom thumbs issue

Started by donnoman, March 29, 2005, 01:07:31 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

donnoman

I wonder if someone else can confirm what I'm experiencing.

When adding custom thumbnails to an album the thumbnails become 1px x 1px tall. In Editpics they show correctly.


omniscientdeveloper


Have you made sure the extension for the thumbs are lowercase?

donnoman

Only one was uppercase as it was; changed it to lowercase, no change in the thumbs issue. But good thought.

Casper

Did you check the extensions for the main files as well, that also causes problems.  Also if there are spaces in any of the folder names.
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

Joachim Müller


donnoman

both original filenames and the thumbs are all using lowercase names and extensions and I still see the same behaviour.

donnoman

I moved the files from my production gallery to my test gallery and reproduced the problem.

I didn't notice on my production gallery because I had notices turned off, my development gallery however outputs the following:



\include\functions.inc.php
Warning line 1685: getimagesize(albums/Distribution%20Frame%20Solutions/thumb_adc-edf.jpg): failed to open stream: No such file or directory
Warning line 1685: getimagesize(albums/Distribution%20Frame%20Solutions/thumb_adc-structured.jpg): failed to open stream: No such file or directory
Warning line 1685: getimagesize(albums/Distribution%20Frame%20Solutions/thumb_apc-infrastruxure.jpg): failed to open stream: No such file or directory
Warning line 1685: getimagesize(albums/Distribution%20Frame%20Solutions/thumb_apc-networkair-cm.jpg): failed to open stream: No such file or directory
Warning line 1685: getimagesize(albums/Distribution%20Frame%20Solutions/thumb_apc-networkair-pa.jpg): failed to open stream: No such file or directory


donnoman

in display_thumbnails I added a urldecode() to the getimagesize call and it fixed the problem.


                        if (!is_image($row['filename'])) {
                                $image_info = getimagesize(urldecode($pic_url));
                                $row['pwidth'] = $image_info[0];
                                $row['pheight'] = $image_info[1];
                        }


Shall I commit?

Joachim Müller

yes, please commit. Anything that fixes the issue is fine.

Joachim

Casper

Quote from: donnoman on April 10, 2005, 02:57:54 AM
I moved the files from my production gallery to my test gallery and reproduced the problem.

I didn't notice on my production gallery because I had notices turned off, my development gallery however outputs the following:



\include\functions.inc.php
Warning line 1685: getimagesize(albums/Distribution%20Frame%20Solutions/thumb_adc-edf.jpg): failed to open stream: No such file or directory


That explains why it was happening though, you have spaces in your folder names.

Quote from: Casper on March 29, 2005, 09:01:09 PM
Also if there are spaces in any of the folder names.

Good to see this fixed
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

donnoman

The whole gallery was created with Nibbler's Timer.php. And the directory names become the cat's and alb's so using spaces is a necessity If I wanted the end result to look good.

I comitted my fixes, there were more instances of that line in three different files that I committed as well.

Marking fixed.