Zen Cart Logo
Forums / All Other Contributions/Addons / Image Handler 2 (for ZC v1.3.8 ONLY) Support

Image Handler 2 (for ZC v1.3.8 ONLY) Support

Views: 2,510,620

Results 1,001 to 1,020 of 7,094
20 Mar 2007, 4:17 PM
#1001
jettrue avatar

jettrue

Totally Zenned

Join Date:
Jan 2005
Location:
USA, St. Louis
Posts:
3,651
Plugin Contributions:
5

Image Handler 2 (for ZC v1.3.8 ONLY) Support

Now here's an issue I can't figure out...

I started to notice on a site i'm working on, that random images won't hover a larger image.

See this page:

http://www.jmb.jadetrue.com/potty-time-baby-bottom-care-c-1_15.html

The third and the fifth image won't hover.

They are using the same exact image as the second product, which does hover.

I thought it could be a case where it doesn't like using the same image for different products, yet this category with all of the same image works fine:

http://www.jmb.jadetrue.com/cloth-diaper-supplies-prefold-cloth-diapers-c-1_10_12.html

Any ideas??

20 Mar 2007, 4:35 PM
#1002
tvadpro avatar

tvadpro

Zen Follower

Join Date:
Aug 2005
Location:
Cincinnati
Posts:
323
Plugin Contributions:
0

Re: Image Handler 2 (for ZC v1.3.8 ONLY) Support

Don't ask me why (I don't know), but those 3rd and 5th images aren't getting the onMouseOver behaviors. Also, the images in question are sourced from your standard images/ directory, not from bmz_cache/ ... perhaps the script that generates the random images isn't playing nicely with IH2?

Here's the html source for your 3rd and 4th images -- with key differences highlighted.

<div class="centerBoxContentsProducts centeredContent back" style="width: 32.5%;"><a href="http://www.jmb.jadetrue.com/rash-magic-soothing-salve-1oz-p-1419.html?zenid=REMOVED"><img src="bmz_cache/8/8cc3a7c9a6d526756aa09bba42920beb.image.85x80.JPG" alt="Rash Magic Soothing Salve 1oz" title=" Rash Magic Soothing Salve 1oz " height="80" width="85"></a><br><h3 class="itemTitle"><a href="http://www.jmb.jadetrue.com/rash-magic-soothing-salve-1oz-p-1419.html?zenid=REMOVED">Rash Magic Soothing Salve 1oz</a></h3><div class="listingDescription"></div></div>
<br class="clearBoth">
<div class="centerBoxContentsProducts centeredContent back" style="width: 32.5%;"><a href="http://www.jmb.jadetrue.com/rash-magic-sensitive-soothing-salve-2oz-p-1142.html?zenid=REMOVED"><img **src="images/sensitive.JPG"** alt="Rash Magic SENSITIVE Soothing Salve 2oz" title=" Rash Magic SENSITIVE Soothing Salve 2oz " class="listingProductImage" style="position: relative;" **onmouseover="showtrail('images//sensitive.JPG','Rash Magic SENSITIVE Soothing Salve 2oz',92,80,92,80,this,0,0,92,80);" onmouseout="hidetrail();"** height="80" width="92"></a><br><h3 class="itemTitle"><a href="http://www.jmb.jadetrue.com/rash-magic-sensitive-soothing-salve-2oz-p-1142.html?zenid=REMOVED">Rash Magic SENSITIVE Soothing Salve 2oz</a></h3><div class="listingDescription"></div></div>> **jettrue:**

The third and the fifth image won't hover.

20 Mar 2007, 4:48 PM
#1003
jettrue avatar

jettrue

Totally Zenned

Join Date:
Jan 2005
Location:
USA, St. Louis
Posts:
3,651
Plugin Contributions:
5

Re: Image Handler 2 (for ZC v1.3.8 ONLY) Support

tvadpro:

Don't ask me why (I don't know), but those 3rd and 5th images aren't getting the onMouseOver behaviors. Also, the images in question are sourced from your standard images/ directory, not from bmz_cache/ ... perhaps the script that generates the random images isn't playing nicely with IH2?

