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,650

Results 4,521 to 4,540 of 7,094
23 Nov 2009, 7:41 PM
#4521
capnhairdo avatar

capnhairdo

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.

23 Nov 2009, 11:35 PM
#4522
lauriesscraps avatar

lauriesscraps

Zen Follower

Join Date:
Sep 2009
Posts:
255
Plugin Contributions:
0

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

Nevermind, I think I figured it out. I will let you know if I didn't! hahaha. ;)

24 Nov 2009, 2:59 AM
#4523
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

Earnest-Enterprises:

I have just installed IH2 and everything is fine with the exception of the zoom image being WAY up and on the very top left of my screen, even well above the top header of my home page. I HAVE searched this thread and the closest solution I can find is a fix for IE that is supposed to fix this issue. While I do default to using IE I also loaded my site with FF and get the same result so I don't think it's an IE issue. The image is barely visible when I mouse over a product on my main page in the upper left of the screen and the first time I tryit, my entire home page drops down to make room for the zoom image..... I can see a small corner of the zoom pic but that's about it.

Here's the link I found for the IE fix but it's apparently dead now.

http://forum.zen-cart.com/showpost.php?p=381081&postcount=1252

Any idea why my zoom graphic is nowhere near being around or near the graphic I moused over? I tried all the southwest, northeast, etc. settings but makes no diff.

Thanks in advance for any help.

R.

A link helps us help you.

That said, check that you uploaded all the files.
Sound like you missed one (style_imagehover.css).

M

24 Nov 2009, 8:43 PM
#4524
llukasz avatar

llukasz

New Zenner

Join Date:
Oct 2009
Posts:
3
Plugin Contributions:
0

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

Hi

I have a problem and i have not found answer.

Files are generated very well. But links to images are generated in bad way by IH2.

There are no slashes

http://homeideas.pl/bmz_cacheee01c7cecbb1b10d696f19af5954c16a3.image.100x62.jpg

http://homeideas.pl/bmz_cache/e/e01c7cecbb1b10d696f19af5954c16a3.image.100x62.jpg

Link should look like second one.

I have no idea wats wrong. I triend to repair it in file functions_bmz_io.php

Line 76
$file = $bmzConf['cachedir'] . '/' . $md5{0} . "/" . $md5.$ext;

As you see i triend to change slashes there when '/' i change to "/" effect is that this slash is in link but as 5%C something like that.

Whats wrong, how to repair that, please help.

24 Nov 2009, 8:49 PM
#4525
asdesign avatar

asdesign

Zen Follower

Join Date:
Jun 2009
Location:
Israel
Posts:
152
Plugin Contributions:
0

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

*** SOLUTION TO A PROBLEM I HAD ***

Quite some time ago I posted a problem I had with IH2 because of PHP version installed on my server. The problem resulted in some permission errors and didn't let IH2 work properly at all.

So heres the solution for whom may have the same problem!

First of all, it didn't seem to be the PHP version causing the problem even tho using PHP version 5.2.9 and below is the current recommendation. The problem was a few PHP functions set to be DISABLED in the PHP.INI which determines PHP settings on your server. Removing some functions that were DISABLED finally solved the problem!

:clap:

Thing about this problem is that it doesn't relate to your version of IH2, older or newer. Its a problem that can come up to anyone now or in the future so therefore I realized I should post up the solution to help others.

24 Nov 2009, 9:47 PM
#4526
llukasz avatar

llukasz

New Zenner

Join Date:
Oct 2009
Posts:
3
Plugin Contributions:
0

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

Yes, but how to check which function exactly is the source of problem?

PS: i do not use PHP.ini i have default hosting settings, so... stil have no idea what to do

24 Nov 2009, 9:49 PM
#4527
asdesign avatar

asdesign

Zen Follower

Join Date:
Jun 2009
Location:
Israel
Posts:
152
Plugin Contributions:
0

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

llukasz:

Yes, but how to check which function exactly is the source of problem?

Easy, remove them one by one until problem is solved and there you go...

These functions were disabled and after removed problem was solved:

disable_functions = exec,mkdir,shell_proc,shell_exec,system
29 Nov 2009, 8:35 PM
#4528
asdesign avatar

asdesign

Zen Follower

Join Date:
Jun 2009
Location:
Israel
Posts:
152
Plugin Contributions:
0

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

I'm getting crazy with IH2 :(

Just when I thought problems were over it seems to stay. I have IH2 Rev 7 installed with latest Lightbox version.

My images folder contains a bunch of folders with manufacturers names so when I upload an image to a product (using IH2) I choose the right folder before uploading the image. What then happens is, I go to the product's page and no image appears. A quick check revealed its looking for the picture under images/medium/levono(for example)/xxx.jpg. Looking at this folder using FTP shows there no image there. I thought IH2 suppose to take one image and generate it for all sizes?!...The only solution I found to this was modifying 'tpl_main_product_image.php' so it doesn't look for the images under medium or large folders, but this is absord since I thought IH2 suppose to work with these files out of the box. I noticed that the only files regarding functionality of main product image and additional images are the ones under the 'modules' folder.

