-
Re: Image Handler 4 (for v1.5.x) Support Thread
the site was originally 1.3.7 and have upgraded through the years and the mod has been upgraded as well as required, dont know if that makes any difference.
but when i look in the DB or easy populat download the images in the product_image table are all the original names, but down show any of the additonal images, so i cant make the connection there.
Does IH4 take the first default image, copy it, rename, then make all the additional images on the fly renaming them to suit to use the ZC process?? if so... how can i find the IM4 name for the first image to find the additional images and create the link??
-
Re: Image Handler 4 (for v1.5.x) Support Thread
Quote:
Originally Posted by
kitcorsa
the site was originally 1.3.7 and have upgraded through the years and the mod has been upgraded as well as required, dont know if that makes any difference.
but when i look in the DB or easy populat download the images in the product_image table are all the original names, but down show any of the additonal images, so i cant make the connection there.
Does IH4 take the first default image, copy it, rename, then make all the additional images on the fly renaming them to suit to use the ZC process?? if so... how can i find the IM4 name for the first image to find the additional images and create the link??
Historically the process has been like this:
1. Admin, identify that an image is to be associated with a product.
2. Image is uploaded with the ability to identify the base product name as something other than the name of the file being uploaded.
3. After upload, the file is stored using the new filename and the database is updated with the path/filename selected in the first upload.
4. Subsequent images (additonal images) are then able to be uploaded but with the ability to alter the suffix applied which will be used to name the uploaded file and maintain as an additional image to the primary image.
Then on the store side:
1. The main image is pulled from the products table, and all images that meet the beginning part of the filename up to it's extension.
2. IH4 then uses those filenames to perform calculations to modfy/compress the images and pull the resulting image from the "calculated" location. If the image does not exist at that location, then it is created on the fly to be referenced again in the future.
Historically that filename was made through a hash algorithm; however, the newer version on github is to make the filename a "legible" filename. Now is it possible that there is some method used to provide a dfferent display name for the file when presented online? Certainly... But that would be a result of basically sending the filename through the image_handler portion of the code.
That help any?
-
Re: Image Handler 4 (for v1.5.x) Support Thread
Quote:
Originally Posted by
kitcorsa
Does IH4 take the first default image, copy it, rename, then make all the additional images on the fly renaming them to suit to use the ZC process??
That's how it works in a nutshell..
Quote:
Originally Posted by
kitcorsa
how can i find the IM4 name for the first image to find the additional images and create the link??
As MC12345678 pointed out this renaming was done using an MD5 hash. In order to find the REAL file names you will have to find some tool which can interpret the MD5 hash based names in the bmz_cache folders and "interpret" them to get the real file name.
The IH4 version available in Github addresses this by giving the bmz_cache files REAL names..
-
Re: Image Handler 4 (for v1.5.x) Support Thread
Quote:
Originally Posted by
DivaVocals
That's how it works in a nutshell..
As MC12345678 pointed out this renaming was done using an MD5 hash. In order to find the REAL file names you will have to find some tool which can interpret the MD5 hash based names in the bmz_cache folders and "interpret" them to get the real file name.
The IH4 version available in Github addresses this by giving the bmz_cache files REAL names..
Actually, to determine the IH4-md5 name for the image, you'll need to know the image's real name and the IH4 controls applied to that image (watermark, zoom, quality and background). An MD5 hash is one-way, you can't look at the hashed file-name and work back to the real one!
Refer to the get_resized_image function in /includes/classes/bmz_image_handler.class.php and its use of the getCacheName function. The first parameter to getCacheName is the 'glob' that gets run through the md5() function to produce a unique file-name.
-
Re: Image Handler 4 (for v1.5.x) Support Thread
Sum and total though, the original files, including additional images as described in the documentation for IH4 follow the source server namng convention of ZC. The original files can be found in the designated folder, then with the name assigned to the main image as the prefix to the image and whatever suffix was applied whether automated or self designated. Each such image to have the same extension (.gif, .jpg, etc.) as the primary image. Thus addtional image location code would work the same as base ZC functionality.
That said, to find the resized image(s) the above discussion applies, but from the sounds of it, the issue was tryng to locate the orginal files. If the resized files are the target, then need to invoke the applicable code to translate the desired image to the bmz_cache related file.
-
Re: Image Handler 4 Support Thread
Hi the install inage handler link is missing in tools, any ideas?
-
Re: Image Handler 4 (for v1.5.x) Support Thread
Hi
the install link in tools is missing, any clues?
-
Re: Image Handler 4 (for v1.5.x) Support Thread
Quote:
Originally Posted by
DivaVocals
That's how it works in a nutshell..
As MC12345678 pointed out this renaming was done using an MD5 hash. In order to find the REAL file names you will have to find some tool which can interpret the MD5 hash based names in the bmz_cache folders and "interpret" them to get the real file name.
The IH4 version available in Github addresses this by giving the bmz_cache files REAL names..
so would upgrading to the github version and then running the update all old images, give me a way to be able to work out a way to help with and import into my SAP system and link zen-cart and SAP. I have everything else working bar additional images :-(
if not im going to have to find a different way that zzencart works out this assosiation of images and products or basically start renaming and re uploading all images for products again... 10k lat check on the server.
-
Re: Image Handler 4 (for v1.5.x) Support Thread
Quote:
Originally Posted by
kitcorsa
so would upgrading to the github version and then running the update all old images, give me a way to be able to work out a way to help with and import into my SAP system and link zen-cart and SAP. I have everything else working bar additional images :-(
if not im going to have to find a different way that zzencart works out this assosiation of images and products or basically start renaming and re uploading all images for products again... 10k lat check on the server.
What aspect of the additional images are you trying to get into your SAP system?
Basically everything you need is available either in or from includes/modules/YOUR_TEMPLATE/additional_images.php.
With the variable $products_image assigned to either PRODUCTS_IMAGE_NO_IMAGE or the database value of products_image obtained from the products table, and $flag_show_product_info_additional_images != 0, then the module as called by:
Code:
require(DIR_WS_MODULES . zen_get_module_directory('additional_images.php'));
sets/retrieves the data associated with the additional images for display as shown in the product_info page, otherwise an alternate version of the file could be used to provide the desired results... If you want a standard path/image that does not take advantage of the IH4 functionality then using the default version of includes/modules/additional_images.php will be sufficient and again a modified version (renamed to something else) may support the results you are looking for.
There's not much more to it. The github version will just provide a path that is "pretty" instead of the path that is made up of all sorts of letters, numbers, folders, etc... Basically if you have the main image working, then the additional images follows from the information obtained/used to retrieve the main image...
-
Re: Image Handler 4 (for v1.5.x) Support Thread
Quote:
Originally Posted by
McGill
Hi
the install link in tools is missing, any clues?
Need more information, please see the posting tips that appear above when replying to a message. (click reply or reply with quote and then scroll up)
-
Re: Image Handler 4 (for v1.5.x) Support Thread
Quote:
Originally Posted by
lat9
Actually, to determine the IH4-md5 name for the image, you'll need to know the image's real name and the IH4 controls applied to that image (watermark, zoom, quality and background). An MD5 hash is one-way, you can't look at the hashed file-name and work back to the real one!
There are MD5 hash decrypter tools.. dunno how well they will work with the IH4 cached files names as to your point other factors play into the filenaming for the cache..
-
Re: Image Handler 4 (for v1.5.x) Support Thread
Quote:
Originally Posted by
McGill
Hi
the install link in tools is missing, any clues?
Nope..something you installed broke IH by removing it.. Reinstall IH..
-
Re: Image Handler 4 (for v1.5.x) Support Thread
Basicically what i need to do is do a full migration from ZC to my SAP system so my website and instore / stock management / vehicle tracking and store (high street shop) sales all tie into together.
I have migrated everything and got everything working to gether fine appart from the additonal images as i cant see in the database the additonal images or a way to work out what image is what in the cahce folder etc.
ie database shows my product id1 is called x and costs x and has image x.jpg etc but the additonal image upload via ih4 is called y.jpg and and i see in the databse how ZC knows to pull up y.jpg as an additional image for product x id1.... has to be there somewhere.
Quote:
Originally Posted by
mc12345678
What aspect of the additional images are you trying to get into your SAP system?
Basically everything you need is available either in or from includes/modules/YOUR_TEMPLATE/additional_images.php.
With the variable $products_image assigned to either PRODUCTS_IMAGE_NO_IMAGE or the database value of products_image obtained from the products table, and $flag_show_product_info_additional_images != 0, then the module as called by:
Code:
require(DIR_WS_MODULES . zen_get_module_directory('additional_images.php'));
sets/retrieves the data associated with the additional images for display as shown in the product_info page, otherwise an alternate version of the file could be used to provide the desired results... If you want a standard path/image that does not take advantage of the IH4 functionality then using the default version of includes/modules/additional_images.php will be sufficient and again a modified version (renamed to something else) may support the results you are looking for.
There's not much more to it. The github version will just provide a path that is "pretty" instead of the path that is made up of all sorts of letters, numbers, folders, etc... Basically if you have the main image working, then the additional images follows from the information obtained/used to retrieve the main image...
-
Re: Image Handler 4 (for v1.5.x) Support Thread
Maybe it's hidden in the below message, but could you provide a link to a page where there are additional images to maybe see what you are talking about? Again, iH4 does nothing "special" tothe naming of additional image files that breaks the normal process of naming. If you can migrate a standard ZC that has addtional images, you can do so for one with IH4 installed...
The code in includes:modules/additional_images.php (or the overridden one for IH4) takes the information for the main product (coming from the database record for products_id=x) and identifies all of the images that are considered associated with the product. If you have had that or similar files modified to do something other than the base action, then may I suggest returning to the one that modified t for you or looking for someone else to support this effort.
If the main image was saved as y.jpg, then all additional images for that product will begin wth y and end with .jpg and have some middle name such as. _1, _2, etc for each additional image... If you need to capture in some sort of database the actual name of each additional image, then you need to translate/capture that through the use of the above file or a modified version of it... Regardless I think this has gotten to the point that it is not an issue associated with IH4 as IH4 does nothing beyond standard processng for additional images... Makes life easier, but in that regards doesn't modify the image handling of additional images.
Quote:
Originally Posted by
kitcorsa
Basicically what i need to do is do a full migration from ZC to my SAP system so my website and instore / stock management / vehicle tracking and store (high street shop) sales all tie into together.
I have migrated everything and got everything working to gether fine appart from the additonal images as i cant see in the database the additonal images or a way to work out what image is what in the cahce folder etc.
ie database shows my product id1 is called x and costs x and has image x.jpg etc but the additonal image upload via ih4 is called y.jpg and and i see in the databse how ZC knows to pull up y.jpg as an additional image for product x id1.... has to be there somewhere.
-
Re: Image Handler 4 (for v1.5.x) Support Thread
I have a question: Is it possible to have 2 sites using the same images with image handler when one of the site is placed in a subdomain? At this moment i am testing with 2 sites using the same database. The site in the sub domain is now using the images from the shop in the root. Thats ok, but i want the shop to use the images from de /bmz_cache folder from the shop in the root. Right now i defined the images folder in the configure file.
The reason i would like to do this is because the site in the sub domain is a mobile site. Using its own files but sharing the database with the shop in the root.
And, second question if it is possible where should i start?
I'm using zencart 1.5.4. and image handler downloaded from git_hub because i like the image names better.
-
Re: Image Handler 4 (for v1.5.x) Support Thread
You can't get the information about the additional images from the database. It is not stored in there. You are going to have to do some programming to search for the additional images ( same way as Zen does ) and export them that way.
I'd try updated versions of IH from git to solve the naming issues. The hashing thing makes finding them complex.
Quote:
Originally Posted by
kitcorsa
Basicically what i need to do is do a full migration from ZC to my SAP system so my website and instore / stock management / vehicle tracking and store (high street shop) sales all tie into together.
I have migrated everything and got everything working to gether fine appart from the additonal images as i cant see in the database the additonal images or a way to work out what image is what in the cahce folder etc.
ie database shows my product id1 is called x and costs x and has image x.jpg etc but the additonal image upload via ih4 is called y.jpg and and i see in the databse how ZC knows to pull up y.jpg as an additional image for product x id1.... has to be there somewhere.
-
Re: Image Handler 4 (for v1.5.x) Support Thread
Quote:
Originally Posted by
karinvd
I have a question: Is it possible to have 2 sites using the same images with image handler when one of the site is placed in a subdomain? At this moment i am testing with 2 sites using the same database. The site in the sub domain is now using the images from the shop in the root. Thats ok, but i want the shop to use the images from de /bmz_cache folder from the shop in the root. Right now i defined the images folder in the configure file.
The reason i would like to do this is because the site in the sub domain is a mobile site. Using its own files but sharing the database with the shop in the root.
And, second question if it is possible where should i start?
I'm using zencart 1.5.4. and image handler downloaded from git_hub because i like the image names better.
If not mistaken it primarily revolves around the variable $ihConf['dir']['docroot'] set in includes/functions/extra_functions/functions_bmz_image_handler.php
Though I believe there are some other areas where tests are performed against the existence of the image(s) which may not quite work out right without additional coding... But, many of the IH tests are performed and data is "written" with relationship to the docroot. Would suggest to also work "backwards" from where the generated URI is created for the image to see what if any other values need to be incorporated to "move" up a directory (elsewhere) in order to provide the bmz_cache related images as compared to the base URI address on the page, and if working with SSL, would need to also ensure that any links to the image(s) were of the same request type. In a way it may actually be easier/better to have all of the images hosted in this new sub-directory or whatever it is than the root. At least that way they would be directly accessible by digging deeper not coming back out... Either way seems like making it complicated... :)
-
Re: Image Handler 4 (for v1.5.x) Support Thread
Thank you @mc12345678 I did find the variable $ihConf['dir']['docroot'] but it is not enough to change it. Thanks for the idea to put all images in the subdiretory in stead of the root. . Thats something i dit not think of! I'll keep on trying :-)
-
Re: Image Handler 4 (for v1.5.x) Support Thread
Before I do a lot of digging can someone visit my site to see if this plugin is actually working? ATM I cannot use Chrome so I am being forced in to Windows Edge. The site is not working in edge. So if someone using Chrome visit this page and let me know if it is working. Thank you in advance.
-
Re: Image Handler 4 (for v1.5.x) Support Thread
Quote:
Originally Posted by
adb34
Before I do a lot of digging can someone visit my site to see if this plugin is actually working? ATM I cannot use Chrome so I am being forced in to Windows Edge. The site is not working in edge. So if someone using Chrome
visit this page and let me know if it is working. Thank you in advance.
Did you turn IH resize images to "yes" ? When looking in Chrome and FF, both give the default paths to the images.
-
Re: Image Handler 4 (for v1.5.x) Support Thread
Quote:
Originally Posted by
Design75
Did you turn IH resize images to "yes" ? When looking in Chrome and FF, both give the default paths to the images.
Oh.........no :no: ........have now . :censored:?
All I need to do is sort out the popup image size and I will be happy. Thank you for pointing out that I cannot read (lol).
-
Image Show in hover but wont load if clicked
http://aquaassets.net/index.php?main...products_id=78
Hover images work.......but if you click to see larger it does not work (hovering wont work well on cell so i need it to click)
-
Re: Image Show in hover but wont load if clicked
This just in (a couple of hours ago) that affects (with solution) a concern related to additional images when a default image is in use for missing images: https://www.zen-cart.com/showthread....95#post1292095
-
Re: Image Handler 4 Support Thread
Hi everybody!
I wanted to share a small modification i did to auto generate the path for the image in the Image Manager.
Use it at your own risk
When you add the first image to an item it generates the path for where it will be stored.
I manage multiple site and i wanted one site to create the path with the category and sub-category and the rest of my sites based on the manufacturer.
So here it goes :
First, add these function to the top of /yourAdmin/image_handler.php (I added them around line 36)
PHP Code:
function replace_weird_char($str){
$unwanted_array = array( 'Š'=>'S', 'š'=>'s', 'Ž'=>'Z', 'ž'=>'z', 'À'=>'A', 'Á'=>'A',
'Â'=>'A', 'Ã'=>'A', 'Ä'=>'A', 'Å'=>'A', 'Æ'=>'A', 'Ç'=>'C',
'È'=>'E', 'É'=>'E', 'Ê'=>'E', 'Ë'=>'E', 'Ì'=>'I', 'Í'=>'I',
'Î'=>'I', 'Ï'=>'I', 'Ñ'=>'N', 'Ò'=>'O', 'Ó'=>'O', 'Ô'=>'O',
'Õ'=>'O', 'Ö'=>'O', 'Ø'=>'O', 'Ù'=>'U', 'Ú'=>'U', 'Û'=>'U',
'Ü'=>'U', 'Ý'=>'Y', 'Þ'=>'B', 'ß'=>'Ss', 'à'=>'a', 'á'=>'a',
'â'=>'a', 'ã'=>'a', 'ä'=>'a', 'å'=>'a', 'æ'=>'a', 'ç'=>'c',
'è'=>'e', 'é'=>'e', 'ê'=>'e', 'ë'=>'e', 'ì'=>'i', 'í'=>'i',
'î'=>'i', 'ï'=>'i', 'ð'=>'o', 'ñ'=>'n', 'ò'=>'o', 'ó'=>'o',
'ô'=>'o', 'õ'=>'o', 'ö'=>'o', 'ø'=>'o', 'ù'=>'u', 'ú'=>'u',
'û'=>'u', 'ý'=>'y', 'þ'=>'b', 'ÿ'=>'y', '/'=>'', '\\'=>'',
' '=> '-', '.'=>'_', '®'=>'', '™'=>'' );
return strtr( $str, $unwanted_array );
}
function get_new_img_path($product_id, $base = '', $create_path_from = ''){
$path = '';
switch ($create_path_from) {
case 'category':
$cat_array = zen_generate_category_path($product_id, 'product');
$temp_path = '';
$is_first = true;
foreach ($cat_array[0] as $value) {
if (!$is_first) {
$temp_path .= '/';
}
$temp_path .= replace_weird_char($value['text']);
$is_first = false;
}
if ($temp_path != '') {
$path = $base != '' ? ' value="' . $base . '/' . $temp_path . '"' : ' value="' . $temp_path . '"';
}
break;
case 'manufacturer':
$manufacturer_name = replace_weird_char(zen_get_products_manufacturers_name($product_id));
if ($base != '') {
$path = ' value="' . $base . ($manufacturer_name != '' ? '/' . $manufacturer_name : '') .'"';
} else {
$path = ($manufacturer_name != '' ? ' value="' . $manufacturer_name .'"' : '');
}
break;
case '':
$path = $base != '' ? ' value="' . $base . '"' : '';
break;
}
return strtolower($path);
}
The function replace_weird_char($str) replaces the characters you don't want in a file path. You can add any character you want in the array.
The second function get_new_img_path(...) creates the path according to the information you supplied. (Explained in the next section)
Second, change this line (around line 867) :
PHP Code:
$contents[] = array('text' => TEXT_INFO_OR.' ' . zen_draw_input_field('imgNewBaseDir', '', 'size="20"') );
to this :
PHP Code:
$contents[] = array('text' => TEXT_INFO_OR.' ' . zen_draw_input_field('imgNewBaseDir', '', 'size="20"' . get_new_img_path($pInfo->products_id, 'products', 'manufacturer')) );
This is where the magic happens. The function get_new_img_path receive 3 parameters.
The first one is the product id, don't change it.
The second is the base of the path. If you enter 'products' the path will start with 'product/[something]'.
The last is the type of path you want, you have 3 options ('', 'category' or 'manufacturer')
Here is some example :
- get_new_img_path($pInfo->products_id, 'products', 'manufacturer')
output : 'products/[manufacturer]/'
- get_new_img_path($pInfo->products_id, '', 'manufacturer')
output : '[manufacturer]/'
- get_new_img_path($pInfo->products_id, '', '')
output : ''
- get_new_img_path($pInfo->products_id, 'products', 'category')
output : 'products/[category]/[sub-category]/[sub-category]/.../[sub-category]/'
- get_new_img_path($pInfo->products_id, 'products', 'category')
output : '[category]/[sub-category]/[sub-category]/.../[sub-category]/'
Finally, i had to make a small modification to the database because the maximum number of characters in the file path for the image is 64 and you can easily go over this with the category option.
In the table 'products' the field 'products_image' needs to be change from varchar(64) to varchar(200). (I choose 200 but less could work to, i just didn't want to bother with it anymore...)
This has been tested on 4 different website and with more than 5000 items but it still should be tested thoroughly before going to a live site.
I hope it can help some of you out!
Have a good one! :cool:
-
Re: Image Handler 4 Support Thread
Hi,
Running 1.5 with ZenCart.
Our client has a site which has image handler. Although it has never worked properly, and often is unable upload images.
I am doing some testing today, however I am stuck without being able to load up a product at all within image uploader. I am faced with the same message:
"No Image Handler information found."
Any clue where to start with this error?
-
Re: Image Handler 4 Support Thread
Quote:
Originally Posted by
joecooper
Hi,
Running 1.5 with ZenCart.
Our client has a site which has image handler. Although it has never worked properly, and often is unable upload images.
I am doing some testing today, however I am stuck without being able to load up a product at all within image uploader. I am faced with the same message:
"No Image Handler information found."
Any clue where to start with this error?
some other modules remove the version constant from the database when they are installed.
Insert this in your database, and it should work again. You should edit the version number to the version you are you using.
Code:
INSERT INTO configuration ('configuration_title', 'configuration_key', 'configuration_value', 'configuration_description', 'configuration_group_id', 'sort_order', 'last_modified', 'date_added', 'use_function', 'set_function') VALUES ('IH version', 'IH_VERSION', '4.3.2', 'IH Version is stored but not shown on configuration menus', '6', '10000', NULL, '0001-01-01 00:00:00.000000', NULL, NULL);
-
Re: Image Handler 4 Support Thread
Hello. Zen Cart 1.5.4 - Issue with Larger Image Upload
Anytime we upload an image larger than 2700 pixels (there-abouts) the admin page for Image Handler breaks in 1/2 - if you view source the code literally stops 1/2 way down the page...the last line of code in the source is:
<td class="dataTableContent" align="center" valign="top">
And you can't upload anymore images - there is not button to add more. It seems if you upload an image smaller than 2700 px wide we are fine.
We recently upgraded the site - new theme - upgrade from ZC 1.3.x to 1.5.4 (Image Handler is v. 4) Used to be able to upload any size images.
Once the above issue happens we have to delete the record and start over with the product info.
Anyone else experience this? Any ideas to look at?
Thanks.
-
Re: Image Handler 4 Support Thread
Quote:
Originally Posted by
eyeb
Hello. Zen Cart 1.5.4 - Issue with Larger Image Upload
Anytime we upload an image larger than 2700 pixels (there-abouts) the admin page for Image Handler breaks in 1/2 - if you view source the code literally stops 1/2 way down the page...the last line of code in the source is:
<td class="dataTableContent" align="center" valign="top">
And you can't upload anymore images - there is not button to add more. It seems if you upload an image smaller than 2700 px wide we are fine.
We recently upgraded the site - new theme - upgrade from ZC 1.3.x to 1.5.4 (Image Handler is v. 4) Used to be able to upload any size images.
Once the above issue happens we have to delete the record and start over with the product info.
Anyone else experience this? Any ideas to look at?
Thanks.
Yeah, have seen it though where I've seen it the limit was much smaller...if not mistaken there's a thread or two out there about this, but basically it's a limit posed by the graphical sizing software not by IH4 itself... IH4 just happens to show the effect. Also, I think that there is some commenting out of code that might allow everything to progress as "normal" but that detail is covered elsewhere than this particular post. Long and short of it is while requested to provide the largest/highest quality image as possible, there still is an upper limit to everything...
-
Re: Image Handler 4 Support Thread
OK, this is driving me nuts because I can't narrow down the cause.
I have a test site up (here)
The product image on the left (all are missing but 1) is showing in the browser as 100 pixels wide. I can't quite figure out why that is, but that's not what I'm here to ask. The NATIVE size of the image is 250 x 103 and I can't figure out for the life of me where that's coming from! The actual size of the original image is 3x that (750 x 311). The image src is in the bmz_cache/8/ folder but how's it get there? I have NO setting (that I can find) sizing anything to 250px wide and/or 103px tall, or "1 third" or anything like that.
I assumed for that page that the setting should be "Image - Product Listing Width/Height", which I have set to 100 and 100! respectively. Yet it keeps generating this 250*103 image. It has to be IH doing it, right? THat's why it is in that folder?
Incidentally, I changed that setting to something else but there's no effect on the page... no matter what, I get it showing as 100px wide with a native width of 250px.
HELP!
-
Re: Image Handler 4 Support Thread
I uploaded a 2nd image... this time the original image is 712*960. I still have the image set to resize to 100*100!. For this case, however, on that page it shows as 100*135 with a native size of 212*286. This time not exactly 1/3, so maybe that was a coincidence... but still, where in the world is this random resizing coming from???
Isn't the whole point of IH to automatically resize to the WANTED size, not some weird in-between size so the browser still has to smoosh it?
-
Re: Image Handler 4 (for v1.5.x) Support Thread
Nevermind.... it seems like its some stupid hardcoding in the template I bought.
-
Re: Image Handler 4 Support Thread
Just a quick question - IH works great and the caching speeds up a website dramtically BUT is there a way of changing the horrible random filenames so that they are the same as the original image? SEO wise it's quite important to have good keywords in image names... At the moment the filenames are all "/bmz_cache/dfhkfh8y770FBDFD F.jpg" etc
-
Re: Image Handler 4 Support Thread
Quote:
Originally Posted by
twdhosting
Just a quick question - IH works great and the caching speeds up a website dramtically BUT is there a way of changing the horrible random filenames so that they are the same as the original image? SEO wise it's quite important to have good keywords in image names... At the moment the filenames are all "/bmz_cache/dfhkfh8y770FBDFD F.jpg" etc
Please take an opportunity to peruse this forum back even a few pages. Will see that there is a version on gihtub that incorporates the above request. It has not fully gone through testing, so the use is at your own risk (beta version last time I checked).
-
Re: Image Handler 4 Support Thread
I don't think the image file name matters squat for SEO and if anyone tells you otherwise they're spouting out more than they can possibly know since the search engines NEVER publish their ranking criteria.
Sometimes evidence is... well... the best evidence.
Seaching for "ball", the #1 hit has a file name called 751_multi.jpg. Too abstract? The number one hit for "Britney Spears" is an image named NUw8J0T5.jpg.
I know I hate more than anyone when someone posts a bad answer to my question, so officially my answer is "don't know"... but my advice, which you didn't ask for, is to not worry about it. SEO as a whole is strange in my opinion as Google has always done the same thing which is to ignore or even punish attempts to manipulate rankings in favor of delivering viewers the best CONTENT.
-
Re: Image Handler 4 Support Thread
Quote:
Originally Posted by
twdhosting
Just a quick question - IH works great and the caching speeds up a website dramtically BUT is there a way of changing the horrible random filenames so that they are the same as the original image? SEO wise it's quite important to have good keywords in image names... At the moment the filenames are all "/bmz_cache/dfhkfh8y770FBDFD F.jpg" etc
Quote:
Originally Posted by
mc12345678
Please take an opportunity to peruse this forum back even a few pages. Will see that there is a version on gihtub that incorporates the above request. It has not fully gone through testing, so the use is at your own risk (beta version last time I checked).
Quote:
Originally Posted by
s_mack
I don't think the image file name matters squat for SEO and if anyone tells you otherwise they're spouting out more than they can possibly know since the search engines NEVER publish their ranking criteria.
Sometimes evidence is... well... the best evidence.
Seaching for "ball", the #1 hit has a file name called 751_multi.jpg. Too abstract? The number one hit for "Britney Spears" is an image named NUw8J0T5.jpg.
I know I hate more than anyone when someone posts a bad answer to my question, so officially my answer is "don't know"... but my advice, which you didn't ask for, is to not worry about it. SEO as a whole is strange in my opinion as Google has always done the same thing which is to ignore or even punish attempts to manipulate rankings in favor of delivering viewers the best CONTENT.
I agree with s_mack.. Let me add something.. The changes to image naming in the beta version of Image Handler available on Github wasn't done for SEO at all.. As IH has been around for a LONG time, I think that this longevity alone has more than disproved any SEO file naming myths.. The change to the naming convention in the beta version of IH4 (on Github) was done simply to help shop owners identify CLEARLY images in the cache.. SEO wasn't even a consideration..
-
Re: Image Handler 4 Support Thread
Woah, twdhosting!!! Easy with the salty language, buddy. Using words like 'SEO' or 'keywords' up here??? :shocking:
Keep it up and somebody is likely to wash that filthy mouth out with soap! :D
So… I'm guessing you create subdirectories in your image folder. And the names of the sub-directories not only help you track which images are where, but those subfolder names are excellent descriptions of the images below. And you wish SE's would notice them. So it bothers you that IH removes them from the image's url?
That used to bother me, too. But then I noticed that my images do very well on SE searches, often appearing at the top of google image searches.
My *guess* is that this happens for 3 reasons:
- SE automatically associates my image w/ keywords from content on page where image exists (i.e. prod/category page).
- I use the mod Sitemap XML. When it lists a page, it automatically adds the associated image.
- Content, content, content! If your content is good, the SE bot will find it's own keywords and associate them with your image.
I get that you wish your folder names would also show up, as they would if IH used the 'natural' structure to create URL (/images/cars/sedans/honda/accord.jpeg = keywords: "cars, sedans, honda, accord"). I would like that, too. Perhaps it wouldn't help, but it certainly wouldn't hurt.
Honestly though, I don't think it matters much. Not enough to warrant using the Beta version (unless you plan to help test that version).
To optimize your site for SE, first give them what the want. The following is a list *no one* will argue with (maybe?):
- XML Sitemap
- Provide a good user experience
- Valid code
- Fast site <--- IH is awesome for this!
- Excellent, well organized content, content, CONTENT!
To load your URL's, focus on pages other than your images by installing a rewrite mod (I favor CEON).
Bottom line, IH rocks! It's my second favorite mod (first being DrByte's Backup MySQL)! Benefits gained using IH and bmz_cache far, far outweighs any minor keyword opportunity loss.
+++
NOTE TO MOD: I know SEO is not pertinent to IH4 support. I just wanted to point out that even though IH4 has no intention to effect SEO, it inadvertently does. And in a very positive way, primarily by slimming files and decreasing load time.
-
Re: Image Handler 4 Support Thread
Quote:
Originally Posted by
Feznizzle
Not enough to warrant using the Beta version (unless you plan to help test that version).
You may not know this, but the "beta" version has been being "tested" for a few years now.. (in use on ALL of my client's websites) It's only labeled "beta" because this version only exists in my Github repo and I have not yet submitted it to the downloads yet.. (just haven't had time) If the OP really wants his IH4 image cache files to be based on the uploaded image name and to NOT use the MD5 hash code, I ENCOURAGE him to install the "beta" version of IH4..
https://github.com/DivaVocals/zen_Image-Handler
-
Re: Image Handler 4 Support Thread
No, I did not know that.
Cool beans! I'll follow your link and poke around for a changelog, figure out benefits of the latest version. I imagine I'll find incentive to upgrade two sites I'm currently working on.
Thanks Diva!
-
Re: Image Handler 4 Support Thread
Quote:
Originally Posted by
Feznizzle
The following is a list *no one* will argue with (maybe?):
- XML Sitemap
- Provide a good user experience
- Valid code
- Fast site <--- IH is awesome for this!
- Excellent, well organized content, content, CONTENT!
Why'd you have to go an issue a challenge like that? Now I *have* to argue it! :) The only nit picky thing I would suggest is the order... content is far more important than a site map, from my understanding. I recall from various sources that a site map is more important for YOUR server and resources as it, perhaps, speeds up the traversal of the bot and (sometimes) sends it on its way before it "wastes time" looking for things that aren't there, but I don't think it actually helps with ranking. Google makes changes all the time. Attempts at "SEO" (if such a thing even exists any more) are certainly always trumped by having content the user actually wants to find. That's the point of Google... to get the RIGHT site to the searcher's eyes, not necessarily YOUR site.
-
Re: Image Handler 4 Support Thread
Ha!
Well... yep, content is indeed king. That was an intentionally unordered list, though I did let it flow from least to most important. The only point emphasized (with CAPS) was content. That tiny list (compared to the zillion factors that go into googles magical formula) was chosen specifically to be 100% noncontroversial. I ~only~ pointed to things that everyone knows for a fact are important because SE's have told us so.
:yes:
And I then intentionally did not offer any indication on how important I felt any particular factor was, except content (which, again, is undeniably the most important ingredient to SEO).
My list had two main parts:
- XML Sitemap - does not effect user experience, but is requested be SE's
- User Experience
I pointed to sitemap because you can use it to attach keywords to your bmz_cache image link.
Then I pointed out three things that undeniably effect User Experience and SEO. The first two (less important) specifically relate to why you should use IH4:
smart coding (effects user and is weighed by SE - https://validator.w3.org/)
reduced load times (effects user and is weighed by SE - https://developers.google.com/speed/).
And finally, I added the most important one (as you point out!): content.
Anywho, I'm dropping out of this discussion now. I've learned the hard way never to discuss SEO in these forums (I had to pay an attorney to help me craft this entire comment!). And SEO isn't really an IH4 support issue (what this thread is about), so we will both get spankings if we don't shut up in a hurry!
:D
I'm off to DL the beta version of IH4, peace!
-
Re: Image Handler 4 Support Thread
I was only making a weak argument because you dropped the proverbial gauntlet ;)
-
Re: Image Handler 4 Support Thread
Quote:
Originally Posted by
s_mack
I was only making a weak argument because you dropped the proverbial gauntlet ;)
Right on. Cool, cool!
-
Re: Image Handler 4 Support Thread
Hi
I haven't install IH4 yet, but it looks like the main purpose, it's for making and displaying different images sizes in a easy way.
I have a question or two:
I was wondering, if this module could be use to set responsive images, ie: using the srcset.
And, if it works with other products types, ie: bookx product type.
ups, I have a third question:
I use a lot, Easypopulate. The use of GD only works upon image upload, or if the images that are uploaded by ftp, also get different sizes ?
Thanks
-
Re: Image Handler 4 Support Thread
Quote:
Originally Posted by
mesnitu
Hi
I haven't install IH4 yet, but it looks like the main purpose, it's for making and displaying different images sizes in a easy way.
I have a question or two:
I was wondering, if this module could be use to set responsive images, ie: using the srcset.
And, if it works with other products types, ie: bookx product type.
ups, I have a third question:
I use a lot, Easypopulate. The use of GD only works upon image upload, or if the images that are uploaded by ftp, also get different sizes ?
Thanks
Anywhere that zen_image is used IH4 will applicably compress the image(s). It is not product type dependent and works on non-product images as well. Also, the work occurs when the image is first accessed, so if the image(s) are uploaded by ftp or other method, the first visitor to be presented the image(s) will experience a small lag while the compression and storage occurs, but every other visitor after that will experience the benefit of IH4. It is also possible (somewhere in thread) to "manually" force the access of the image(s) to create the new file(s) before the first visitor visits.
-
Re: Image Handler 4 Support Thread
Thanks for the reply
So I guess, one could use this images for responsive images and breakpoints. I'll install this module.
I've read somewhere along this thread, that the there is a beta version on git, that names the images for human readability (not sure if it's need it ), but I didn't find a beta release in git ?
Is there still a difference between the git and the zencart download ?
Thanks
-
Re: Image Handler 4 Support Thread
Quote:
Originally Posted by
mesnitu
Thanks for the reply
So I guess, one could use this images for responsive images and breakpoints. I'll install this module.
I've read somewhere along this thread, that the there is a beta version on git, that names the images for human readability (not sure if it's need it ), but I didn't find a beta release in git ?
Is there still a difference between the git and the zencart download ?
Thanks
The link posted in post 1438 (previous page) is the github version that is considered "Beta". That version has not been uploaded to the ZC site and yes is different.
-
Re: Image Handler 4 Support Thread
-
Re: Image Handler 4 Support Thread
does this IH work in 1.5.4?
-
Re: Image Handler 4 Support Thread
Quote:
Originally Posted by
bumba000
does this IH work in 1.5.4?
Yes, it does, where it is the version of IH4 currently available for download from the Plugins.
-
Re: Image Handler 4 Support Thread
Hi Lat,
Thanks. Yes I see https://www.zen-cart.com/downloads.php?do=file&id=1380, but it does say for 1.5.x and then mentions 1.5.1 and 1.5.2. Just making sure.
Thanks again, John
-
Re: Image Handler 4 Support Thread
I've got a site running Zen Cart v1.5.4 (quite modified), IH-4, PHP 5.6.16, GD version "bundled (2.1.0 compatible)", PHP memory limit 128MB
All's been working quite nicely ... then a new product was introduced with an image that's 1,280,074 bytes (the previous largest one was 889,894 bytes). Attempting to (a) display that product in a listing, (b) display that product's details and (c) view that product's images in Tools->Image Handler-4 all result in a partially-rendered page with no debug-log generated.
I remember seeing a report of such an issue (perhaps by @delia) within the past year, but can't locate that posting now. Any suggestions on the proper corrective-action (other than resizing the image down)?
-
Re: Image Handler 4 Support Thread
Quote:
Originally Posted by
lat9
I've got a site running Zen Cart v1.5.4 (quite modified), IH-4, PHP 5.6.16, GD version "bundled (2.1.0 compatible)", PHP memory limit 128MB
All's been working quite nicely ... then a new product was introduced with an image that's 1,280,074 bytes (the previous largest one was 889,894 bytes). Attempting to (a) display that product in a listing, (b) display that product's details and (c) view that product's images in Tools->Image Handler-4 all result in a partially-rendered page with no debug-log generated.
I remember seeing a report of such an issue (perhaps by @delia) within the past year, but can't locate that posting now. Any suggestions on the proper corrective-action (other than resizing the image down)?
Size of file wasn't the issue, resolution of the image is/was. Posting describing the above and appears to have some troubleshooting tips is in the following thread: https://www.zen-cart.com/showthread....ings&p=1269892
-
Re: Image Handler 4 Support Thread
Thanks for that, mc12345678! At least I've now got a starting point for figuring out how to tackle this programmatically.
-
Re: Image Handler 4 Support Thread
Quote:
Originally Posted by
mc12345678
Quote:
Originally Posted by
lat9
Thanks for that, mc12345678! At least I've now got a starting point for figuring out how to tackle this programmatically.
It IS possibly a filesize issue.. There are some documented GD limitations based on filesize.. That thread is a source of the info I found.. Notably:
Quote:
One other potential problem you may run into is to do with memory. It seems that GD holds all images in memory as bitmaps once they've been opened. This means that a 5MB image can actually consume more memory than a single PHP thread is allowed, resulting in a fatal error. I had this problem with some image uploads and had to reduce the maximum file size I allowed to get around the problem.
-
Re: Image Handler 4 Support Thread
Hello, I would like to format the hover function of this addon - particularly the position of the larger 'floating' image when displayed. I wondered if that was simple to acheive?
I have disabled the hover function for all pages except Product Info, so when hovering over the small additional images a large image is displayed. I would ideally like for this to be displayed over the main product image, rather than alongside the mouse pointer / cursor. Or perhaps limit the size and have in a fixed position rather than following the mouse.
Thanks for any help!
-
Re: Image Handler 4 Support Thread
Hi,
Hope this isn't a dumb question but... how often does BMZ cache rebuild?
I am adding some pages and would like to copy/paste category grids into source. For instance:
Quote:
<table align="center" border="0" cellpadding="1" cellspacing="15" width="100%">
<tbody>
<tr>
<td align="center" valign="top" width="32.5%">
<div class="categoryListBoxContents" style="width:100%;">
<a href="/Solder_Fluxes_Chemicals/Solder_Paste/Lead_Free"><img alt="Lead Free" height="150" src="bmz_cache/5/52004ec3453bf98d01fe0f7ae8026da9.image.150x150.JPG" title=" Lead Free " width="150" /><br />
Lead Free</a></div>
</td>
<td class="vDotLine" rowspan="4">
</td>
<td align="center" valign="top" width="32.5%">
<div class="categoryListBoxContents" style="width:100%;">
<a href="/Solder_Fluxes_Chemicals/Solder_Paste/No_Clean"><img alt="No Clean" height="150" src="bmz_cache/c/c0833ee64e8a63a882782f8b4cbd4879.image.150x150.jpg" title=" No Clean " width="150" /><br />
No Clean</a></div>
</td>
<td class="vDotLine" rowspan="4">
</td>
<td align="center" valign="top" width="32.5%">
<div class="categoryListBoxContents" style="width:100%;">
<a href="/Solder_Fluxes_Chemicals/Solder_Paste/Rosin_Based"><img alt="Rosin Based" height="150" src="bmz_cache/c/c8c89121bab52d61a3894e77b22a85cd.image.150x150.jpg" title=" Rosin Based " width="150" /><br />
Rosin Based</a></div>
</td>
</tr>
<tr>
<td class="hDotLine">
</td>
<td class="hDotLine">
</td>
<td class="hDotLine">
</td>
</tr>
<tr>
<td align="center" valign="top" width="32.5%">
<div class="categoryListBoxContents" style="width:100%;">
<a href="/Solder_Fluxes_Chemicals/Solder_Paste/Water_Soluble"><img alt="Water Soluble" height="150" src="bmz_cache/d/da0b60f64afaaa3dc29431c72df80304.image.150x150.jpg" title=" Water Soluble " width="150" /><br />
Water Soluble</a></div>
</td>
</tr>
</tbody>
</table>
I have about 30 such pages to build. If I can just copy/paste those grids, the work will go super fast, look great, and have the benefits of IH.
But if the cache updates automatically or changes for some reason, it will be extremely painful to clean up.
Am I safe to use the cached images?
-
Re: Image Handler 4 Support Thread
I'm having some issues with IH4 on my site. It was working perfectly but for some reason now, she's broken. One category still displays in admin>tools>image handler4 but if I click one any of the other categories it comes up with this only:
Image Handler4
No Image Handler information found.
Image Manager Admin Tools Preview About/Help
Uninstall Image Handler. (Please backup your site and database first)
Clear image cache
Scan for old IH 0.x and 1.x original images
No mods were done in between it working as it should to now.
My work mate had added some images that were far too large, so I deleted all of them with filezilla and re uploaded drastically reduced ones.
I've emptied the cache and bmz_cache
But none of the above seemed to have worked.
The website is fabbedart.com.au - has anyone come across this before?
-
Re: Image Handler 4 Support Thread
Quote:
Originally Posted by
Feznizzle
Hi,
Hope this isn't a dumb question but... how often does BMZ cache rebuild?
I am adding some pages and would like to copy/paste category grids into source. For instance:
I have about 30 such pages to build. If I can just copy/paste those grids, the work will go super fast, look great, and have the benefits of IH.
But if the cache updates automatically or changes for some reason, it will be extremely painful to clean up.
Am I safe to use the cached images?
I wouldn't.. My suggestion is to write this HTML using php to call the image for the specific product you are trying to display.. if you use Zen Cart image functions, then IH4 should use those to display the correct cached image..
I also suggest not using tables to build these grids.. Grids can be accomplished using a number of CSS methods..
-
Re: Image Handler 4 Support Thread
Hello, I now have the same problem as Crooked_Halo (above) and others - Image Handler was working fine, now when I go to the admin page it states:
"No Image Handler information found."
...which is pretty odd. I have added a few mods etc since last using IH admin but nothing that should have interfered.
I have checked through all the IH installation files and the only one that has been changed recently / is missing is this:
admin/includes/auto_loaders/config.image_handler.php
...which is missing, I assume this gets removed during install and isnt the problem?
So any idea what this could be? I guess a potential database issue?
Has anybody else managed to solve the "No Image Handler information found." problem?
This is very frustrating! Thanks for any help!
-
Re: Image Handler 4 Support Thread
Quote:
Originally Posted by
fobes77
Hello, I now have the same problem as Crooked_Halo (above) and others - Image Handler was working fine, now when I go to the admin page it states:
"No Image Handler information found."
...which is pretty odd. I have added a few mods etc since last using IH admin but nothing that should have interfered.
I have checked through all the IH installation files and the only one that has been changed recently / is missing is this:
admin/includes/auto_loaders/config.image_handler.php
...which is missing, I assume this gets removed during install and isnt the problem?
So any idea what this could be? I guess a potential database issue?
Has anybody else managed to solve the "No Image Handler information found." problem?
This is very frustrating! Thanks for any help!
See #1427 . This was fixed in the latest release of IH4 if remember correctly
-
Re: Image Handler 4 Support Thread
Quote:
Originally Posted by
Design75
See
#1427 . This was fixed in the latest release of IH4 if remember correctly
Code:
INSERT INTO configuration ('configuration_title', 'configuration_key', 'configuration_value', 'configuration_description', 'configuration_group_id', 'sort_order', 'last_modified', 'date_added', 'use_function', 'set_function') VALUES ('IH version', 'IH_VERSION', '4.3.2', 'IH Version is stored but not shown on configuration menus', '6', '10000', NULL, '0001-01-01 00:00:00.000000', NULL, NULL);
Cheers Design75. I tried inserting that SQL (above) through the Zen Cart admin and got a 'WARNING: An Error occurred, please refresh the page and try again.' message.
Checking my logs it says that there is a syntax error in the SQL code? I'm not great with SQL syntax, is there an obvious error?
Also I am using Image Handler v4.3.2 - it seems to be the latest version?
Thanks for your help!
-
Re: Image Handler 4 Support Thread
Just to add to the above -
I have entered the code into the database manually via phpMyadmin...
Code:
INSERT INTO `MYDATABASENAME`.`configuration` (`configuration_id`, `configuration_title`, `configuration_key`, `configuration_value`, `configuration_description`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`, `configuration_tab`) VALUES (NULL, 'IH version', 'IH version', '4.3.2', 'IH Version is stored but not shown on configuration menus', '6', '10000', NULL, '0001-01-01 00:00:00.000000', NULL, NULL, 'General');
Which seemed to work ok but I still get the "No Image Handler information found." message when going to the IH Zen admin page!
Very strange?! :huh:
-
Re: Image Handler 4 Support Thread
Quote:
Originally Posted by
fobes77
Just to add to the above -
I have entered the code into the database manually via phpMyadmin...
Code:
INSERT INTO `MYDATABASENAME`.`configuration` (`configuration_id`, `configuration_title`, `configuration_key`, `configuration_value`, `configuration_description`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`, `configuration_tab`) VALUES (NULL, 'IH version', 'IH version', '4.3.2', 'IH Version is stored but not shown on configuration menus', '6', '10000', NULL, '0001-01-01 00:00:00.000000', NULL, NULL, 'General');
Which seemed to work ok but I still get the
"No Image Handler information found." message when going to the IH Zen admin page!
Very strange?! :huh:
Log out/login, or clear cache/sessions?
-
Re: Image Handler 4 Support Thread
Thanks mc12345678, gave that a go but still the same result unfortunately!
-
Re: Image Handler 4 Support Thread
Going further into this error / IH code....
Code:
<div style="float:left; padding: 8px 5px;">
<h1><?php echo HEADING_TITLE; ?></h1>
<?php
if (defined('IH_VERSION')) {
echo IH_VERSION_VERSION . ': ' . IH_VERSION . '<br />';
} else {
echo IH_VERSION_NOT_FOUND . '<br />';
}
?>
</div>
The "No Image Handler information found." message is just a result of checking if the version number is in the database or not, BUT the real problem is the rest of the IH page - there are no options / it's not possible to add/edit photos like previously, from this screen or the product/category page in admin.
So why would the Version number not being in the database stop the whole editing / uploadingfrom working?!
-
Re: Image Handler 4 Support Thread
Quote:
Originally Posted by
fobes77
Code:
INSERT INTO configuration ('configuration_title', 'configuration_key', 'configuration_value', 'configuration_description', 'configuration_group_id', 'sort_order', 'last_modified', 'date_added', 'use_function', 'set_function') VALUES ('IH version', 'IH_VERSION', '4.3.2', 'IH Version is stored but not shown on configuration menus', '6', '10000', NULL, '0001-01-01 00:00:00.000000', NULL, NULL);
Cheers Design75. I tried inserting that SQL (above) through the Zen Cart admin and got a 'WARNING: An Error occurred, please refresh the page and try again.' message.
Checking my logs it says that there is a syntax error in the SQL code? I'm not great with SQL syntax, is there an obvious error?
Also I am using Image Handler v4.3.2 - it seems to be the latest version?
Thanks for your help!
Quote:
Originally Posted by
fobes77
Just to add to the above -
I have entered the code into the database manually via phpMyadmin...
Code:
INSERT INTO `MYDATABASENAME`.`configuration` (`configuration_id`, `configuration_title`, `configuration_key`, `configuration_value`, `configuration_description`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`, `configuration_tab`) VALUES (NULL, 'IH version', 'IH version', '4.3.2', 'IH Version is stored but not shown on configuration menus', '6', '10000', NULL, '0001-01-01 00:00:00.000000', NULL, NULL, 'General');
Which seemed to work ok but I still get the
"No Image Handler information found." message when going to the IH Zen admin page!
Very strange?! :huh:
Looks like your "successful" SQL was in error... The configuration_key that you have is incorrect as IH version instead of IH_VERSION. Try the below in the admin->tools->Install SQL Patches window.
Code:
INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES ('IH version', 'IH_VERSION', '4.3.2', 'IH Version is stored but not shown on configuration menus', '6', '10000', NULL, now(), NULL, NULL);
as for configuration_tab being a field? What version of ZC again? That's not a standard field in the configuration table.
-
Re: Image Handler 4 Support Thread
Quote:
Originally Posted by
fobes77
Going further into this error / IH code....
Code:
<div style="float:left; padding: 8px 5px;">
<h1><?php echo HEADING_TITLE; ?></h1>
<?php
if (defined('IH_VERSION')) {
echo IH_VERSION_VERSION . ': ' . IH_VERSION . '<br />';
} else {
echo IH_VERSION_NOT_FOUND . '<br />';
}
?>
</div>
The
"No Image Handler information found." message is just a result of checking if the version number is in the database or not, BUT the real problem is the rest of the IH page - there are no options / it's not possible to add/edit photos like previously, from this screen or the product/category page in admin.
So why would the Version number not being in the database stop the whole editing / uploadingfrom working?!
Because of the action to be taken later when one the current "page" is not assigned on the url and it appears that IH is no longer present or is in the process of being removed as identified on or about line 406:
Code:
$page = isset($_GET['page']) ? $_GET['page'] : ((!defined('IH_VERSION') || (IH_VERSION == 'REMOVED')) ? 'admin' : 'manager');
This condition sets $page = 'admin', and the code that follows expects it to be set as 'manager' or the value of the url parameter 'page' (Guess you could try adding &page=manager on the end of your admin url and see how things "go", but I have a feeling not so well.. :) )
-
Re: Image Handler 4 Support Thread
Thanks again mc12345678, that SQL Patch fixed it! :smile:
Phew!
(I think configuration_tab is new? I'm using v1.5.4 in this install.)
Cheers
-
Re: Image Handler 4 Support Thread
Quote:
Originally Posted by
fobes77
Thanks again mc12345678, that SQL Patch fixed it! :smile:
Phew!
(I think configuration_tab is new? I'm using v1.5.4 in this install.)
Cheers
Still have some "errant" assignment in the database. Won't directly cause a problem but also may cause confusion in the future if it remains. Recommend finding that one (seeing you seem to be able to navigate myphpadmin and should be easy to find) and removing that assignment described above as successful.
As to the configuration_tab, that would be because of some other install at some point in the life of the database as it is not a default column in ZC 1.5.4. (Was looking at the install sql for a vanilla copy of ZC when above was provided.)
-
Re: Image Handler 4 Support Thread
Hi guys
having trouble with my ih4 install , install goes great but the popup image on the product pages dont resize. It is easier if i show what i mean . Tried in chrome and IE with no change. running 1.5.4 . thanks in advance .Paul
http://www.raremanuals.com/zencart/i...roducts_id=655
-
Re: Image Handler 4 Support Thread
Thank you!! This SQL patch worked for me also. You're a legend.
-
Re: Image Handler 4 Support Thread
Zen Cart 1.5.4
Image Handler 4
NO other add-ons
Hosting/server information (PHP versions 5.4.43 (Zend: 2.4.0), mySQL versions 5.5.45-cll-lve, hosting provider godaddy etc)
GD 2.1.0 Compatible - says bundled; Free Type Version 2.3.11; ImageMagick 6.5.4-7 (Neither of these Fual Slimbox or Zen Lightbox)
I downloaded the latest version as of today 2/11/16 of IH
Followed the instructions - renamed the folder.... than uploaded it to zencart per instructions (twice- overwrote the files). I get NOTHING.... no IH files under "Images", no IH in Tools etc. It is like I did nothing....
-
Re: Image Handler 4 (for v1.5.x) Support Thread
Could PHP Version 5.4.43 be the cause for this not working? ON the description page it says PHP 5.3
thank you
-
Re: Image Handler 4 Support Thread
I have had image handler 4 installed for a while and am very happy with it. I recently set up SSL on the site and am now running into problems. I get the message that I have mixed content (some insecure content). When I look at the code, the forms are using action="http://www.boundlessmotion.com/something/something/image_handler.php instead of http://
How to fix?
-
Re: Image Handler 4 Support Thread
Quote:
Originally Posted by
st.bobo
I have had image handler 4 installed for a while and am very happy with it. I recently set up SSL on the site and am now running into problems. I get the message that I have mixed content (some insecure content). When I look at the code, the forms are using action="http://www.boundlessmotion.com/something/something/image_handler.php instead of http://
How to fix?
Last line is supposed to read:
When I look at the code, the forms are using action="http://www.boundlessmotion.com/something/something/image_handler.php instead of https://
-
Re: Image Handler 4 Support Thread
Found the solution: In admin/includes/configure.php, I noticed the instructions near the top of the file: * WE RECOMMEND THAT YOU USE SSL PROTECTION FOR YOUR ENTIRE ADMIN: * To do that, make sure you use a "https:" URL for BOTH the HTTP_SERVER and HTTPS_SERVER entries:
I changed the HTTP_SERVER and HTTP_CATALOG_SERVER from the http entry to https (the HTTPS_SERVER was already showing https). A quick test, and it appears that this has fixed the problem.
-
Re: Image Handler 4 Support Thread
Hi
I've installed this mod from git. But I have a doubt, probably a stupid one :
I'm not sure yet what I'll use to social sharing, etc... but, when sharing to social networks which image does it pick ?
The original , or the large.... or this as nothing to do with nothing ?
Thanks
Ups: just remember another one.
The files and folders _IH , they should remain even after the installation ?
ie: if I'm to edit one file, should I edit the _IH or the actuall file
-
Re: Image Handler 4 Support Thread
Has anyone installed IH on a vanilla ZC 1.5.5 installation? If so, any issues please??
-
Re: Image Handler 4 Support Thread
Quote:
Originally Posted by
frank18
Has anyone installed IH on a vanilla ZC 1.5.5 installation? If so, any issues please??
The Github repo is updated for ZC 1.5.5.
-
Re: Image Handler 4 Support Thread
Quote:
Originally Posted by
DivaVocals
The Github repo is updated for ZC 1.5.5.
Thank you!
-
Re: Image Handler 4 Support Thread
Quote:
Originally Posted by
DivaVocals
The Github repo is updated for ZC 1.5.5.
Since I want to use IH with a fresh install of ZC 1.5.5a, which version of IH should I use? I have not used IH before.
I noticed on the Image Handler 4 for v1.5.x Plugin page, it says, "Zen Cart Versions v1.5.0, v1.5.1"
I'm guessing this is the link to the updated for ZC 1.5.5 version at Github https://github.com/DivaVocals/zen_Image-Handler you are referring to.
Should I use the version on the ZC Plugin page or should I use the version at Github?
Thanks so much!
-
Re: Image Handler 4 Support Thread
Quote:
Originally Posted by
Zean
Since I want to use IH with a fresh install of ZC 1.5.5a, which version of IH should I use? I have not used IH before.
I noticed on the
Image Handler 4 for v1.5.x Plugin page, it says, "Zen Cart Versions v1.5.0, v1.5.1"
I'm guessing this is the link to the updated for ZC 1.5.5 version at Github https://github.com/DivaVocals/zen_Image-Handler you are referring to.
Should I use the version on the ZC Plugin page or should I use the version at Github?
Thanks so much!
Based on the recent posts, the github version would be the one to use even with ZC 1.5.5.a.
-
Re: Image Handler 4 Support Thread
Quote:
Originally Posted by
mc12345678
Based on the recent posts, the github version would be the one to use even with ZC 1.5.5.a.
Yes, that is what I am inclined to think as well. However, the README.md in the Github version says . . .
## This is a development version of Image Handler v4.3.4 only
#### If you are looking to install the latest version from zencart please visit [this page](http://www.zen-cart.com/downloads.php?do=file&id=1380)
So, I'm wondering what that implies, if anything, concerning which version I should use for ZC 1.5.5?
-
Re: Image Handler 4 Support Thread
Quote:
Originally Posted by
Zean
Yes, that is what I am inclined to think as well. However, the README.md in the Github version says . . .
## This is a development version of Image Handler v4.3.4 only
#### If you are looking to install the latest version from zencart please visit [this page](
http://www.zen-cart.com/downloads.php?do=file&id=1380)
So, I'm wondering what that implies, if anything, concerning which version I should use for ZC 1.5.5?
So, generally speaking "storage" locations such as github are used to support development. IH4 for more recent versions hasn't been packaged up by anyone (and truly anyone can do this) for distribution on the ZC site. If you were to wander back in this thread, I think there are statements about how the currently available ZC version has issues working with more recent versions of ZC. Further, understand that just about everything you see here has been provided/maintained by someone that is willing and able to sustain it. What that means in part is that sometimes instructions/links/etc... may not be fully up-to-date. That said, a live person (the recent long-term maintainer of this plugin) has stated that the github version is good for zc 1.5.5.
Another thing about it all, you could always test things out on your development server/location. You have one of those don't you? Somewhere you can test and try things before applying to your live site?
-
Re: Image Handler 4 Support Thread
I'm using the git one, and so far so good.
-
1 Attachment(s)
Re: Image Handler 4 Support Thread
zc 1.5.5a IH4 4.3.2, now github update for 1.5.5
When I updated my live site to zc 1.5.5a I lost the images that appear in admin/tools/IH4(4.3.2) - the small imgs that appear when you add extra images to your product. I updated my wamp test site first and did not encounter this problem. I uninstalled IH4 from test site, and installed IH4.4 most recent github file set. No problems. Did same with live site and the no small img on admin page persists.
The images all show properly in the store, and on the admin page the names of the files added show, just not the actual image.
I confirmed that the small image exists in the bmz cache folder. And looking at the source code for the IH admin page in live site, compared to test site - everything is identical except the img file names and folders that are specific to each. I was using the .htaccess file that was in the 4.3.2 file set, and now the updated version.
Could this be a permissions issue? And/or any idea which folders I would look at. Or does this sound like some other issue?
Attachment 16322
-
Re: Image Handler 4 Support Thread
If you view the source of the page, what does the path look like for your image(s)? (remember to obscure your admin directory if it is included.)
Also, may want to post your admin/includes/configure.php obscuring your dB credentials and admin directory if present.
-
Re: Image Handler 4 Support Thread
Quote:
Originally Posted by
mc12345678
If you view the source of the page, what does the path look like for your image(s)? (remember to obscure your admin directory if it is included.)
Code:
<!-- Start Photo Display -->
<h4>
Product: #287 Aloe Vera 27 S <br />Model: SN102709A </h4>
<table border="0" width="100%" cellspacing="0" cellpadding="2"><tr><td valign="top">
<table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr class="dataTableHeadingRow">
<td class="dataTableHeadingContent">Image name</td>
<td class="dataTableHeadingContent">File Type</td> <td class="dataTableHeadingContent" align="center">Default size</td>
<td class="dataTableHeadingContent" align="center">Medium size</td>
<td class="dataTableHeadingContent" align="center">Large size</td>
<td class="dataTableHeadingContent" align="right">Action </td>
</tr>
<tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href='https://serverxx.camelot-hosting.com/xxxxxxx/xxxxxxx/image_handler.php?products_filter=287&imgName=MN102709A&action=layout_info'">
<td class="dataTableContent">MN102709A</td>
<td class="dataTableContent">.JPG</td>
<td class="dataTableContent" align="center" valign="top">
<img src="/bmz_cache/m/m-mn102709ajpgimage200x191jpg.image.50x47.JPG" border="0" alt="Aloe Vera 27 S" title=" Aloe Vera 27 S " width="50" height="47"><br /> 200x191<br /><strong>7.65Kb</strong> </td>
<td class="dataTableContent" align="center" valign="top">
<img src="/bmz_cache/m/m-mn102709ajpgimage300x287jpg.image.50x47.JPG" border="0" alt="Aloe Vera 27 S" title=" Aloe Vera 27 S " width="50" height="47"><br />300x287<br /><strong>14.08Kb</strong><br /> </td>
<td class="dataTableContent" align="center" valign="top">
<img src="/bmz_cache/m/m-mn102709ajpgimage574x550jpg.image.50x47.JPG" border="0" alt="Aloe Vera 27 S" title=" Aloe Vera 27 S " width="50" height="47"><br />574x550<br /><strong>41.84Kb</strong><br /> </td>
<td class="dataTableContent" align="right"><a href="https://serverxx.camelot-hosting.com/xxxxxxx/xxxxxxxxx/image_handler.php?products_filter=287&imgName=MN102709A&action=layout_info"><img src="images/icon_info.gif" border="0" alt="Info" title=" Info "></a> </td>
</tr>
</table></td><!-- END Photo list table -->
Quote:
Also, may want to post your admin/includes/configure.php obscuring your dB credentials and admin directory if present.
Code:
/**
* Enter the domain for your Admin URL. If you have SSL, enter the correct https address in the HTTP_SERVER setting, instead of just an http address.
*/
define('HTTP_SERVER', 'https://serverxx.camelot-hosting.com/xxxxxxx');
/**
* Note about HTTPS_SERVER:
* There is no longer an HTTPS_SERVER setting for the Admin. Instead, put your SSL URL in the HTTP_SERVER setting above.
*/
/**
* Note about DIR_WS_ADMIN
* The DIR_WS_ADMIN value is now auto-detected.
* In the rare case where it cannot be detected properly, you can add your own DIR_WS_ADMIN definition below.
*/
/**
* Enter the domain for your storefront URL.
* Enter a separate SSL URL in HTTPS_CATALOG_SERVER if your store supports SSL.
*/
define('HTTP_CATALOG_SERVER', 'https://serverxx.camelot-hosting.com/xxxxxxxxx');
define('HTTPS_CATALOG_SERVER', 'https://serverxx.camelot-hosting.com/xxxxxxxx');
/**
* Do you use SSL for your customers login/checkout on the storefront? If so, enter 'true'. Else 'false'.
*/
define('ENABLE_SSL_CATALOG', 'true');
/**
* These DIR_WS_xxxx values refer to the name of any subdirectory in which your store is located.
* These values get added to the HTTP_CATALOG_SERVER and HTTPS_CATALOG_SERVER values to form the complete URLs to your storefront.
* They should always start and end with a slash ... ie: '/' or '/foldername/'
*/
define('DIR_WS_CATALOG', '/');
define('DIR_WS_HTTPS_CATALOG', '/');
/**
* This is the complete physical path to your store's files. eg: /var/www/vhost/accountname/public_html/store/
* Should have a closing / on it.
*/
define('DIR_FS_CATALOG', '/home/xxxxxxxxxx/public_html/');
/**
* NOTE about DIR_FS_ADMIN
* The value for DIR_FS_ADMIN is now auto-detected.
* In the very rare case where there is a need to override the autodetection, simply add your own definition for it below.
*/
/**
* The following settings define your database connection.
* These must be the SAME as you're using in your non-admin copy of configure.php
*/
define('DB_TYPE', 'mysql'); // always 'mysql'
define('DB_PREFIX', 'xxxx'); // prefix for database table names -- preferred to be left empty
define('DB_CHARSET', 'utf8'); // 'utf8' or 'latin1' are most common
define('DB_SERVER', 'localhost'); // address of your db server
define('DB_SERVER_USERNAME', 'xxxxxxxxx');
define('DB_SERVER_PASSWORD', 'xxxxxxxxx');
define('DB_DATABASE', 'xxxxxxxxxx');
/**
* This is an advanced setting to determine whether you want to cache SQL queries.
* Options are 'none' (which is the default) and 'file' and 'database'.
*/
define('SQL_CACHE_METHOD', 'none');
/**
* Reserved for future use
*/
define('SESSION_STORAGE', 'reserved for future use');
/**
* Advanced use only:
* The following are OPTIONAL, and should NOT be set unless you intend to change their normal use. Most sites will leave these untouched.
* To use them, uncomment AND add a proper defined value to them.
*/
// define('DIR_FS_SQL_CACHE' ...
// define('DIR_FS_DOWNLOAD' ...
// define('DIR_FS_LOGS' ...
// End Of File
My bmz_cache and images folders are permission set as in IH4 faq on this forum.
MY test site, which works properly, is WAMP, not ssl; Live site is SSL. I have a mod - Admin Photos (twitch) installed on test and live. There is a merge with IH4 admin/incl/mods/category_prod_listing. The merges were clearly indicated and they place nice on test site. Only other merge involved is additional images as per the IH4 readme for using with Colorbox.
-
Re: Image Handler 4 Support Thread
On your "test" server is it also setup to have a subdirectory within the HTTP_SERVER and secure version of the same?
I'm thinking that the code in the image_handler.php file which references using DIR_WS_CATALOG where in your case is setup as / but is acting like /xxxxxxxx/ is possibly causing this issue.
Might suggest modifying line say line 752 of image_handler.php for you from:
Code:
echo zen_image(DIR_WS_CATALOG . $preview_image, addslashes($pInfo->products_name), $width, $height) . '<br />';
To:
Code:
echo zen_image('/xxxxxx' . DIR_WS_CATALOG . $preview_image, addslashes($pInfo->products_name), $width, $height) . '<br />';
Where '/xxxxxx' is the "hidden" portion of your uri in the admin/includes/configure.php.
Might have a better solution later if that is successful. Preferably one that doesn't require any further editing.
-
Re: Image Handler 4 Support Thread
So I posted that knowing I had more to write. Haven't had a chance to see the effect, but there are a couple of things at play here. One is that it seems generally speaking and it's been a while since I was told this but there is/was a suggestion that for both secure and not the DIR_WS_ portion of the catalog ought to be the same. As well base ZC is written to handle those two being different. IH4 appears to use the fact that they match whatever follows the base domain name. At the same time ZC admin hasn't used a base html tag so that's a factor. Then any image to be displayed could also use the full uri applying the applicable server constant, but the "correct" one has to be evaluated so that one doesn't get mixed content errors.
-
Re: Image Handler 4 Support Thread
Quote:
Originally Posted by
mc12345678
On your "test" server is it also setup to have a subdirectory within the HTTP_SERVER and secure version of the same?
I'm thinking that the code in the image_handler.php file which references using DIR_WS_CATALOG where in your case is setup as / but is acting like /xxxxxxxx/ is possibly causing this issue.
Might suggest modifying line say line 752 of image_handler.php for you from:
Code:
echo zen_image(DIR_WS_CATALOG . $preview_image, addslashes($pInfo->products_name), $width, $height) . '<br />';
To:
Code:
echo zen_image('/xxxxxx' . DIR_WS_CATALOG . $preview_image, addslashes($pInfo->products_name), $width, $height) . '<br />';
Where '/xxxxxx' is the "hidden" portion of your uri in the admin/includes/configure.php.
Might have a better solution later if that is successful. Preferably one that doesn't require any further editing.
On test site HTTP_SERVER is http url and HTTPS _SERVER is https.
Your suggested code change works - it displayed the thumbnail for the large image. I copied your suggestion into lines #727 and #737 which then produced the small and medium thumbnails as well. (Yay! Thank you!)
The strangeness in my HTTP and HTTP_SERVERs was to do with comodo SSL certificate on a shared hosting site. I previously used my store url in the config files and I kept getting a 'sort of' secure indication message- green but with lock icon unlocked, and I was unable to get the comodo seal displayed on my site. When I chased it down it turns out that with shared hosting I have to use the /host's specific server/my user name/ in place of /my store url in the config files.
I had done all that before doing the 1.5.5a andIH4 update and had entered new products in the store but hadn't added any new additional images via admin/tools/IH4
Thank you so much for your assistance.
-
Re: Image Handler 4 Support Thread
So have you tried though then putting your "username" at least in the admin in each of the DIR_WS_CATALOG defines such that instead of '/' they are '/xxx/'? (again kind of goes back to "which" is correct, either same DIR_WS_ paths for both HTTP_ and HTTPS_ or is there some other "fix". :) well, glad you got it working. :) good luck!
-
Re: Image Handler 4 Support Thread
Quote:
Originally Posted by
mc12345678
So have you tried though then putting your "username" at least in the admin in each of the DIR_WS_CATALOG defines such that instead of '/' they are '/xxx/'? (again kind of goes back to "which" is correct, either same DIR_WS_ paths for both HTTP_ and HTTPS_ or is there some other "fix". :) well, glad you got it working. :) good luck!
I just tried unsuccessfully - I replaced the original code in image_handler.php and changed the DIR_WS paths to '/username/' I also tried '/~username/' as that's what is in the HTTP and HTTPS_SERVER
The DIR_FS_CATALOG defines is '/home/username/public_html/' and in that case the username isn't preceded by a ~ Is that worth a try as DIR_WS path or is that an unrelated thing.
Not sure if this issue is strictly a 'people who use comodo ssl on a shared host who also use IH4' or if this might apply to other situations as well.
-
Re: Image Handler 4 Support Thread
Quote:
Originally Posted by
soxophoneplayer
...Not sure if this issue is strictly a 'people who use comodo ssl on a shared host who also use IH4' or if this might apply to other situations as well.
Oops. Just discovered that my main menu dropdowns and my featured/special main page tabs have been disabled and give a 404. I uninstalled IH4.4 github version and that issue resolved.
I reinstalled IH4.3.2 that I previously had been using. Menus etc ok. but missing images in admin/tools/IH manager returned. (Making me think this is zc 1.5.5a interaction related as I didn't see this problem in zc1.5.5 with IH4.3.2)
The hack from post #1492 solved the SSL shared hosting file issue as it has in IH4.4
-
Re: Image Handler 4 Support Thread
Quote:
Originally Posted by
soxophoneplayer
I just tried unsuccessfully - I replaced the original code in image_handler.php and changed the DIR_WS paths to '/username/' I also tried '/~username/' as that's what is in the HTTP and HTTPS_SERVER
The DIR_FS_CATALOG defines is '/home/username/public_html/' and in that case the username isn't preceded by a ~ Is that worth a try as DIR_WS path or is that an unrelated thing.
Not sure if this issue is strictly a 'people who use comodo ssl on a shared host who also use IH4' or if this might apply to other situations as well.
Day late, dollar short, but the expectation would have been that the DIR_WS_CATALOG and secure version of same would have had your ~username in it and your HTTP_SERVER (and secure) would have had that removed leaving just the host name with no ending slash.
It's not specifically a comodo shared certificate issue. It's how your host has chosen to "share" their certificate. Some keep with just a hostname but subdomain with no suffix "folder". Anyways, thinking that the right answer to the above issue is to simply use the full url to the image(s) with the appropriately identified https: or http: based on the current page's "state".
-
Re: Image Handler 4 Support Thread
Quote:
Originally Posted by
mc12345678
Day late, dollar short...
I aspire to, someday, be only a dollar and only a day short ;o)
-
Re: Image Handler 4 Support Thread
*SOMEWHERE*... Somewhere (and I obviously can't find it after much time searching) I read that you should install Image Handler after you install your template. However, I am in the process of giving my website a complete facelift. I may decide change templates as I play around with things.
Are there many affecting template files? Can I simply copy them to new template folder when/if I change templates? I'm assuming those IH_INSTALL folders denote what will become template folders after the installer has its way, but I would like verification before I plow ahead.
Thanks for your time!
-
Re: Image Handler 4 Support Thread
Quote:
Originally Posted by
Three Sisters
*SOMEWHERE*... Somewhere (and I obviously can't find it after much time searching) I read that you should install Image Handler after you install your template. However, I am in the process of giving my website a complete facelift. I may decide change templates as I play around with things.
Are there many affecting template files? Can I simply copy them to new template folder when/if I change templates? I'm assuming those IH_INSTALL folders denote what will become template folders after the installer has its way, but I would like verification before I plow ahead.
Thanks for your time!
If you take a breath and read the installation instructions you will basically see what it is you are searching. The instructions advise that when working with a template to merge the modifications made to support IH4 with those of the equivalent template file. Thus to do so means that the template must be there to which to merge the files.
Further, it is generally recommended to install the desired template as the "first" thing after installing ZC, so that such template modifying code and changes can be placed in sensible locations and not haphazardly operate. Blindly copying template files from one template directory to another may produce undesirable results.
Yes the IH_INSTALL folder in each applicable location relates to the override/modification that the installer is to address. I haven't dug into the 1.5.5 version of the installer, but at one point if the associated template override directory didn't exist then the install would not complete, so that is something with which to possibly have to deal.
-
Re: Image Handler 4 Support Thread
Quote:
Originally Posted by
mc12345678
If you take a breath and read the installation instructions you will basically see what it is you are searching....
Further, it is generally recommended to install the desired template as the "first" thing after installing ZC, so that such template modifying code and changes can be placed in sensible locations and not haphazardly operate. Blindly copying template files from one template directory to another may produce undesirable results.
Thank you, very much, for your reply. Sincerely, I DID read and re-read the instructions. I had successfully installed a template and Image Handler. But then, I decided to scrap the template. Since I wasn't very far along, I decided to start all over again because I didn't know what direction to take the template issue in relationship to IH. I just needed the reasoning behind what I had remembered reading.
Actually, I think your second paragraph is the real crux of the issue at hand. Thanks for setting my thought process in order. :)
-
Re: Image Handler 4 Support Thread
hi,
i will admit i am a little late to the image handler party. that said, since i have installed this add-on, i think it's awesome.
now to a small problem i have encountered and i am curious if any one else has this same issue. i am running v155 and IH v4.0 for v1.5.x. and frankly i'm not sure if its related to the image handler and the BMZ cache or part of the base ZC code, but i thought i would present it here. here is the situation:
- product 1 has an image associated with it called image1.jpg
- i now want to change the image for product 1. i have a new image file with the same name of image1.jpg
- i edit the product and select my new image file with the same name. it successfully gets uploaded to my site.
- image1_MED.jpg and image1_LRG.jpg do NOT get deleted. so now those image files remain for the old image.
i have now modified the code in /admin/includes/modules/product/update_product.php to delete those files.
Code:
if ($new_image == 'true') {
$src = DIR_FS_CATALOG . DIR_WS_IMAGES . zen_get_products_image((int)$products_id);
$filename_small = $src;
preg_match("/.*\/(.*)\.(\w*)$/", $src, $fname);
$products_image = zen_get_products_image((int)$products_id);
$products_image_extention = substr($products_image, strrpos($products_image, '.'));
$products_image_base = preg_replace('*' . $products_image_extention . '*', '', $products_image);
$filename_medium = DIR_FS_CATALOG . DIR_WS_IMAGES . 'medium/' . $products_image_base . IMAGE_SUFFIX_MEDIUM . '.' . $fname[2];
$filename_large = DIR_FS_CATALOG . DIR_WS_IMAGES . 'large/' . $products_image_base . IMAGE_SUFFIX_LARGE . '.' . $fname[2];
if (file_exists($filename_large)) {
unlink($filename_large);
}
if (file_exists($filename_medium)) {
unlink($filename_medium);
}
}
and frankly, i'm curious if someone else has experienced this problem; or if i did not install this plug-in correctly; or if by deleting those old files at this time, i am bypassing any of the benefits associated with this plugin.
thanks in advance!