View Single Post
  #36  
Old 10-04-2008, 05:44 PM
 
xtestedx xtestedx is offline
 

Advanced Member
  
Join Date: Oct 2005
Location: Sydney
Posts: 61
 

Default Re: Dynamic Images - a FREE mod for image resizing!

ok i got it working in 4.11.1 or watever (its the latest)
for The thumbnail
product_thumbnail.tpl

just replace the whole lot

Code:
{* $Id: product_thumbnail.tpl,v 1.19 2005/11/17 06:55:36 max Exp $ *} {strip} {* PHP Site Solutions - Dynamic Images *} {if $active_modules.PHPSS_Dynamic_Images ne ""} {if $config.Appearance.show_thumbnails eq "Y" or ($type ne "T" and $type ne "")} {if $main eq "catalog" || $main eq "search" || $main eq "manufacturer_products" || $main eq "download_home"} {if !$alt} {assign var=alt value=$product} {/if} {/if} {if $tmbn_url} {if $usertype eq 'A' || $usertype eq 'P'} {assign var="tfile" value=$tmbn_url|replace:"`$http_location`/":"../"|replace:"`$https_location`/":"../"} {else} {assign var="tfile" value=$tmbn_url|replace:"`$http_location`/":""|replace:"`$https_location`/":""} {/if} {if !$class} {assign var="class" value="thumb"} {/if} {if !$sharpen} {assign var="sharpen" value="true"} {/if} {if !hint} {assign var="hint" value="false"} {/if} {if !overlay_position} {assign var="overlay_position" value="5"} {/if} {thumb file="$tfile" width="$image_x" link="false" hint="false" overlay_position="$overlay_position" overlay="$overlay" sharpen="$sharpen" get_image_path="$get_image_path" html="class=\"$class\" alt=\"`$alt`\""} {else} {* Capture the image tag and clean out extra whitespaces *} {capture assign="img_cln"} <img {if $id}id="{$id}"{/if} src="{if $full_url}{$http_location}{else}{$xcart_web_dir}{/if}/image.php?type={$type|default:"T"}&amp;id={$productid}{if $file_upload_data.file_path}&tmp=y{/if}" {if $image_x ne 0}width="{$image_x}"{/if} {if $image_y ne 0}height="{$image_y}"{/if} alt="{$product|escape}" {if $align}align="{$align}"{/if} {if $class}class="{$class}"{/if} /> {/capture} {$img_cln|strip} {/if} {/if} {else} {if $config.Appearance.show_thumbnails eq "Y" or ($type ne "T" and $type ne "")}<img{if $id ne ''} id="{$id}"{/if} src="{if $tmbn_url}{$tmbn_url}{else}{if $full_url}{$http_location}{else}{$xcart_web_dir}{/if}/image.php?type={$type|default:"T"}&amp;id={$productid}{/if}"{if $image_x ne 0} width="{$image_x}"{/if}{if $image_y ne 0} height="{$image_y}"{/if} alt="{$product|escape}" />{/if} {/if} {* / PHP Site Solutions - Dynamic Images *} {/strip}

for skin1/customer/main/product.tpl if you have cartlabs css template just think of ' Pimg box' as ==> <div class="product_thumb">

[code]
Copying what someone said earlier cause it works

Quote:
Originally Posted by pcparts
And i just tried this on a stock 4.1.11 product.tpl

change this part

Code:
{if $active_modules.Detailed_Product_Images ne "" && $config.Detailed_Product_Images.det_image_popup eq 'Y' && $images ne '' && $js_enabled eq 'Y'} {include file="modules/Detailed_Product_Images/popup_image.tpl"} {else} {include file="product_thumbnail.tpl" productid=$product.image_id image_x=$product.image_x image_y=$product.image_y product=$product.product tmbn_url=$product.image_url id="product_thumbnail" type=$product.image_type}&nbsp; {/if} {if $active_modules.Magnifier ne "" and $config.Magnifier.magnifier_image_popup eq 'Y' and $zoomer_images ne '' and $js_enabled eq 'Y' and $printable neq 'Y'} {include file="modules/Magnifier/popup_magnifier.tpl"} {/if}

With this

Code:
{* PHP Site Solutions - Dynamic Images *} {if $active_modules.PHPSS_Dynamic_Images ne ""} {assign var=phpss_dyn_img_width value=$config.PHPSS_Dynamic_Images.phpss_dyn_img_prodtpl_img_width} {/if} {* / PHP Site Solutions - Dynamic Images *} {if $active_modules.Detailed_Product_Images ne "" && $config.Detailed_Product_Images.det_image_popup eq 'Y' && $images ne '' && $js_enabled eq 'Y'} {include file="modules/Detailed_Product_Images/popup_image.tpl"} {else} {include file="product_thumbnail.tpl" productid=$product.variantid image_x=$phpss_dyn_img_width|default:$product.image_x product=$product.product tmbn_url=$product.image_url id="product_thumbnail" type=$product.image_type}&nbsp; {/if} {if $active_modules.Magnifier ne "" and $config.Magnifier.magnifier_image_popup eq 'Y' and $zoomer_images ne '' and $js_enabled eq 'Y' and $printable neq 'Y'} {include file="modules/Magnifier/popup_magnifier.tpl"} {/if}

Hope this helps.

This is what it comes out as http://www.slixaustralia.com.au/xcart4.1/xcart1/product.php?productid=16133&cat=3&page=1#
__________________
x-cart 4.1.11 yay finally starting to get the hang of this stuff!!
site: www.slixaustralia.com.au
Reply With Quote