Support Forums

Thumbnails - sizing problem

This is a discussion on Thumbnails - sizing problem within the Technical Support forums, part of the Technical Support Forums category; I am having problems with thumbnails coming out different sizes even though it is defined in the image settings of ...


Go Back   68 Classifieds Forums > Technical Support Forums > Technical Support

This topic is resolved.

If you have a similar issue that this thread does not address, open a new related support topic.

 
Thread Tools Display Modes
Old 07-01-2008, 05:58 PM   #1
All Hands On Deck
 
 
Join Date: Mar 2008
Posts: 2,673
Rep Power: 65
seymourjames is a jewel in the rough
Default Thumbnails - sizing problem

I am having problems with thumbnails coming out different sizes even though it is defined in the image settings of the admin control panel. It makes listings look untidy. I do not know why it is doing this. Clearly it is a bug or a problem with my hosting provider (they assure me GD and GD2 are both supported).

Anyway , a good idea is to force the height and width of thumbnails in the showlistings.tpl and external.php files. Also many of the functions if you use them like function.css_feature_listings_horizontal.php etc.

For example in external.php

$imDescription = "<a href=". $link ."><img src='". URL . "/thumbs/small_" . $irs['image'] . "' align='left' style='margin: 0 5px 5px 0;' border='0' width='100' height='86' /></a>".$listing['description'].'<br clear="all" />';

Does anyone else have this problem? It may be me entirely.
seymourjames is offline  
Old 07-02-2008, 06:49 PM   #2
68 Evangelist & Developer
 
 
Join Date: Jan 2007
Location: Pennsylvania, USA
Posts: 1,941
Rep Power: 57
Mike-N-Tosh is just really nice Mike-N-Tosh is just really nice
Default

Quote:
Originally Posted by seymourjames
$imDescription = "<a href=". $link ."><img src='". URL . "/thumbs/small_" . $irs['image'] . "' align='left' style='margin: 0 5px 5px 0;' border='0' width='100' height='86' /></a>".$listing['description'].'<br clear="all" />';
I don't know if this is the issue or not, however if the code you posted is what you are using, then you need to define your width and height with the proper measurement indicator. I assume you mean: width='100px' height='86px'. Although theoretically, they should default to pixels, that is NOT always the case.

-Mike
__________________
Mike-N-Tosh
IndianaPC.org - A community website (v3.1.10 Developer - heavily modified & used as the CMS)
Sandbox [localhost(v3.1.10, v4.0.9, 4.1.10)] for development and customization
Visit My blog: reviews, tips, tricks, tutorials and my store with Templates, Mods & Docs
Web Hosting | Web Design & Development | 68 Classifieds Customizations
I am not a 68C employee, just a user and try to help out
Mike-N-Tosh is offline  
Old 07-02-2008, 07:18 PM   #3
curmudgeon
 
Join Date: Mar 2006
Posts: 5,229
Rep Power: 128
Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light
Default

Quote:
Originally Posted by seymourjames
Anyway , a good idea is to force the height and width of thumbnails in the showlistings.tpl and external.php files. Also many of the functions if you use them like function.css_feature_listings_horizontal.php etc.
Actually forcing a height and width can distort your images making your site look amatureish. It may be tidy but its pretty sad when you see a stretched out or squished thumbnail.
__________________
Larry

Knowledge learned is more valuable than knowledge given.
Lhotch is offline  
Old 07-03-2008, 05:35 AM   #4
Genius At Work
 
bowers01's Avatar
 
Join Date: May 2008
Location: Geelong, Victoria, Australia
Posts: 1,039
Rep Power: 29
bowers01 is on a distinguished road
Default

This can be definded in admin > image settings but only define the width then it still looks neat but the photos wont get stretched or shrunk.
Nick
bowers01 is offline  
Old 07-03-2008, 09:08 AM   #5
curmudgeon
 
Join Date: Mar 2006
Posts: 5,229
Rep Power: 128
Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light
Default

Quote:
Originally Posted by bowers01
This can be definded in admin > image settings but only define the width then it still looks neat but the photos wont get stretched or shrunk.
Nick
The logic attempts to keep the aspect ratio of the original image. Depending on whats submitted that may mean one image/thumbnail will be wider or shorter than the one next to it and I believe this is what seymourjames is talking about but maybe im misunderstanding him.
__________________
Larry

Knowledge learned is more valuable than knowledge given.
Lhotch is offline  
Old 07-03-2008, 03:44 PM   #6
All Hands On Deck
 
 
Join Date: Mar 2008
Posts: 2,673
Rep Power: 65
seymourjames is a jewel in the rough
Default

Exactly,

The problem is when the widths are different. It looks ragged. Anyway, I have hard coded the height and widths (good point about pixels). It looks better and encourages people (in my case properties) to put in photos which scale nicely.
seymourjames is offline  
Old 07-03-2008, 04:09 PM   #7
curmudgeon
 
Join Date: Mar 2006
Posts: 5,229
Rep Power: 128
Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light
Default

Quote:
Originally Posted by seymourjames
Exactly,

The problem is when the widths are different. It looks ragged. Anyway, I have hard coded the height and widths (good point about pixels). It looks better and encourages people (in my case properties) to put in photos which scale nicely.
So how do you prevent images from looking distorted?
__________________
Larry

Knowledge learned is more valuable than knowledge given.
Lhotch is offline  
Old 07-03-2008, 04:20 PM   #8
All Hands On Deck
 
 
Join Date: Mar 2008
Posts: 2,673
Rep Power: 65
seymourjames is a jewel in the rough
Default

I can't. But I have noticed more people using common sense. In my case they put photos in which are basically square or a little wider than tall. If they put in photos which are very tall with no width they get a poor result and tend to change the photo or edit it and re-enter it. Given they are trying to sell a big ticket item like a house, they seem to do it - not always. Perhaps I should put some advice on the data entry page to say, please put photos on which are going to scale nicely. I think I will do that.
seymourjames is offline  
Old 07-03-2008, 04:23 PM   #9
curmudgeon
 
Join Date: Mar 2006
Posts: 5,229
Rep Power: 128
Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light
Default

Quote:
Originally Posted by seymourjames
I can't. But I have noticed more people using common sense. In my case they put photos in which are basically square or a little wider than tall. If they put in photos which are very tall with no width they get a poor result and tend to change the photo or edit it and re-enter it. Given they are trying to sell a big ticket item like a house, they seem to do it - not always. Perhaps I should put some advice on the data entry page to say, please put photos on which are going to scale nicely. I think I will do that.
Guidance would certainly be nice for the client but I think you will have to be a bit more specific than saying "please put photos on which are going to scale nicely". One of my hobbies is digital photography so I am as fluent in it as I am with coding and that phrase doesnt mean anything to me.
__________________
Larry

Knowledge learned is more valuable than knowledge given.
Lhotch is offline  
Old 07-03-2008, 04:38 PM   #10
All Hands On Deck
 
 
Join Date: Mar 2008
Posts: 2,673
Rep Power: 65
seymourjames is a jewel in the rough
Default

So this is what I put in the useraddimages.tpl file. Can you phrase it better?

For best results enter roughly square photos . Photos are displayed 254 pixels width x 218 pixels height.
seymourjames is offline  

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0