68 Classifieds Forums
Go Back   68 Classifieds Forums > v3.1.x Help & Support > v3.1 Questions & Support > Featured listings images
v3.1 Questions & Support Help and support for 68 Classifieds v3.1.x

 
Thread Tools Display Modes
(#1)
Old
michael michael is offline
Member
michael is on a distinguished road
 
Posts: 44
Join Date: Jan 2007
Default Featured listings images - 03-02-2007, 01:17 PM

Is there a way for all thumbnails appearing on the frontpage 'Featured Listings' to be of a uniform size?


v3.1.5b Developer
MKClassifieds.co.uk
"All truths are easy to understand once they are discovered; the point is to discover them" - Galileo Galilei (1564 - 1642)
Reply With Quote
(#2)
Old
suzkaw suzkaw is offline
Help you, I will.
suzkaw has a spectacular aura about
 
Posts: 1,814
Join Date: Mar 2006
Location: Belmont, NC
Default 03-02-2007, 01:52 PM

The only thing I can think of doing this is changing the template where the images are displayed. Just set a width="100" height="100" in the img tag.


--
Thanks,
Eric Barnes
68 Classifieds
Documentation - Modifications - My Blog

Reply With Quote
(#3)
Old
gregbatch gregbatch is offline
Senior Member
gregbatch is on a distinguished road
 
Posts: 121
Join Date: Jun 2006
Default 03-03-2007, 09:14 AM

Michael,

I set only one dimension so that photos are not distorted. Setting row height on the horizontal layout keeps a nice uniform row height and neat appearance. For verticle set only the width.

Do this where the featured ads are generated:
/includes/classes/smarty/plugins/function.feature_listings_horizontal.php[_vertical.php]

Code:
//start image $output.="<a href='". $link ."'><img src='".$loop[$x][image]."' border='0' height='75'></a><br />";
Check my site for example. Items like the "EV Eliminator" speaker or "Fender Jazz Bass" would push two rows high before I set a limit. Now it displays quite nicely.


Greg
3.1.4 Designer
www.valleywantads.com
Reply With Quote
(#4)
Old
michael michael is offline
Member
michael is on a distinguished road
 
Posts: 44
Join Date: Jan 2007
Default 03-03-2007, 01:03 PM

Thank you Greg, that works just as you described it. Can I ask for a little more help though?

Some users will post images smaller than the minimum we set. For example, I chose a vertical height of 70 pixels but my first test ad used an image with a height of only 49 pixels.

The hack you shared enlarges that image to 70px and of course distorts it. See the red sports car at http://www.mkclassifieds.co.uk/index.php

Can we introduce an if/else command that would resize the images to the height we choose only if they are of a greater height to begin with?


v3.1.5b Developer
MKClassifieds.co.uk
"All truths are easy to understand once they are discovered; the point is to discover them" - Galileo Galilei (1564 - 1642)
Reply With Quote
(#5)
Old
michael michael is offline
Member
michael is on a distinguished road
 
Posts: 44
Join Date: Jan 2007
Default 03-04-2007, 10:56 AM

Just bumping it 'cos i see you're online Greg


v3.1.5b Developer
MKClassifieds.co.uk
"All truths are easy to understand once they are discovered; the point is to discover them" - Galileo Galilei (1564 - 1642)
Reply With Quote
(#6)
Old
gregbatch gregbatch is offline
Senior Member
gregbatch is on a distinguished road
 
Posts: 121
Join Date: Jun 2006
Default 03-04-2007, 11:41 AM

Working on it now...


Greg
3.1.4 Designer
www.valleywantads.com
Reply With Quote
(#7)
Old
gregbatch gregbatch is offline
Senior Member
gregbatch is on a distinguished road
 
Posts: 121
Join Date: Jun 2006
Default 03-04-2007, 12:05 PM

This should do it:

Code:
//start image $setimghght='70px'; //set the height here $fimage = $loop[$x][image]; $findsize = getimagesize($fimage); $imgheight = $findsize[1]; if($imgheight>$setimghght){$imgheight=$setimghght;} $output.="<a href='". $link ."'><img src='".$fimage."' border='0' height='".$imgheight."'></a><br />";


Greg
3.1.4 Designer
www.valleywantads.com

Last edited by gregbatch : 03-04-2007 at 12:58 PM. Reason: correction
Reply With Quote
(#8)
Old
michael michael is offline
Member
michael is on a distinguished road
 
Posts: 44
Join Date: Jan 2007
Default 03-04-2007, 12:26 PM

Perfect! Thanks greg!


v3.1.5b Developer
MKClassifieds.co.uk
"All truths are easy to understand once they are discovered; the point is to discover them" - Galileo Galilei (1564 - 1642)
Reply With Quote
(#9)
Old
gregbatch gregbatch is offline
Senior Member
gregbatch is on a distinguished road
 
Posts: 121
Join Date: Jun 2006
Default 03-04-2007, 12:52 PM

Ooops! Better put the marks in just to be safe...

Code:
height='".$imgheight."'
It may work fine now, but could come back to haunt you if you move to another server.


Greg
3.1.4 Designer
www.valleywantads.com
Reply With Quote
(#10)
Old
michael michael is offline
Member
michael is on a distinguished road
 
Posts: 44
Join Date: Jan 2007
Default 03-04-2007, 12:55 PM

Much appreciated, thanks.


v3.1.5b Developer
MKClassifieds.co.uk
"All truths are easy to understand once they are discovered; the point is to discover them" - Galileo Galilei (1564 - 1642)
Reply With Quote


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
External.php of just featured ads? With images? Shinkaze v3.1 Questions & Support 5 01-09-2007 10:16 AM
Smarty Variables for Featured Listings? bgordon v3.1 Questions & Support 7 09-12-2006 12:50 PM
Featured Listings versatility v3.1 Questions & Support 1 08-09-2006 11:43 AM
Adding a heading to the Featured Listings sporthorsebreeder v3.1 Questions & Support 2 07-21-2006 12:04 PM
Adding a heading to the Featured Listings sporthorsebreeder v3.0 Questions & Support 1 07-21-2006 11:49 AM



Powered by vBulletin® Version 3.6.3
Copyright ©2000 - 2007, Jelsoft Enterprises Ltd.
vBulletin Skin developed by: vBStyles.com