Thats one problem actually. The other problem is that IH2 doesn't seem to intiate Lightbox, its just using the old POPUP.

Would appreciate any help with this.

PS,
Main PHP issues with IH2 were over but I still get this error when I go into IH2.

"Warning: strstr() [function.strstr]: Empty delimiter. in /home/xxx/domains/xxx/public_html/includes/classes/bmz_image_handler.class.php on line 128"

I checked the file and its a stock version of the IH2 installation.

Funny thing, on another cart with IH2 I have on the server I get no errors at all.

29 Nov 2009, 8:38 PM
#4529
llukasz avatar

llukasz

New Zenner

Join Date:
Oct 2009
Posts:
3
Plugin Contributions:
0

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

F*ck this stupid addon.

I wrote small script which resize my images automaticly during upload new product, and it work perfect.

I recommend everyone to use php manual, some basic php tutorial and thats all.

When you know something about php and mysql you can do whatever you want with any CMS.

29 Nov 2009, 9:22 PM
#4530
asdesign avatar

asdesign

Zen Follower

Join Date:
Jun 2009
Location:
Israel
Posts:
152
Plugin Contributions:
0

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

llukasz:

F*ck this stupid addon.

I wrote small script which resize my images automaticly during upload new product, and it work perfect.

I recommend everyone to use php manual, some basic php tutorial and thats all.

When you know something about php and mysql you can do whatever you want with any CMS.

Can you share it? I'm going nuts with this IH2. :lamo:

30 Nov 2009, 1:11 AM
#4531
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

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

A link to your site would help.. But wanted to say this quickly.. IH2 does indeed create the small and medium images. It creates them in the bmz_cache folders. So you are right the edit you made isn't necessary, and leads me to believe there is another issue.. Honest to goodness, IH2 should install without a hitch.. I have installed it COUNTLESS times, and it installs without a hitch.. (Especially the latest clean version) If there are issues with it working 9 times out of 10, the issues can be traced to a problem with the installation.. The only issues I can see might come from installing other image management mods or a lightbox contrib not specifically referenced in the IH2 readme..

The issue with your lightbox has to be an issue with the Lightbox install itself.. IH2 will not interfere with the lightbox contribs referenced in the readme, but IH2 in itself does NOT make the lightbox work..

Asdesign:

I'm getting crazy with IH2 :(

Just when I thought problems were over it seems to stay. I have IH2 Rev 7 installed with latest Lightbox version.

My images folder contains a bunch of folders with manufacturers names so when I upload an image to a product (using IH2) I choose the right folder before uploading the image. What then happens is, I go to the product's page and no image appears. A quick check revealed its looking for the picture under images/medium/levono(for example)/xxx.jpg. Looking at this folder using FTP shows there no image there. I thought IH2 suppose to take one image and generate it for all sizes?!...The only solution I found to this was modifying 'tpl_main_product_image.php' so it doesn't look for the images under medium or large folders, but this is absord since I thought IH2 suppose to work with these files out of the box. I noticed that the only files regarding functionality of main product image and additional images are the ones under the 'modules' folder.

Thats one problem actually. The other problem is that IH2 doesn't seem to intiate Lightbox, its just using the old POPUP.

Would appreciate any help with this.

PS,
Main PHP issues with IH2 were over but I still get this error when I go into IH2.

"Warning: strstr() [function.strstr]: Empty delimiter. in /home/xxx/domains/xxx/public_html/includes/classes/bmz_image_handler.class.php on line 128"

I checked the file and its a stock version of the IH2 installation.

Funny thing, on another cart with IH2 I have on the server I get no errors at all.

30 Nov 2009, 1:17 AM
#4532
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

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

llukasz:

F*ck this stupid addon.

I wrote small script which resize my images automaticly during upload new product, and it work perfect.

I recommend everyone to use php manual, some basic php tutorial and thats all.

When you know something about php and mysql you can do whatever you want with any CMS.Very nice...:no:

30 Nov 2009, 2:24 AM
#4533
asdesign avatar

asdesign

Zen Follower

Join Date:
Jun 2009
Location:
Israel
Posts:
152
Plugin Contributions:
0

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

DivaVocals:

A link to your site would help.. But wanted to say this quickly.. IH2 does indeed create the small and medium images. It creates them in the bmz_cache folders. So you are right the edit you made isn't necessary, and leads me to believe there is another issue.. Honest to goodness, IH2 should install without a hitch.. I have installed it COUNTLESS times, and it installs without a hitch.. (Especially the latest clean version) If there are issues with it working 9 times out of 10, the issues can be traced to a problem with the installation.. The only issues I can see might come from installing other image management mods or a lightbox contrib not specifically referenced in the IH2 readme..

The issue with your lightbox has to be an issue with the Lightbox install itself.. IH2 will not interfere with the lightbox contribs referenced in the readme, but IH2 in itself does NOT make the lightbox work..

Yeah I'm guessing its just a small issue. I'm using Lightbox 1.5 which is the latest I could find under addons, and it has IH2 reference so I guess its the right addon to use. I could link you up to my site but you might have some trouble since it's in hebrew.

