View Single Post
  #3  
Old 09-12-2006, 07:37 PM
 
nft nft is offline
 

Advanced Member
  
Join Date: Apr 2004
Location: Sydney, Australia
Posts: 52
 

Default Re: Define Thumbnail Height, Not Width

Quote:
Originally Posted by balinor
Just edit product_thumbnail.tpl and hard-code the height in there.

I have had a look at product_thumbnail.tpl and I made the following changes:

Original File:

{* $Id: product_thumbnail.tpl,v 1.14 2004/06/24 09:53:29 max Exp $ *}
{if $config.Appearance.show_thumbnails eq "Y"}<IMG id="{$id}" src="{if $tmbn_url}{$tmbn_url}{else}{if $full_url}{$http_location}{else}{$xcart_web_dir}{/if}/image.php?productid={$productid}{if $file_upload_data.file_path}&tmp=y{/if}{/if}"{if $image_x ne 0} width="{$image_x}"{/if}{if $image_y ne 0} height="{$image_y}"{/if} alt="{$product|escape}" border="0">{/if}

Modified File:

{* $Id: product_thumbnail.tpl,v 1.14 2004/06/24 09:53:29 max Exp $ *}
{if $config.Appearance.show_thumbnails eq "Y"}<IMG id="{$id}" src="{if $tmbn_url}{$tmbn_url}{else}{if $full_url}{$http_location}{else}{$xcart_web_dir}{/if}/image.php?productid={$productid}{if $file_upload_data.file_path}&tmp=y{/if}{/if}"{if $image_x ne 0} height="{$image_x}"{/if}{if $image_y ne 0} width="{$image_y}"{/if} alt="{$product|escape}" border="0">{/if}

You will notice in the modified file I have changed width="{$image_x}" to height="{$image_x}" and height="{$image_y}" to width="{$image_y}"

This did change the thumbnail height based on the width setting in the 'Appearance Options' however this resizes the thumb image in the product description which was not the case before.

Does anyone know how to modify the script so that only the thumb images are re sized in the directory listings etc and not in the product description ?

I find it strange that the thumb image in the product description is re sized after I make this change as it was not re sized with the original script.

Any assistance appreciated.

James
__________________
X-Cart Pro 4.1.9
FreeBSD
Apache
MySQL 5
PHP 4.4.8
Reply With Quote