Image Handler 5, v5.0.0, has been submitted to the Zen Cart plugins for review. When approved, it can be downloaded from https://www.zen-cart.com/downloads.php?do=file&id=2169. I'll update this thread when the plugin's download is available.
Printable View
Image Handler 5, v5.0.0, has been submitted to the Zen Cart plugins for review. When approved, it can be downloaded from https://www.zen-cart.com/downloads.php?do=file&id=2169. I'll update this thread when the plugin's download is available.
Update from IH4 is not clear in the instructions. We run the IH4 uninstall, then we upload IH5 files, refresh admin. That seems to only get us two of the settings in the configuration>images. To fully install I need to go into the database and remove the version number row and refresh the admin and then we get a full install. Seems that the IH4 uninstall doesn't remove the version number, so IH5 install only runs and upgrade... Are we supposed to not run the IH4 uninstall first?
Love this Plug in. Might I be so bold as to suggest a change to how you Determin the folder under bmz_cache that you put the item into. As you suggest I place my picture into subfolders of the main folder for my products. Unfortuatly I name my items starting with the 2 digit year and as I have many individual items using the current method if I donot use the "Hashed" method they all go into the same folder. I beleive that the following would place them into the same folder under bmz_cache as they are in my images section. The sugested change needs to be made to include\functions\extra_functions\functions_bmz_io.php
I will understand if you do not want to make the change. In the mean time I will continue to used hashed to keep the images under control.PHP Code:
function getCacheName($data, $ext='')
{
if (IH_CACHE_NAMING == 'Hashed') {
$md5 = (IH_CACHE_NAMING == 'Hashed') ? md5($data) : $data;
$file = $GLOBALS['bmzConf']['cachedir'] . '/' . $md5{0} . '/' . $md5 . $ext;
}
else {
$md5 = $data;
$filepos = strpos($md5,"-");
$filepos = ($filepos===false) ? 1 : $filepos ;
$file = $GLOBALS['bmzConf']['cachedir'] . '/' .substr($md5,0,$filepos). '/' . $md5 . $ext;
}
io_makeFileDir($file);
return $file;
}
@brittainmark, I've noted your request in IH5's GitHub repository: https://github.com/DivaVocals/zen_Im...dler/issues/72 ... otherwise, I'll forget!
I'm in process up updating from zc 1.5.5e to 1.5.5f. Using Responsive Sheffield Blue 2.0. In 1.5.5e I was using older Colorbox that was part of RSB template, and IH4. All worked. As part of updating to 1.5.5f I want to update those two mods. I stripped out both completely and removed any residual tables in the db the were left behind after uninstall.
I then added Zen Colorbox 2, most recent download. Now I'm in process of adding IH5. One snag I've hit - in includes/modules/Your Template/additional_images there is a piece if Colorbox modification to the file at the same location that IH5 modifies the same file. I note that the file included in the Colorbox 2 set has IH4 modifications in it as well so I presume I would merge in favour of the IH5 file, but don't know where (of if) to place the bit of Colorbox 2 code.
First sample below is from the Colorbox file and the lower is from the IH5 file.
Thanks for any help.
Code:// Link Preparation:
// bof Zen Colorbox 2012-04-30 niestudio
if(function_exists('zen_colorbox')){
include 'zen_colorbox.php';
} else {
$script_link = '<script type="text/javascript"><!--' . "\n" . 'document.write(\'' . ($flag_display_large ? '<a href="javascript:popupWindow(\\\'' . str_replace($products_image_large, urlencode(addslashes($products_image_large)), $large_link) . '\\\')">' . $thumb_slashes . '<br />' . TEXT_CLICK_TO_ENLARGE . '</a>' : $thumb_slashes) . '\');' . "\n" . '//--></script>';
}
// eof Zen Colorbox 2012-04-30 niestudio
Code:// Link Preparation:
//-bof-image_handler-lat9 *** 4 of 4 ***
// -----
// This notifier gives notice that an additional image's script link is requested. A monitoring observer sets
// the $p2 value to boolean true if it has provided an alternate form of that link; otherwise, the base code will
// create that value.
//
// $p1 ... (r/o) ... An associative array, containing the 'flag_display_large', 'products_name', 'products_image_large' and 'thumb_slashes' values.
// $p2 ... (r/w) ... A reference to the $script_link value, set here to boolean false; if an observer modifies that value, the
// this module's processing is bypassed.
//
$script_link = false;
$zco_notifier->notify(
'NOTIFY_MODULES_ADDITIONAL_IMAGES_SCRIPT_LINK',
array(
'flag_display_large' => $flag_display_large,
'products_name' => $products_name,
'products_image_large' => $products_image_large,
'thumb_slashes' => $thumb_slashes
),
$script_link
);
if ($script_link === false) {
$script_link = '<script type="text/javascript"><!--' . "\n" . 'document.write(\'' . ($flag_display_large ? '<a href="javascript:popupWindow(\\\'' . str_replace($products_image_large, urlencode(addslashes($products_image_large)), $large_link) . '\\\')">' . $thumb_slashes . '<br />' . TEXT_CLICK_TO_ENLARGE . '</a>' : $thumb_slashes) . '\');' . "\n" . '//--></script>';
}
//-eof-image_handler-lat9 *** 4 of 4 ***