Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

free Dynamic Images module released

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #11  
Old 08-31-2008, 01:05 PM
 
gotpump gotpump is offline
 

eXpert
  
Join Date: Aug 2008
Posts: 272
 

Default Re: free Dynamic Images module released

Warning: imagecopyresampled(): supplied argument is not a valid Image resource in /var/www/vhosts/sitonthis.ca/httpdocs/us/include/templater/plugins/function.thumb_imp.php on line 507
Warning: imagedestroy(): supplied argument is not a valid Image resource in /var/www/vhosts/sitonthis.ca/httpdocs/us/include/templater/plugins/function.thumb_imp.php on line 653
Is the warning msg I keep getting. Also is there a way for me to edit the thumbnail height? I'd like to just set a standard img size for all thumbnails accross the entire site. Any help would be great.
__________________
X-Cart DB Version: 5
Reply With Quote
  #12  
Old 09-01-2008, 06:34 AM
  coppercup's Avatar 
coppercup coppercup is offline
 

Senior Member
  
Join Date: Mar 2007
Location: Oklahoma
Posts: 117
 

Default Re: free Dynamic Images module released

Not sure about the errors without digging deeper. If you applied the patch file via the administration, you can open the actual patch file with a text editor and verify that all of the lines of code that were supposed to be changed were indeed changed. For instructions on how to read patch files, see the How To Install Patches FAQ here:

https://secure.qualiteam.biz/customer.php?area=faq&target=view_faq_question&sub ject=536870928

As for the ability to size the thumbnails to a specific height and width, yes you can. Open skin1/product_thumbnail.tpl and find this line of code:

