New Zenner
- Join Date:
- Jan 2008
- Posts:
- 38
- Plugin Contributions:
- 1
Image Handler 2 (for ZC v1.3.8 ONLY) Support
Great mod...have been using it for a couple years now, and love it.
One quick suggestion for modifying Image Handler so that you have more control over which images are zoomed.
To the zen_image function implemented by IH (includes\functions\html_output.php), add a $zoom parameter:
function zen_image($src, $alt = '', $width = '', $height = '', $parameters = '', $zoom = '') {
Pass it to the handle_image function:
$newimg = handle_image($src, $alt, $width, $height, $parameters, $zoom);
Then add it to the handle_image function (includes\functions\extra_functions\functions_bmz_image_handler.php):
function handle_image($src, $alt, $width, $height, $parameters, $zoom = '')
$parameters = $ih_image->get_additional_parameters($alt, $ih_image->canvas['width'], $ih_image->canvas['height'], $parameters, $zoom);
And then finally, add it to the get_additional_parameters function (\includes\classes\bmz_image_handler.class.php):
get_additional_parameters($alt, $width, $height, $parameters, $zoom = '')
if ($zoom === true || ($zoom !== false && $ihConf[$this->sizetype]['zoom'])) {
Then, you can manually specify zoom behavior in your templates by just adding the $zoom parameter, setting to true (or disable zoom behavior by setting it to false):
zen_image($products_image_medium, $products_name, MEDIUM_IMAGE_WIDTH, MEDIUM_IMAGE_HEIGHT, '', $zoom = true)
Just a thought. Apologies if anything similar has already been proposed or implemented, or if this is the wrong place to post this.