Heres a link to a product page I'm examining the problem on:
http://www.night-net.net/index.php?main_page=product_info&products_id=242

30 Nov 2009, 3:12 AM
#4534
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

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

Asdesign:

Yeah I'm guessing its just a small issue. I'm using Lightbox 1.5 which is the latest I could find under addons, and it has IH2 reference so I guess its the right addon to use. I could link you up to my site but you might have some trouble since it's in hebrew.

Heres a link to a product page I'm examining the problem on:
http://www.night-net.net/index.php?main_page=product_info&products_id=242

Well based on looking at your site, if I had to hazzard a guess.. I would say that IH2 is not installed correctly.. I know I keep saying it, but it's because it's really true.. IH2 is as easy to install as renaming the YOUR_TEMPLATE and admin folders to match the names used for these folders, copy the files over, and once you run the install from the admin, it should just WORK with no other tweaks required.. I can't help you with the lightbox, but given your image and lightbox behavior, I have a sneaking suspicion that once you get IH2 working the way it should that the lightbox issue may resolve itself.. for IH2, my suggestion is to uninstall from the admin, then carefully remove ALL of the IH2 files.. Make sure that you don't have any of the files in the install package in different folders than what's in the install package.. Once you get IH2 all backed out, then simply upload IH2 again.. and I would suggest downloading a FRESH copy of it to install..

30 Nov 2009, 3:14 AM
#4535
asdesign avatar

asdesign

Zen Follower

Join Date:
Jun 2009
Location:
Israel
Posts:
152
Plugin Contributions:
0

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

Guess I'll try that. Thank you very very much! Btw, did you like the design? I've been hard at work :p

OH, btw, do I have to delete the BMZ CACHE folder? I have to make sure images won't disappear from the products! There's like 200 products in this cart.

30 Nov 2009, 3:43 AM
#4536
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

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

Asdesign:

Guess I'll try that. Thank you very very much! Btw, did you like the design? I've been hard at work :p

OH, btw, do I have to delete the BMZ CACHE folder? I have to make sure images won't disappear from the products! There's like 200 products in this cart.I know it sucks to have to do this over, but honestly I think it's the only way to get to the bottom of your issue..

You won't lose your images at all if you delete the BMZ CACHE folder.. You must remove ALL elements of IH2 and start over..

I will keep stressing that this is one of the EASIEST mods to install. (I promise..) I can promise you that any issues have everything to to do with the install being executed incorrectly.. If you have modified any of the install files, if you have installed it differently than what the instructions say, you will have issues..

Also what I find is a frequent issue with mod installs is overwriting files being used by other mods versus using a program like Winmerge to merge the changes. I do not think that any such issues exist between IH2 and other mods.. (I run it on all my client sites, and they are all HEAVILY modded sites..) However if they did you would want to pay particular attention to the files in the includes/modules & includes/templates folders to make sure that you aren't overwriting changes required by other mods you may have installed...

Your site design is very nice.. Clean, and though I can't read Hebrew:laugh:, I can still see that it is a clean easy to navigate design..

30 Nov 2009, 3:46 AM
#4537
asdesign avatar

asdesign

Zen Follower

Join Date:
Jun 2009
Location:
Israel
Posts:
152
Plugin Contributions:
0

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

Okie dokie, just uninstalled everything, going to try a reinstall.

30 Nov 2009, 4:10 AM
#4538
asdesign avatar

asdesign

Zen Follower

Join Date:
Jun 2009
Location:
Israel
Posts:
152
Plugin Contributions:
0

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

damn :( no luck...I'm 100% I did everything right. I understand the structure of zen cart and everything and I just don't get it.

Maybe this error is the key. But if the problem isn't really inside this file, where else can it be?

Warning: strstr() [function.strstr]: Empty delimiter. in /home/nightnet/domains/night-net.net/public_html/includes/classes/bmz_image_handler.class.php on line 128

Btw, maybe if I knew what does function does I'll get some more clues!

30 Nov 2009, 5:07 AM
#4539
asdesign avatar

asdesign

Zen Follower

Join Date:
Jun 2009
Location:
Israel
Posts:
152
Plugin Contributions:
0

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

Half good news: I've got it all working properly but I had to edit "additional_images.php" and "main_product_image.php". I removed "/large" and "/medium" from "main_product_image.php" and also removed "/large" from "additional_images.php" so now all pictures are read from the main directory, i.e., "images/toshiba/xxxx.jpg". The good thing is, IH is basically doing it's job! All sizes are actually generated by IH, so even though I wasn't suppose to edit files to work it out, its an okay solution! :)

30 Nov 2009, 6:55 AM
#4540
asdesign avatar

asdesign

Zen Follower

Join Date:
Jun 2009
Location:
Israel
Posts:
152
Plugin Contributions:
0

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

Sorry for quattro posting but no edit option in this forum so I ain't got a choice. Did you notice the huge horizontal bar on my site? I can't find how to remove it but I bet its related to IH somehow.