Code:
{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`\""}

After the width="$image_x" declaration add:
Code:
height="100" crop="true"

Change the "100" to your desired thumbnail height. Note that $image_x is the value you set for thumbnail widths in the Admin Settings. The crop declaration forces the image to be resized to the new dimensions while maintaining the original proportions.

For more information about the available parameters, see the comments at the top of this file: include/templater/plugins/function.thumb_imp.php.

Hope this helps.
__________________
Happy coding!
Fritz
x-cart 4.1.10

Copper Cup Images Print, Web & Multimedia Design
www.coppercupimages.com
Reply With Quote
  #13  
Old 09-01-2008, 09:03 AM
 
gotpump gotpump is offline
 

eXpert
  
Join Date: Aug 2008
Posts: 272
 

Default Re: free Dynamic Images module released

That "sorta" worked But it changed all the images of the pictures once you get into the product details.

I just need to resize the product page where it's showing multiple products on 1 page. Not the Main picture in the details.

I fixed the warning code by restoring my product_thumbnail.tpl file. Apperently I messed with it pretty good
__________________
X-Cart DB Version: 5
Reply With Quote
  #14  
Old 09-02-2008, 05:51 AM
  coppercup's Avatar 
coppercup coppercup is offline
 

Senior Member
  
Join Date: Mar 2007
Location: Oklahoma
Posts: 117
 

Default Re: free Dynamic Images module released

This is just off the top of my head, without looking, but that means the product_thumbnail.tpl is used for the category product list thumbnails as well as the product detailed images thumbnails.

That being the case, if you want them to be two different sizes, the best solution might be to make a duplicate of the product_thumbnail.tpl, name it something like product_cats_thumbnail.tpl, change the thumbnail dimensions, and then reference that template instead of the original in the template that builds the product list (can't remember the name of that template off the top of my head).

Glad you fixed your other problem.
__________________
Happy coding!
Fritz
x-cart 4.1.10

Copper Cup Images Print, Web & Multimedia Design
www.coppercupimages.com
Reply With Quote
  #15  
Old 09-05-2008, 05:20 PM
 
gotpump gotpump is offline
 

eXpert
  
Join Date: Aug 2008
Posts: 272
 

Default Re: free Dynamic Images module released

That worked perfectly. The file I edited to read product_cats_thumbnail.tpl was in File: /customer/main/products_t.tpl

Just for future reference.
__________________
X-Cart DB Version: 5
Reply With Quote
  #16  
Old 09-08-2008, 10:28 PM
 
frank678 frank678 is offline
 

Advanced Member
  
Join Date: Apr 2005
Posts: 65
 

Default Re: free Dynamic Images module released

I am trying to uninstall the mod because I do not have fcopen enabled and it's throwing up errors when I use it in conjunction with the lytebox mod.

I've uninstalled everything but do not know how to reverse the sql patch. Any help with ths would be greatly appreciated!

thank you!
__________________
4.1.10 Gold
Reply With Quote
  #17  
Old 09-17-2008, 04:19 PM
  davidsaldana's Avatar 
davidsaldana davidsaldana is offline
 

Senior Member
  
Join Date: Oct 2005
Posts: 187
 

Default Re: free Dynamic Images module released

Has anyone gotten this to work with 4.1.11 branch?
__________________
4.4
Code:
Hello World
Reply With Quote
  #18  
Old 09-19-2008, 01:14 AM
 
tomcoleman tomcoleman is offline
 

Advanced Member
  
Join Date: Feb 2006
Posts: 77
 

Default Re: free Dynamic Images module released

i have 4.1.11

When i go to patch it complains

image.php OK
skin1/customer/main/product.tpl could not patch
skin1/product_thumbnail.tpl could not patch

I know product_thumbnail.tpl & product.tpl can be patch manually but i dont know where to insert the code, if there a readme that says find this line and insert after etc etc....?

Looking at the Patch code for 4.1.x and the code on 4.1.11 its different.

Patch code:
--- skin1/customer/main/product.tpl (revision 15)
+++ skin1/customer/main/product.tpl (working copy)
@@ -13,12 +13,21 @@
<tr>
<td class="PImgBox" rowspan="2">

+{* 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_p rodtpl_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"}
{elseif $product.force_image_type eq 'W' && $product.variantid}
-{include file="product_thumbnail.tpl" productid=$product.variantid image_x=$product.image_x image_y=$product.image_y product=$product.product tmbn_url=$product.tmbn_url id="product_thumbnail" type="W"}&nbsp;
+{* PHP Site Solutions - Dynamic Images *}
+{include file="product_thumbnail.tpl" productid=$product.variantid image_x=$phpss_dyn_img_width|default:$product.imag e_x product=$product.product tmbn_url=$product.tmbn_url id="product_thumbnail" type="W"}&nbsp;
+{* / PHP Site Solutions - Dynamic Images *}
{else}
-{include file="product_thumbnail.tpl" productid=$product.productid image_x=$product.image_x image_y=$product.image_y product=$product.product tmbn_url=$product.tmbn_url id="product_thumbnail" type="P"}&nbsp;
+{* PHP Site Solutions - Dynamic Images *}
+{include file="product_thumbnail.tpl" productid=$product.productid image_x=$phpss_dyn_img_width|default:$product.imag e_x product=$product.product tmbn_url=$product.tmbn_url id="product_thumbnail" type="P"}&nbsp;
+{* / PHP Site Solutions - Dynamic Images *}
{/if}
{if $active_modules.Magnifier ne "" && $config.Magnifier.magnifier_image_popup eq 'Y' && $zoomer_images ne '' && $js_enabled eq 'Y'}
{include file="modules/Magnifier/popup_magnifier.tpl"}


File to be patched code:
<td class="PImgBox" rowspan="2">

{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}
Reply With Quote
  #19  
Old 09-19-2008, 02:39 AM
 
tomcoleman tomcoleman is offline
 

Advanced Member
  
Join Date: Feb 2006
Posts: 77
 

Default Re: free Dynamic Images module released

ok i went ahead and modifed the code manually.

When i uploaded an image and go to my store, where the image is meant to be it says the following error.

Warning: Smarty error: thumb: image file "/default_image.gif" does not exist in /var/www/vhosts/houseofman.co.uk/httpdocs/Smarty-2.6.19/Smarty.class.php on line 1092
Reply With Quote
  #20  
Old 09-22-2008, 08:16 AM
 
tomcoleman tomcoleman is offline
 

Advanced Member
  
Join Date: Feb 2006
Posts: 77
 

Default Re: free Dynamic Images module released

anyone?
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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


All times are GMT -8. The time now is 06:05 PM.

   

 
X-Cart forums © 2001-2020