Totally Zenned
- Join Date:
- Oct 2006
- Posts:
- 5,422
- Plugin Contributions:
- 0
Image Handler 2 (for ZC v1.3.8 ONLY) Support
There is an error in includes/classes/bmz_image_handler.class.php which may stripe out all your parameters setting when you use zen_image
Open that file, look for
function get_additional_parameters($alt, $width, $height, $parameters) {
replace that whole function by
function get_additional_parameters($alt, $width, $height, $parameters) {
global $ihConf;
if ($this->sizetype == 'small') {
if ($ihConf[$this->sizetype]['zoom']) {
if ($this->zoom['file'] == '' || !$ihConf[$this->sizetype]['hotzone']) {
// if no zoom image, the whole image triggers the popup
$this->zoom['startx'] = 0;
$this->zoom['starty'] = 0;
$this->zoom['width'] = $width;
$this->zoom['height'] = $height;
}
//escape possible quotes if they're not already escapped
$alt = preg_replace("/([^\\\\])'/", '$1\\\'', $alt);
$alt = str_replace('"', '"', $alt);
// strip potential suffixes just to be sure
$src = $this->strip_sizetype_suffix($this->src);
// define zoom sizetype
$zoom_sizetype = ($this->sizetype=='small')?'medium':'large';
// additional zoom functionality
$products_image_directory = substr($src, strlen($ihConf['dir']['images']), strrpos($src, '/') - strlen($ihConf['dir']['images']) + 1);
$products_image_filename = substr($src, strrpos($src, '/'), strlen ($src) - strrpos ($src, '/') - strlen ($this->extension));
$products_image_zoom = $ihConf['dir']['images'] . $zoom_sizetype . '/' . $products_image_directory . $products_image_filename . $ihConf[$zoom_sizetype]['suffix'] . $this->extension;
$ih_zoom_image = new ih_image($products_image_zoom, $ihConf[$zoom_sizetype]['width'], $ihConf[$zoom_sizetype]['height']);
$products_image_zoom = $ih_zoom_image->get_local();
list($zoomwidth, $zoomheight) = @getimagesize($ihConf['dir']['docroot'] . $products_image_zoom);
// we should parse old parameters here and possibly merge some inc case they're duplicate
$parameters .= ($parameters != '') ? ' ' : '';
return $parameters . 'style="position:relative" onmouseover="showtrail(' . "'$products_image_zoom','$alt',$width,$height,$zoomwidth,$zoomheight,this," . $this->zoom['startx'].','.$this->zoom['starty'].','.$this->zoom['width'].','.$this->zoom['height'].');" onmouseout="hidetrail();" ';
}
return $parameters;
}
return $parameters;
}