Re: Image Handler 2 Support
Hi , Does this mean its not going to work on my server ?
Zen version 1.3.7 just installed as per instructions , but when i try to get into the admin i get :-
Warning: main(/xxx/includes/extra_configures/bmz_io_conf.php) [function.main]: failed to open stream: No such file or directory in /xxx/trial/admin/includes/extra_configures/bmz_io_conf.php on line 12
Fatal error: main() [function.require]: Failed opening required '/hxxx/includes/extra_configures/bmz_io_conf.php' (include_path='.:/usr/share/pear') in /xxxx/trial/admin/includes/extra_configures/bmz_io_conf.php on line 12
Having just pasted that in , I notice that the second line in each error contained the sub folder I am testing my site in "trial" the first line doesn't ! are my config files wrong ?
Mark
Re: Image Handler 2 Support
Quote:
Originally Posted by
crazycucumber
I notice that the second line in each error contained the sub folder I am testing my site in "trial" the first line doesn't ! are my config files wrong ?
I think you are on the mark. Separate Zen cart installs on the same account require separate configure files.
Re: Image Handler 2 Support
OH crap... it did not work... said there was an error... where should I dump this code into the file ?? am I suppose to get all the { }}} as well... ?
Can anyone confirm that this fixs the problem ??
I will do a dump of the end of the file... can you edit it from here...?
Thanks
}
//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();" ';
}
}
}
}
that was the end bit of the file....
Quote:
Originally Posted by
jettrue
Hi There,
Ok, I've found that replacing the original code in classes/bmz_image_handler.php (~line 701):
Code:
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();" ';
with this:
Code:
if (!($_GET['main_page']==FILENAME_PRODUCT_INFO)) {
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();" ';
} else {
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();" ';
}
Fixes the issue of additional images not displaying, while still allowing the hover effect on product listing pages.
What I'd also like to figure out how to do, is to prevent the hover on CATEGORY and SUBCATEGORY images (as I try to upload the smallest category image possible, since IH2 doesn't resize these - yet it still adds the mouseover to them).
Anyway, I tried a few things to get that to work, but haven't figured it out yet. Any ideas?
Re: Image Handler 2 Support
Quote:
Originally Posted by
Get Em Fast
O.k. I've read all 102 pages in this thread to no avail. I've got an issue that I haven't saw anywhere about IH2. In FF, it works like a charm. But, in IE, if I hover over the top half of the image, everything is great. But, if I hover over the bottom half of the image, I get no pop-up image, and I get an error. Any ideas?
I have found a PARTIAL SOLUTION to the IE hover problem (the one that causes a JS Page Error) and prevents the zoom if the thumbnails are too close to the bottom of the screen...
In: jscript_imagehover.js
COMMENT OUT
PHP Code:
if (docwidth - event.clientX < zoomimg_w + (3 * padding)) {
xcoord = event.clientX - xcoord - zoomimg_w - (2 * offsetfrommouse[0]);
} else {
xcoord += truebody().scrollLeft+event.clientX;
}
// if (docheight - event.clientY < zoomimg_h + (2 * padding)){
// ycoord += event.clientY - Math.max(0,(0 + zoomimg_h + (5 * padding) + e.pageY - docheight - truebody().scrollTop));
// } else {
// ycoord += truebody().scrollTop + event.clientY;
// }
}
The zoomed popups are not locating right next to their respective images BUT at least they now ALL DISPLAY
Re: Image Handler 2 Support
Quote:
Originally Posted by
schoolboy
I have found a PARTIAL SOLUTION to the IE hover problem (the one that causes a JS Page Error) and prevents the zoom if the thumbnails are too close to the bottom of the screen...
In: jscript_imagehover.js
COMMENT OUT
PHP Code:
if (docwidth - event.clientX < zoomimg_w + (3 * padding)) {
xcoord = event.clientX - xcoord - zoomimg_w - (2 * offsetfrommouse[0]);
} else {
xcoord += truebody().scrollLeft+event.clientX;
}
// if (docheight - event.clientY < zoomimg_h + (2 * padding)){
// ycoord += event.clientY - Math.max(0,(0 + zoomimg_h + (5 * padding) + e.pageY - docheight - truebody().scrollTop));
// } else {
// ycoord += truebody().scrollTop + event.clientY;
// }
}
The zoomed popups are not locating right next to their respective images BUT at least they now ALL DISPLAY
Yep. That's what I was talking about, schoolboy. I found what seems to be the perfect solution at this thread http://www.zen-cart.com/forum/showth...t=28859&page=3.
Re: Image Handler 2 Support
Going crazy trying to get Imagehandler to work right! It partly works which is the confusing part. Hard to put in words so if you could look I would reeeeeeally appreciate it.
http://www.seasidescraps.com/shop/in...roducts_id=181
See the top image, click for larger image. You get a background with a small x (image not found basically). BUT if you select the lower image, the one the hover over popup works on. It DOES show the larger image (zoom). What are we doing wrong? Im trying to help this person get the store done for easter. I can install add mods etc. But cant trouble shoot zen yet (not that experienced with it) Ive triple checked the files and the code all is well as far as I can tell. Please someone help us!
I know nothing about zen just have installed it before and run phpbb etc. Any advice is greatly appreciated.
Re: Image Handler 2 Support
Would image size effect this mod? I ntoiced something just now.
The top image that doesn work with imagehandler. Its 150x150. The lower image that does work is 100x100. Could it be that imagehandler cant resize 150x150 as its already max size and therefore giving me the image not found result?:dontgetit
Re: Image Handler 2 Support
Quote:
Originally Posted by
Xtreeme
Going crazy trying to get Imagehandler to work right! It partly works which is the confusing part. Hard to put in words so if you could look I would reeeeeeally appreciate it.
http://www.seasidescraps.com/shop/in...roducts_id=181
See the top image, click for larger image. You get a background with a small x (image not found basically). BUT if you select the lower image, the one the hover over popup works on. It DOES show the larger image (zoom). What are we doing wrong? Im trying to help this person get the store done for easter. I can install add mods etc. But cant trouble shoot zen yet (not that experienced with it) Ive triple checked the files and the code all is well as far as I can tell. Please someone help us!
I know nothing about zen just have installed it before and run phpbb etc. Any advice is greatly appreciated.
Xtreeme, that's the exact problem I was having. If you'll notice on your site, if you scrool the page to where the image is in the top part of the browser, it will work just fine, but shows an error.
Go here, http://www.zen-cart.com/forum/showth...t=28859&page=3. and copy and paste the 2 files shown there, and your problems will be over. At least it done the job for me.
Good luck.
Re: Image Handler 2 Support
Thank you! Thank you! Thank you!:clap:
Ill try this right now (fingers crossed that it works).:cool:
Re: Image Handler 2 Support
Quote:
Originally Posted by
Xtreeme
Would image size effect this mod? I ntoiced something just now.
The top image that doesn work with imagehandler. Its 150x150. The lower image that does work is 100x100. Could it be that imagehandler cant resize 150x150 as its already max size and therefore giving me the image not found result?:dontgetit
If that's the original size of your image, it won't resize to a larger image. Try resizing it with an image editor (to 400x400, or so), then it will resize it down, but keep in mind that IH2 doesn't resize medium images.....yet.