Zen Follower
- Join Date:
- May 2008
- Posts:
- 453
- Plugin Contributions:
- 0
Image Handler 2 (for ZC v1.3.8 ONLY) Support
Ah...very good. Quite fast regenerating the images it needs, too. Impressive...
Thanks.
Views: 2,510,627
Zen Follower
Ah...very good. Quite fast regenerating the images it needs, too. Impressive...
Thanks.
New Zenner
Hi all, I'm having a problem with IH2. Picture uploading has been fine until i started having problem uploading subsequent pictures.
I keep having this error:
**Error!
Unable to determine the page link!
Function used:
zen_href_link('', '', 'NONSSL')**
Any kind soul can help with this?
Thank you so much:smile:
Totally Zenned
miaoling_wong:
Hi all, I'm having a problem with IH2. Picture uploading has been fine until i started having problem uploading subsequent pictures.
I keep having this error:
**Error!
Unable to determine the page link!Function used:
zen_href_link('', '', 'NONSSL')**
Any kind soul can help with this?
Thank you so much:smile:
try resaving your image...make sure it is the same as the thumb (smallest) image...png=png, jpg=jpg, gif=gif
I got those a few times and did the same thing to make them behave...maybe they were a bit corrupted.
Zen Follower
mcshane78:
Shop around... you would be supprised what you can get if you are a non-profit organisation.
While i cannot name names (as its against forum rules under advertising) a fair few hosts do offer either free or heavily reduced hosting fees for non-profits. on the condition that on your website there is acknoloedgement of the hosts and / or a banner add to them.
worth a try.. you dont get if you dont ask!!
while i alway recomend you avoid shared hosting.. the cost of hosting these days means you can get a Virtual Private Server for about £100-£150 per year in the UK
changing hosts, really is the only fix for this
Thanks, I do appreciate all of the input but shared is the only thing within the budget.
To respond to an earlier reponse, I had already contacted the host and their apology was followed by a 6 month refund of hosting fees.
As for this response, I did figure out a way to keep the bmz_cache folders cleaned out. The images created on the fly are nearly as quick to load as the cached images, so this keeps over 150,000 files from bottlenecking the site. The code is pasted below, if anyone else has a need to keep their cache (or any other folders) clean. You pick the file type(s) and the folder (please test before implementing). My host uses Linux and PHP5 so it may not be universal (like for windows servers).
<?php $some_dir0 = "../bmz_cache/0"; foreach (glob("$some_dir0/{*.gif,*.jpg,*.png,*.GIF,*.JPG,*.PNG,*.JPEG,*.jpeg}", GLOB_BRACE) as $file0) unlink($file0); $some_dir1 = "../bmz_cache/1"; foreach (glob("$some_dir1/{*.gif,*.jpg,*.png,*.GIF,*.JPG,*.PNG,*.JPEG,*.jpeg}", GLOB_BRACE) as $file1) unlink($file1); $some_dir2 = "../bmz_cache/2"; foreach (glob("$some_dir2/{*.gif,*.jpg,*.png,*.GIF,*.JPG,*.PNG,*.JPEG,*.jpeg}", GLOB_BRACE) as $file2) unlink($file2); $some_dir3 = "../bmz_cache/3"; foreach (glob("$some_dir3/{*.gif,*.jpg,*.png,*.GIF,*.JPG,*.PNG,*.JPEG,*.jpeg}", GLOB_BRACE) as $file3) unlink($file3); $some_dir4 = "../bmz_cache/4"; foreach (glob("$some_dir4/{*.gif,*.jpg,*.png,*.GIF,*.JPG,*.PNG,*.JPEG,*.jpeg}", GLOB_BRACE) as $file4) unlink($file4); $some_dir5 = "../bmz_cache/5"; foreach (glob("$some_dir5/{*.gif,*.jpg,*.png,*.GIF,*.JPG,*.PNG,*.JPEG,*.jpeg}", GLOB_BRACE) as $file5) unlink($file5); $some_dir6 = "../bmz_cache/6"; foreach (glob("$some_dir6/{*.gif,*.jpg,*.png,*.GIF,*.JPG,*.PNG,*.JPEG,*.jpeg}", GLOB_BRACE) as $file6) unlink($file6); $some_dir7 = "../bmz_cache/7"; foreach (glob("$some_dir7/{*.gif,*.jpg,*.png,*.GIF,*.JPG,*.PNG,*.JPEG,*.jpeg}", GLOB_BRACE) as $file7) unlink($file7); $some_dir8 = "../bmz_cache/8"; foreach (glob("$some_dir8/{*.gif,*.jpg,*.png,*.GIF,*.JPG,*.PNG,*.JPEG,*.jpeg}", GLOB_BRACE) as $file8) unlink($file8); $some_dir9 = "../bmz_cache/9"; foreach (glob("$some_dir9/{*.gif,*.jpg,*.png,*.GIF,*.JPG,*.PNG,*.JPEG,*.jpeg}", GLOB_BRACE) as $file9) unlink($file9); $some_dirc = "../bmz_cache/a"; foreach (glob("$some_dira/{*.gif,*.jpg,*.png,*.GIF,*.JPG,*.PNG,*.JPEG,*.jpeg}", GLOB_BRACE) as $filea) unlink($filea); $some_dirb = "../bmz_cache/b"; foreach (glob("$some_dirb/{*.gif,*.jpg,*.png,*.GIF,*.JPG,*.PNG,*.JPEG,*.jpeg}", GLOB_BRACE) as $fileb) unlink($fileb); $some_dirc = "../bmz_cache/c"; foreach (glob("$some_dirc/{*.gif,*.jpg,*.png,*.GIF,*.JPG,*.PNG,*.JPEG,*.jpeg}", GLOB_BRACE) as $filec) unlink($filec); $some_dird = "../bmz_cache/d"; foreach (glob("$some_dird/{*.gif,*.jpg,*.png,*.GIF,*.JPG,*.PNG,*.JPEG,*.jpeg}", GLOB_BRACE) as $filed) unlink($filed); $some_dire = "../bmz_cache/e"; foreach (glob("$some_dire/{*.gif,*.jpg,*.png,*.GIF,*.JPG,*.PNG,*.JPEG,*.jpeg}", GLOB_BRACE) as $filee) unlink($filee); $some_dirf = "../bmz_cache/f"; foreach (glob("$some_dirf/{*.gif,*.jpg,*.png,*.GIF,*.JPG,*.PNG,*.JPEG,*.jpeg}", GLOB_BRACE) as $filef) unlink($filef); ?>If using for a single folder, you would delete the script after the initial unlink call.
I use the curl command in cron keep kick start it. Just use the absolute path to wherever you drop it.
There is probably a shorter solution, but this one works for me.
Totally Zenned
Sounds like you have worked it all out, but IMO this is a bandaid solution, and the real issue is an inadequate host.
I can appreciate needing to work within a budget.. One of my "clients" is a non-profit org. I volunteer my services for them so that they can have someone who can maintain their site. This is a SMALL non-profit, so while I get needing to work within a budget, I also know that lots of companies will donate or greatly reduce the cost of hosting for not-for-profit orgs. So the ladies of this non-profit and I will be hitting the phones and e-mails later this year to find them a new webhost for similar reasons.. We have a target budget based on the current host, and I've no doubt we will find them a new (improved) host within their budget..
Good luck either way..:smile:
awhfy99:
Thanks, I do appreciate all of the input but shared is the only thing within the budget.
To respond to an earlier reponse, I had already contacted the host and their apology was followed by a 6 month refund of hosting fees.
As for this response, I did figure out a way to keep the bmz_cache folders cleaned out. The images created on the fly are nearly as quick to load as the cached images, so this keeps over 150,000 files from bottlenecking the site. The code is pasted below, if anyone else has a need to keep their cache (or any other folders) clean. You pick the file type(s) and the folder (please test before implementing). My host uses Linux and PHP5 so it may not be universal (like for windows servers).
<?php $some_dir0 = "../bmz_cache/0"; foreach (glob("$some_dir0/{*.gif,*.jpg,*.png,*.GIF,*.JPG,*.PNG,*.JPEG,*.jpeg}", GLOB_BRACE) as $file0) unlink($file0); $some_dir1 = "../bmz_cache/1"; foreach (glob("$some_dir1/{*.gif,*.jpg,*.png,*.GIF,*.JPG,*.PNG,*.JPEG,*.jpeg}", GLOB_BRACE) as $file1) unlink($file1); $some_dir2 = "../bmz_cache/2"; foreach (glob("$some_dir2/{*.gif,*.jpg,*.png,*.GIF,*.JPG,*.PNG,*.JPEG,*.jpeg}", GLOB_BRACE) as $file2) unlink($file2); $some_dir3 = "../bmz_cache/3"; foreach (glob("$some_dir3/{*.gif,*.jpg,*.png,*.GIF,*.JPG,*.PNG,*.JPEG,*.jpeg}", GLOB_BRACE) as $file3) unlink($file3); $some_dir4 = "../bmz_cache/4"; foreach (glob("$some_dir4/{*.gif,*.jpg,*.png,*.GIF,*.JPG,*.PNG,*.JPEG,*.jpeg}", GLOB_BRACE) as $file4) unlink($file4); $some_dir5 = "../bmz_cache/5"; foreach (glob("$some_dir5/{*.gif,*.jpg,*.png,*.GIF,*.JPG,*.PNG,*.JPEG,*.jpeg}", GLOB_BRACE) as $file5) unlink($file5); $some_dir6 = "../bmz_cache/6"; foreach (glob("$some_dir6/{*.gif,*.jpg,*.png,*.GIF,*.JPG,*.PNG,*.JPEG,*.jpeg}", GLOB_BRACE) as $file6) unlink($file6); $some_dir7 = "../bmz_cache/7"; foreach (glob("$some_dir7/{*.gif,*.jpg,*.png,*.GIF,*.JPG,*.PNG,*.JPEG,*.jpeg}", GLOB_BRACE) as $file7) unlink($file7); $some_dir8 = "../bmz_cache/8"; foreach (glob("$some_dir8/{*.gif,*.jpg,*.png,*.GIF,*.JPG,*.PNG,*.JPEG,*.jpeg}", GLOB_BRACE) as $file8) unlink($file8); $some_dir9 = "../bmz_cache/9"; foreach (glob("$some_dir9/{*.gif,*.jpg,*.png,*.GIF,*.JPG,*.PNG,*.JPEG,*.jpeg}", GLOB_BRACE) as $file9) unlink($file9); $some_dirc = "../bmz_cache/a"; foreach (glob("$some_dira/{*.gif,*.jpg,*.png,*.GIF,*.JPG,*.PNG,*.JPEG,*.jpeg}", GLOB_BRACE) as $filea) unlink($filea); $some_dirb = "../bmz_cache/b"; foreach (glob("$some_dirb/{*.gif,*.jpg,*.png,*.GIF,*.JPG,*.PNG,*.JPEG,*.jpeg}", GLOB_BRACE) as $fileb) unlink($fileb); $some_dirc = "../bmz_cache/c"; foreach (glob("$some_dirc/{*.gif,*.jpg,*.png,*.GIF,*.JPG,*.PNG,*.JPEG,*.jpeg}", GLOB_BRACE) as $filec) unlink($filec); $some_dird = "../bmz_cache/d"; foreach (glob("$some_dird/{*.gif,*.jpg,*.png,*.GIF,*.JPG,*.PNG,*.JPEG,*.jpeg}", GLOB_BRACE) as $filed) unlink($filed); $some_dire = "../bmz_cache/e"; foreach (glob("$some_dire/{*.gif,*.jpg,*.png,*.GIF,*.JPG,*.PNG,*.JPEG,*.jpeg}", GLOB_BRACE) as $filee) unlink($filee); $some_dirf = "../bmz_cache/f"; foreach (glob("$some_dirf/{*.gif,*.jpg,*.png,*.GIF,*.JPG,*.PNG,*.JPEG,*.jpeg}", GLOB_BRACE) as $filef) unlink($filef); ?>If using for a single folder, you would delete the script after the initial unlink call.
I use the curl command in cron keep kick start it. Just use the absolute path to wherever you drop it.
There is probably a shorter solution, but this one works for me.
Zen Follower
hi
I don't get these in image:
IH resize images yes
IH small image filetype no_change
IH small image background 255:255:255
IH watermark small images no
IH zoom small images yes
IH small image hotzone no
IH small image compression quality 85
IH medium image filetype no_change
IH medium image background 255:255:255
IH watermark medium images no
IH zoom medium images yes
IH medium image hotzone no
IH medium image compression quality 85
IH large image filetype no_change
IH large image background 255:255:255
IH watermark large images no
IH large image compression quality 85
IH large image maximum width 600
IH large image maximum height
IH watermark gravity Center
IH zoom gravity SouthEast
Totally Zenned
It's not clear what you are asking here.. It helps the community if they don't have to GUESS what might be your question/issue.. Can you elaborate??
lieven23:
hi
I don't get these in image:
IH resize images yes
IH small image filetype no_change
IH small image background 255:255:255
IH watermark small images no
IH zoom small images yes
IH small image hotzone no
IH small image compression quality 85
IH medium image filetype no_change
IH medium image background 255:255:255
IH watermark medium images no
IH zoom medium images yes
IH medium image hotzone no
IH medium image compression quality 85
IH large image filetype no_change
IH large image background 255:255:255
IH watermark large images no
IH large image compression quality 85
IH large image maximum width 600
IH large image maximum height
IH watermark gravity Center
IH zoom gravity SouthEast
New Zenner
Hi all,
I am using Zen Cart version 1.3.8 a. I installed Image Handler 2 which is working fine on the product pages but the images are broken in admin. Any advice would be appreciated.
Zen Follower
I am having an issue with the javascript throwing an error for the additional image. Here is what I am using:
$script_link = '<script language="javascript" type="text/javascript"><!--' . "\n" . 'document.write(\'' . ($flag_display_large ? '<a href="javascript:popupWindow(\\\'' . $large_link . '\\\')">' . $thumb_slashes . '</a>' : $thumb_slashes) . '\');' . "\n" . '//--></script>';
which generates this:
<script language="javascript" type="text/javascript"><!--
document.write('<a href="javascript:popupWindow(\'http://calinoproducts.com/store/index.php?main_page=popup_image_additional&pID=2&pic=0&products_image_large_additional=images/large/testproduct_1_LRG.jpg\')"><img src="bmz_cache/3/3e403c14ca4950d9bec9e6df26fc1837.image.80x80.jpg" alt="Cal\'ino Oil - 10 oz. pump" title=" Cal\'ino Oil - 10 oz. pump " width="80" height="80" style="position:relative" onmouseover="showtrail(\'images//testproduct_1.jpg\',\'Cal\'ino Oil - 10 oz. pump\',80,80,177,177,this,69,69,11,11);" onmouseout="hidetrail();" /></a>');
//--></script>
I don't get any rollover effect and IE tells me there is an error - expected ')' on the line that has //-->< /script> on it.
I have had this issue every time I try to use this version, and always wind up going back to an older version, but I'd really like to get this fixed. Looking at the code, there are no stray opening parenthesis, so I don't know why it's saying that. Anyone have any input?
Thanks!
Zen Follower
Ah, never mind... fixed it - I found a fix for titles (alt tags) with product names with apostrophes and it took are of the issue.
Totally Zenned
Scarlet:
Ah, never mind... fixed it - I found a fix for titles (alt tags) with product names with apostrophes and it took are of the issue.Care to post this fix in case others have the same issue???
Zen Follower
Sure, it's on page 100 of this thread, just about in the middle of the page.
Totally Zenned
Scarlet:
Sure, it's on page 100 of this thread, just about in the middle of the page.
Ahhh I think this is the one.. Thanks for sharing..
http://www.zen-cart.com/forum/showpost.php?p=344579&postcount=996
jettrue:
Try adding this:
$alt = str_replace("'", '', $alt);right after this:
$alt = str_replace('"', '"', $alt);in includes/classes/bmz_image_handler.class.php
Totally Zenned
julie.t:
Hi all,
I am using Zen Cart version 1.3.8 a. I installed Image Handler 2 which is working fine on the product pages but the images are broken in admin. Any advice would be appreciated.
what do you mean by broken...do yo mean that in admin section you see no images or what
New Zenner
Exactly. When viewing images using Image Handler in admin, the images are broken (no images).
Thanks for your response.
Totally Zenned
julie.t:
Exactly. When viewing images using Image Handler in admin, the images are broken (no images).
Thanks for your response.
have you gone into tools/IH2/and reset the cache for the images?
if you have done that, and you did upload the images through IH2 then did they get moved?
New Zenner
Hello,
Im using zen car vr 1.3.8 with the Apple Zen template. I've searched far and wide for an answer to my problem but to no avail. :(
Is there any way to change the image placement for the additional images added through image handler? As in, I want different angles of some mantels for our website but it put the images at the very bottom of the product page, and I want the thumbnails beneath the original larger product image. Anyone know how to do this? Thanks!
Totally Zenned
wasabiman:
Hello,
Im using zen car vr 1.3.8 with the Apple Zen template. I've searched far and wide for an answer to my problem but to no avail. :(
Is there any way to change the image placement for the additional images added through image handler? As in, I want different angles of some mantels for our website but it put the images at the very bottom of the product page, and I want the thumbnails beneath the original larger product image. Anyone know how to do this? Thanks!
This is not an Image Handler support question.. Image Handler has NOTHING to do with the layout of the Product Detail page.
Please create a new post in the forum to pose your question so that you will be able to get better assistance from the community..
Good luck..
Zen Follower
Hi everyone, I just uploaded IH2 and went to my CP to do the actual install. I hit the install button and I get
{The requested URL /store/admin/image_handler.php was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.}
Any ideas on how to solve this??? I am really looking forward to being able to use this add-on feature.
AL :shocking:
Topnotch Bass Baits
Totally Zenned
BigAl49:
Hi everyone, I just uploaded IH2 and went to my CP to do the actual install. I hit the install button and I get
{The requested URL /store/admin/image_handler.php was not found on this server.Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.}
Any ideas on how to solve this??? I am really looking forward to being able to use this add-on feature.
AL :shocking:
Topnotch Bass Baits
did you look to make sure you uploaded that file to the admin folder?
Fields marked required must be completed.
Tell staff why this post should be reviewed.