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

Resize thumbnails with GD

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #11  
Old 12-23-2008, 12:11 AM
  Vetrivel's Avatar 
Vetrivel Vetrivel is offline
 

eXpert
  
Join Date: Apr 2008
Posts: 398
 

Default Re: Resize thumbnails with GD

Hi,
This is because there is no $tmbn_url
Try to add it .
Quote:
Originally Posted by inboxnews
This works great with everything except Download Expander. Download Expander calls the following:

HTML Code:
<a href="product.php?productid={$product.productid}">{include file="product_thumbnail.tpl" productid=$product.productid image_x=$product.image_x image_y=$product.image_y product=$product.product}</a>&nbsp; </td>

Unfortunately, the above code displays no image , however, everything else seems to work just fine. Thanks for the post!
Reply With Quote
  #12  
Old 12-24-2008, 02:24 AM
  xplorer's Avatar 
xplorer xplorer is offline
 

X-Cart team
  
Join Date: Jul 2004
Posts: 925
 

Default Re: Resize thumbnails with GD

Quote:
Originally Posted by am2003
1. Maybe I am not happy by the results of your default values for the unsharp mask effect. Can we control the values the "unsharp mask" filter effect inside the script (Amount, Radius, Threshold)?


Yes, you can change the values by editing "include/lib/phpunsharmask.php" file. Search for the following string:
PHP Code:
function UnsharpMask($img$amount 120$radius 0.4$threshold 1)    { 


Quote:
Originally Posted by am2003
2. Did you use Unsharp Mask for PHP (http://vikjavev.no/computing/ump.php)?

Yes.
Reply With Quote

The following 2 users thank xplorer for this useful post:
am2003 (03-17-2011), Mark UK (08-20-2009)
  #13  
Old 12-24-2008, 02:31 AM
  ADDISON's Avatar 
ADDISON ADDISON is offline
 

X-Man
  
Join Date: Jan 2008
Posts: 2,613
 

Default Re: Resize thumbnails with GD

xplorer: is it a way to configure those values in the Admin? A form inside the Mod?
__________________
X-Cart Next: Business 5.2 (learning and testing)
X-Cart Classic: Gold and Gold Plus 4.7
Lots of Modules and Customizations
OS in use: Red Hat Enterprise, Fedora, CentOS, Debian, Ubuntu, Linux Mint, Kali Linux
Ideas for Server configuration (basicaly): Nginx/Pound (reverse proxy), Apache/Nginx (webserver), Squid/Varnish (cache server), HHVM or (PHP-FPM + PHP 5.6 + opcache), MariaDB/Percona MySQL Server, Redis (storing sessions)

You can catch my ideas here: http://ideas.x-cart.com
Reply With Quote
  #14  
Old 12-24-2008, 02:56 AM
  xplorer's Avatar 
xplorer xplorer is offline
 

X-Cart team
  
Join Date: Jul 2004
Posts: 925
 

Default Re: Resize thumbnails with GD

Quote:
Originally Posted by am2003
xplorer: is it a way to configure those values in the Admin? A form inside the Mod?

No. The only way to change these parameters is editing the file I mentioned
Reply With Quote
  #15  
Old 12-24-2008, 02:58 AM
  ADDISON's Avatar 
ADDISON ADDISON is offline
 

X-Man
  
Join Date: Jan 2008
Posts: 2,613
 

Default Re: Resize thumbnails with GD

Maybe someone will customize the script and have this feature available for an easy configuration.
__________________
X-Cart Next: Business 5.2 (learning and testing)
X-Cart Classic: Gold and Gold Plus 4.7
Lots of Modules and Customizations
OS in use: Red Hat Enterprise, Fedora, CentOS, Debian, Ubuntu, Linux Mint, Kali Linux
Ideas for Server configuration (basicaly): Nginx/Pound (reverse proxy), Apache/Nginx (webserver), Squid/Varnish (cache server), HHVM or (PHP-FPM + PHP 5.6 + opcache), MariaDB/Percona MySQL Server, Redis (storing sessions)

You can catch my ideas here: http://ideas.x-cart.com
Reply With Quote
  #16  
Old 01-11-2009, 02:27 PM
 
chris.barber chris.barber is offline
 

Advanced Member
  
Join Date: Sep 2007
Posts: 74
 

Default Re: Resize thumbnails with GD

I seem to be having trouble with this, I have performed the steps several times but it just doesn't seem to be working, not sure what else to try, I have tried placing the imagcache folder in different places but to no avail.

The instructions are so simple but it just doesn't seem to work.
__________________
Chris Barber
Version 4.1.9
MOD - BCSE Shipping Estimator
MOD - Shopzilla Feed
MOD - Price Match with Captcha
MOD - Links Manager 2008
MOD - One Page Checkout
MOD - Sitemap
Reply With Quote
  #17  
Old 01-12-2009, 04:38 AM
  JWait's Avatar 
JWait JWait is offline
 

X-Man
  
Join Date: Nov 2005
Location: California
Posts: 2,440
 

Default Re: Resize thumbnails with GD

Quote:
Originally Posted by chris.barber
I seem to be having trouble with this, I have performed the steps several times but it just doesn't seem to be working, not sure what else to try, I have tried placing the imagcache folder in different places but to no avail.

The instructions are so simple but it just doesn't seem to work.

You might try checking your spelling. It is imagecache, not imagcache.
__________________
Two Separate X-Cart Stores
Version 4.4.4 Gold - X-AOM - Vivid Dreams Aquamarine (modified) - Linux
Mods - Newest Products - View All -, and a few others. Numerous upgrades from 4.0.x series.
Integrated with Stone Edge Order Manager + POS

Version 4.1.12 Gold (fresh install) - X-AOM - Linux
Mods - XCSEO free
Reply With Quote
  #18  
Old 01-12-2009, 09:03 AM
 
chris.barber chris.barber is offline
 

Advanced Member
  
Join Date: Sep 2007
Posts: 74
 

Default Re: Resize thumbnails with GD

Nice spot but I only spelt it wrong here.
__________________
Chris Barber
Version 4.1.9
MOD - BCSE Shipping Estimator
MOD - Shopzilla Feed
MOD - Price Match with Captcha
MOD - Links Manager 2008
MOD - One Page Checkout
MOD - Sitemap
Reply With Quote
  #19  
Old 01-12-2009, 01:00 PM
 
chris.barber chris.barber is offline
 

Advanced Member
  
Join Date: Sep 2007
Posts: 74
 

Default Re: Resize thumbnails with GD

OK, so I found the problem

{if $config.Appearance.show_thumbnails eq "Y"}<img{if $id ne ''} id="{$id}"{/if} src="imager.php/product_thumb.jpg?width={$image_x}&amp;image={$tmb n_url}" alt="{$product|escape}"{if $show_border eq "Y"} class="ProductBorder"{/if} />{/if}

This line had a / before imager.php so read src="/imager.php/product_thumb.jpg, I removed the leading / and all is working fine now.

Great mod, will really help me as I have 1000s of products.
__________________
Chris Barber
Version 4.1.9
MOD - BCSE Shipping Estimator
MOD - Shopzilla Feed
MOD - Price Match with Captcha
MOD - Links Manager 2008
MOD - One Page Checkout
MOD - Sitemap
Reply With Quote
  #20  
Old 01-16-2009, 08:35 AM
 
pfarcus pfarcus is offline
 

Senior Member
  
Join Date: Jan 2009
Posts: 179
 

Thumbs up Re: Resize thumbnails with GD

cool mod, I think its working, I saw a bunch of small files in my imagecache folder.

Couple questions for all you smart people in here:
Is there a way to just get rid of the option of a "product image" since the product thumbnail upload does everthing and there is no need for a thumb and a product upload?

This one I really need:
Can we cap the max image size either height or width so ALL the product images would be same height? (or width) that shows up in the main product details page? I'm afraid some of these providers are going to upload huge images. (too large on screen) Need to have it re-make them to a uniform size. (I think 4.2 can do this, can we do it in 4.1.11 somehow?

This would be huge for me, very much appreciate your thoughts on this.
__________________
CDSEO PRO
4.1.11 PRO
Dynamic images by xcartmod.com
X-Cart CSSTemplate/Skin for v4.1.11 PRO
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions



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 08:54 AM.

   

 
X-Cart forums © 2001-2020