View Single Post
  #4  
Old 06-08-2012, 09:55 AM
  ADDISON's Avatar 
ADDISON ADDISON is offline
 

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

Lightbulb Re: Detailed Product Images Module - Changing Unsharp Mask Filter Parameters

Let's update this old thread with automatically re-generation image cache after changing one of the values for Amount, Radius, Threshold

1) Open file: [XC_Dir]/[ADMIN_Dir]/configuration.php

2) Search for the following string: "// Regenerate image cache" (without quotes)

3) After this

PHP Code:
|| $config['Detailed_Product_Images']['det_image_max_height_icon'] != $_POST['det_image_max_height_icon'

4) Paste this

PHP Code:
|| $config['Detailed_Product_Images']['det_unsharpmask_amount'] != $_POST['det_unsharpmask_amount']
|| 
$config['Detailed_Product_Images']['det_unsharpmask_radius'] != $_POST['det_unsharpmask_radius']
|| 
$config['Detailed_Product_Images']['det_unsharpmask_threshold'] != $_POST['det_unsharpmask_radius'

Now change any of the values for Amount, Radius, Threshold and you will get automatically re-generation of your image cache. There is no need to go in Maintenance all the time after changing a value.

After this final step in my humble opinion this should be a "must have" inside the next XC4 version (4.5.1 as well). No more hard coded for unsharp mask values, re-generation, ugly thumbs.

P.S. We should do something with the tabs in product page. No more hard coded there too. Personally I know how to deal with new tabs, sorting, hiding, but how many of us know how to do this? Please take in consideration an elegant way for creating, hiding, arranging tabs in Admin interface (4.5.2). It is not complicated at all guys.
__________________
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