Here's the html source for your 3rd and 4th images -- with key differences highlighted.

<div class="centerBoxContentsProducts centeredContent back" style="width: 32.5%;"><a href="http://www.jmb.jadetrue.com/rash-magic-soothing-salve-1oz-p-1419.html?zenid=REMOVED"><img src="bmz_cache/8/8cc3a7c9a6d526756aa09bba42920beb.image.85x80.JPG" alt="Rash Magic Soothing Salve 1oz" title=" Rash Magic Soothing Salve 1oz " height="80" width="85"></a><br><h3 class="itemTitle"><a href="http://www.jmb.jadetrue.com/rash-magic-soothing-salve-1oz-p-1419.html?zenid=REMOVED">Rash Magic Soothing Salve 1oz</a></h3><div class="listingDescription"></div></div>
<br class="clearBoth">
<div class="centerBoxContentsProducts centeredContent back" style="width: 32.5%;"><a href="http://www.jmb.jadetrue.com/rash-magic-sensitive-soothing-salve-2oz-p-1142.html?zenid=REMOVED"><img **src="images/sensitive.JPG"** alt="Rash Magic SENSITIVE Soothing Salve 2oz" title=" Rash Magic SENSITIVE Soothing Salve 2oz " class="listingProductImage" style="position: relative;" **onmouseover="showtrail('images//sensitive.JPG','Rash Magic SENSITIVE Soothing Salve 2oz',92,80,92,80,this,0,0,92,80);" onmouseout="hidetrail();"** height="80" width="92"></a><br><h3 class="itemTitle"><a href="http://www.jmb.jadetrue.com/rash-magic-sensitive-soothing-salve-2oz-p-1142.html?zenid=REMOVED">Rash Magic SENSITIVE Soothing Salve 2oz</a></h3><div class="listingDescription"></div></div>

I figured it out. :thumbsup: This store had some old images from the previous version of IH, with the _MED and _LARGE suffixes. By removing those images from the server that seems to have fixed it. I think it was confused as to which image to use. :unsure:

20 Mar 2007, 4:49 PM
#1004
ryk avatar

ryk

Totally Zenned

Join Date:
Oct 2004
Location:
Southport, UK
Posts:
3,644
Plugin Contributions:
6

Re: Image Handler 2 (for ZC v1.3.8 ONLY) Support

Now I know this is only going to make things more confusing, but they ALL hover for me min FF...and NONE in IE6

20 Mar 2007, 4:56 PM
#1005
magicskull avatar

magicskull

New Zenner

Join Date:
Jun 2006
Location:
Phoenix, AZ
Posts:
5
Plugin Contributions:
0

Re: Image Handler 2 (for ZC v1.3.8 ONLY) Support

Thank you for IH2!

My biggest complaint about my old ZC was the hourse I was spending formatting and organizing images. I'd have 4-8 photos per item in my store, and it was taking me hours to maintain my site.

Now that I've started over with a clean install, IH2 is going to save me a lot of time getting this site up and running again.

Thank you.

20 Mar 2007, 6:09 PM
#1006
tophand avatar

tophand

Totally Zenned

Join Date:
Jan 2007
Location:
1.5 miles from Home
Posts:
674
Plugin Contributions:
0

Re: Image Handler 2 (for ZC v1.3.8 ONLY) Support

jettrue:

Well, on my site that wasn't popping up when I hovered, the height was 57, on the site that was popping up, was 80. I changed the one that was popping to 57, and voila, it stopped popping, and when I changed the one that wasn't popping to 80, it started, so then I started experimenting with different values. Odd didn't, even did, LOL!

I love troubleshooting, LOL! (especially when I figure it out)

Thanks!:thumbsup:
Been working on this for weeks and a simple change like this and bingo.

Mark

20 Mar 2007, 6:28 PM
#1007
get_em_fast avatar

get_em_fast

Totally Zenned

Join Date:
Dec 2006
Location:
Seligman, MO U.S.A.
Posts:
2,072
Plugin Contributions:
1

