Jump to content
The Corroboree
Sign in to follow this  
Darklight

Stupid gallery thumbnails question

Recommended Posts

Just wondering why some people's uploads come up in the Gallery section looking solarised, overexposed or too dark? I thought it was because they weren't good pics, but once you open the actual thumbnail in the gallery they come up fine?

It happened to my recent uploads too, and they aren't bad pics. The dodgy thumbnails are a bit of a disincentive to open up the larger pic tho, cos they look so bad

Share this post


Link to post
Share on other sites

If you look at the source, you'll see the height and width variables are some sort of crappy javascript hack into the href.

width and height should be in the img tag.

 

code:


Click to view full size image

That's for the link, but I assume they're using the same code to display the image on the thumbnails.

It should be more like

 

code:


blah

Share this post


Link to post
Share on other sites

Bag that last comment.

It appears when you upload an image it creates a thumbnail.

Thumbnail generation code must suck, or have outdated libraries on the system. I'd have to look at the actual code to figure out which one.

EDIT:

OK so what happens is, when you upload a file, it generates a thumbnail called thumb_concatenatedfilename and a "normal" called normal_concatenatedfilename ...

Obviously whatever is doing the resizing (should be using ImageMagicks mogrify) is causing the issue.

If you're good, when I get home tonight I'll download the gallery software and see how it does it at home...

Of course if T listened to me and integrated the gallery into the forum so each user had their own, we wouldnt have this issue :)

This thread may shed a little tinkle of light on the issue (hehe I said tinkle).

http://www.ubbcentral.com/cgi-bin/ultimate...=5;t=005098;p=0

[ 28. April 2005, 06:36: Message edited by: apothecary ]

Share this post


Link to post
Share on other sites

There were problems with accessing ImageMagick on this server, so I used the other script the software recommends. I'll see if I can sort out the problem with IM, cos that seemd to make pretty good thumbs.

Actually, just had a oook at it and this is unbearably crappy. Will make it a priority - although priority at this point means next week, sorry.

Apoth - no gallery integrates with UBB classic. I am hoping that there will be a gallery with the new UBB php version next month. After the release I'll consider my options.

I might need your help with the image magick problem. Apparently the issue is caused by the server running in "badly configured safe mode". That means nothing to me though....

Share this post


Link to post
Share on other sites
Torsten:

although priority at this point means next week, sorry.

No worries, I wasn't in a hurry for it, just wondering if summat could be done :) Thanks both of you

Share this post


Link to post
Share on other sites

There is no such thing as "a badly configured safe mode". Some people don't like the PHP safe mode because it's restrictive in some areas and not restrictive enough in others.

But it does what it says it does. Here's the go.

In PHP safe mode, scripts don't have the rights (permission) to execute shell commands (in this case /usr/bin/convert or /usr/bin/mogrify). In this case you need to ask the provider to either turn safe mode off...or ...and I'm not entirely sure this will work but you can possibly install your own version of ImageMagick (probably very insecure) and use safe_mode_exec_dir php variable to execute it from there.

Mmrmrmr.

As it stands, images are resized using GD, which isn't hindered by safe mode restrictions.

My advice is thus: ask your hoster to upgrade their gd libraries (http://www.boutell.com/gd/), and see if that solves the issue. If it doesn't then you may as well wait it out until UBB PHP comes out, and then decide on where you want to go from there.

Share this post


Link to post
Share on other sites

remember I am my own host now as I am on a VPS. Does that help with installing stuff?

Share this post


Link to post
Share on other sites

Yep, in that case it's simple.

Turn off php safe mode and tell Copperfield to use imagemagick

Share this post


Link to post
Share on other sites

Originally posted by apothecary:

Yep, in that case it's simple.

Turn off php safe mode

You make it sound so simple!

Which it probably is, but I have no idea where to start.

Share this post


Link to post
Share on other sites

Find your php.ini

Look for a line that says

safe_mode 1

or similar. Change the 1 to 0

Share this post


Link to post
Share on other sites

I don't think I have access to that. will ask.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×