Re: Image Handler 2 (for ZC v1.3.8 ONLY) Support

Eureka!! I got it (referring to the post I made on page 202 of this thread) fixed all by myself!!

on lines 70 & 71 of jscript_imagehover.js,

I changed:

trailstyle.left = "-2000px";
trailstyle.top = "-2000px";

to:

trailstyle.left = "2000px";
trailstyle.top = "2000px";

without the "-", changing it from a negative to a positive number, and all is well in IE!!

Hope this helps somebody else to solve their IE problems

20 Mar 2007, 6:32 PM
#1008
get_em_fast avatar

get_em_fast

Totally Zenned

Join Date:
Dec 2006
Location:
Seligman, MO U.S.A.
Posts:
2,072
Plugin Contributions:
1

Re: Image Handler 2 (for ZC v1.3.8 ONLY) Support

Never mind.......it not only took away the error, but it added about 2000 pixels to the width of my page. DAMN!! Back to the drawing board. :(

20 Mar 2007, 6:35 PM
#1009
tvadpro avatar

tvadpro

Zen Follower

Join Date:
Aug 2005
Location:
Cincinnati
Posts:
323
Plugin Contributions:
0

Re: Image Handler 2 (for ZC v1.3.8 ONLY) Support

Right on, Mark. I was in the same boat until 2 minutes ago. I was about to report back and tell you all that the width/height settings change wasn't working for me, but then I tried changing the Product Listing widths and heights. They were originally set at 100 and 80, and I changed them to 106 and 88 ... no odd numbers before nor after, but it did the trick. Suddenly, the showtrails script is finally appearing, and all my thumbs are zooming as they should. Go figure! :D > tophand:

Thanks!:thumbsup:
Been working on this for weeks and a simple change like this and bingo.

Mark

20 Mar 2007, 10:44 PM
#1010
blessisaacola avatar

blessisaacola

Totally Zenned

Join Date:
Feb 2004
Location:
Georgia, USA
Posts:
1,875
Plugin Contributions:
1

Re: Image Handler 2 (for ZC v1.3.8 ONLY) Support

BlessIsaacola:

Okay, after reading 81 pages with no eminent solution I thought I'd post my problem.

We used to have IH2 on a different host and it worked flawlessly. I have since moved to another host and now IH2 doesn't work.

You can see here at http://www.clevershoppers.com IH looks like it's creating images because if you click on properties it will show you the image location and filename. However, when I login to the server there is absolutely zero file created in any of the various folders in bmz_cache.

I have set permission to 777 on bmz_cache and all the sub-folders
I have clear cache and uninstall and reinstall IH2 from the admin side.

It appears that the script is doing everything but actually generating the image.

I should add that I also edited the config file to use ImageMagic.

Any help in troubleshooting this is greatly appreciated.

Thanks!

PS. I use add that IH is now acting as a user NOBODY when it creates folder which is different than the way it behaved on old host.

Okay, I solved my problem by turning off ImageMagick in the configuration file. It worked on our old host but now it doesn't.

Does anyone have IH2 working using ImageMagick instead of GDLib?

Thanks!

20 Mar 2007, 10:51 PM
#1011
verdon avatar

verdon

Zen Follower

Join Date:
May 2004
Location:
Northern Ontario, Canada
Posts:
373
Plugin Contributions:
0

Re: Image Handler 2 (for ZC v1.3.8 ONLY) Support

BlessIsaacola:

Also does IH2 need any of this PHP functions that are disabled? ```
passthru,exec,dl,proc_open,proc_close,popen,shell_exec,system

I'm not sure, but I doubt it.

> **BlessIsaacola:**
>
> ... Okay, I solved my problem by turning off ImageMagick in the configuration file. It worked on our old host but now it doesn't.
> 
> Does anyone have IH2 working using ImageMagick instead of GDLib?
> 
> PS. I use add that IH is now acting as a user NOBODY when it creates folder which is different than the way it behaved on old host.Are you sure your new host has ImageMagick available? As to user NOBODY, that's pretty standard user for the webserver/php to run under.
22 Mar 2007, 7:12 PM
#1012
birdoasis avatar

birdoasis

Inactive

Join Date:
Jun 2005
Location:
Cheney WA
Posts:
1,123
Plugin Contributions:
0

Re: Image Handler 2 (for ZC v1.3.8 ONLY) Support

Moved to another host. Imagehandler 2 is giving errors in the featured products section, but works fine in the New Products Section.

I get the following error for every productuct in the featured products section.

Warning: imagejpeg() [function.imagejpeg]: Unable to open '/home/user/public_html/bmz_cache/c/cdc4e427060362cad6add69e49bfa92c.image.52x80.jpg' for writing in /home/user/public_html/includes/classes/bmz_image_handler.class.php on line 652

Zen Cart 1.3.7

23 Mar 2007, 12:14 AM
#1013
mydanilo avatar

mydanilo

Totally Zenned

Join Date:
Dec 2004
Posts:
1,024
Plugin Contributions:
0

Re: Image Handler 2 (for ZC v1.3.8 ONLY) Support

Ahhh this rings a bell. I had the same thing when I moved. As you probably know bmz_cache must be set to 777. All the sub directories as well!

A trick is to just delete all subdirectories as imagehandler will built them again. Cache is all it is. But if they exist and are not 777 you will have problems.

Hope this helps...

23 Mar 2007, 2:39 AM
#1014
blessisaacola avatar

blessisaacola

Totally Zenned

Join Date:
Feb 2004
Location:
Georgia, USA
Posts:
1,875
Plugin Contributions:
1

Re: Image Handler 2 (for ZC v1.3.8 ONLY) Support

verdon:

I'm not sure, but I doubt it.

Are you sure your new host has ImageMagick available? As to user NOBODY, that's pretty standard user for the webserver/php to run under.

Yes! ImageMagick is installed that I know for sure. Back to my question...anybody have this installed using ImageMagick that is activated in include/extra_configures/bmz_image_handler_conf.php and configured in Admin?

23 Mar 2007, 11:28 AM
#1015
tvadpro avatar

tvadpro

Zen Follower

Join Date:
Aug 2005
Location:
Cincinnati
Posts:
323
Plugin Contributions:
0

Re: Image Handler 2 (for ZC v1.3.8 ONLY) Support

Not me -- my servers are strictly GD.> BlessIsaacola:

Back to my question...anybody have this installed using ImageMagick that is activated in include/extra_configures/bmz_image_handler_conf.php and configured in Admin?

25 Mar 2007, 4:22 PM
#1016
crazycucumber avatar

crazycucumber

Zen Follower

Join Date:
Jan 2006
Posts:
403
Plugin Contributions:
0

Re: Image Handler 2 (for ZC v1.3.8 ONLY) 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

26 Mar 2007, 10:55 PM
#1017
woodymon avatar

woodymon

Totally Zenned

Join Date:
Sep 2004
Posts:
2,309
Plugin Contributions:
1

Re: Image Handler 2 (for ZC v1.3.8 ONLY) Support

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.

27 Mar 2007, 12:12 PM
#1018
brisbanetimeout avatar

brisbanetimeout

Zen Follower

Join Date:
Jul 2006
Posts:
108
Plugin Contributions:
0

Re: Image Handler 2 (for ZC v1.3.8 ONLY) 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....

jettrue:

Hi There,

Ok, I've found that replacing the original code in classes/bmz_image_handler.php (~line 701):

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:
> 
>       ```
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?

27 Mar 2007, 5:47 PM
#1019
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: Image Handler 2 (for ZC v1.3.8 ONLY) Support

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

    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

31 Mar 2007, 3:17 AM
#1020
get_em_fast avatar

get_em_fast

Totally Zenned

Join Date:
Dec 2006
Location:
Seligman, MO U.S.A.
Posts:
2,072
Plugin Contributions:
1

Re: Image Handler 2 (for ZC v1.3.8 ONLY) Support

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

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/showthread.php?t=28859&page=3>.