Re: Image Handler 5 (for v1.5.5) Support Thread
Quote:
Originally Posted by
mc12345678
Umm... Do you need just the filename or do you need the html <img> tag that provides the image? (or even from that to pull the filename?) If you use the zen_image function to return the generated value, then you will receive the html tag that should contain all that is necessary to display the image. If it is the directory path only needed then the string can be parsed from the content (src parameter), if it is an image tag, then it is the entire returned value from the function.
I guess one could achieve this in the front store, and the images paths would be easy to get. And maybe I'll do that, still testing. I thought that using a json file, the searches would be faster. It's all very beautiful when testing with 50 books. But with the inteire catalog, that's when man's get separated from boys. A lot of jquery knowledge is needed, etc, etc.... And I'm a boy :)
Anyway, I leave my suggestion open, to use IH as a tool that could be use by other modules, etc.
Thanks
Re: Image Handler 5 (for v1.5.5) Support Thread
New install of ZenCart 1.5.5f - installed IH 4.3.2.
Decided to change to IH 5.5.0.
Uninstalled 4.3.2 and installed 5.5.0.
No 'Turn on IH' in Admin>Configuration>Images - just a reference to version number..
As per post #23 above, deleted the IH version row in the database..
Now have 'IH resize images' (set to 'yes') and the expected IH options..
But:
No IH icons appear in Admin Category/Product area (next to 'copy', 'move'..) and IH functionality only possible from Admin>Tools>Image Handler5
Is this a 'feature' or is there something I missed?
Re: Image Handler 5 (for v1.5.5) Support Thread
Quote:
Originally Posted by
MrSensible
New install of ZenCart 1.5.5f - installed IH 4.3.2.
Decided to change to IH 5.5.0.
Uninstalled 4.3.2 and installed 5.5.0.
No 'Turn on IH' in Admin>Configuration>Images - just a reference to version number..
As per post #23 above, deleted the IH version row in the database..
Now have 'IH resize images' (set to 'yes') and the expected IH options..
But:
No IH icons appear in Admin Category/Product area (next to 'copy', 'move'..) and IH functionality only possible from Admin>Tools>Image Handler5
Is this a 'feature' or is there something I missed?
I've got that re-install issue corrected for the next version of IH5. If you're not seeing that image-handler icon on the categories/products listing, then something is "wrong".
Zen Cart 1.5.5f includes in its base "detection" of image-handler and IH5 expects that base operation to be present. Since you installed/uninstalled IH 4.3.2, it's possible that that uninstall script restored an older version of /admin/includes/modules/category_product_listing.php.
Re: Image Handler 5 (for v1.5.5) Support Thread
For some reason my template not showing additional images; here is my template code:
PHP Code:
require(DIR_WS_MODULES . zen_get_module_directory('additional_images.php'));
?>
<?php
if ($flag_show_product_info_additional_images != 0 && $num_images > 0) {
/*if($prodinfo_image_effects==2){
unset($list_box_contents[0][0]);
$list_box_contents[0] = array_values($list_box_contents[0]);
}*/
for($row=0;$row<sizeof($list_box_contents);$row++)
{
$params = "";
//if (isset($list_box_contents[$row]['params'])) $params .= ' ' . $list_box_contents[$row]['params'];
for($col=0;$col<sizeof($list_box_contents[$row]);$col++)
{
$r_params = "";
if (isset($list_box_contents[$row][$col]['params'])) $r_params .= ' ' . (string)$list_box_contents[$row][$col]['params'];
if (isset($list_box_contents[$row][$col]['text']['thumb']))
{
echo '<li' . $r_params . '>' . $list_box_contents[$row][$col]['text']['thumb'] . '</li>';
}
}
}
}
?>
Re: Image Handler 5 (for v1.5.5) Support Thread
I traced it down to this in includes/modules/additional_images.php this is the code that seems to be the problem:
PHP Code:
$num_images = count($images_array);
$list_box_contents = array();
$title = '';
if ($num_images > 0) {
If I leave it like this:
PHP Code:
$temp_num_images=sizeof($images_array);
$num_images = sizeof($images_array);
$list_box_contents = '';
$title = '';
if ($num_images) {
it displays the additional images any clue why>?
Re: Image Handler 5 (for v1.5.5) Support Thread
I figured it out I had one line that had sizeof($images_array)
Re: Image Handler 5 (for v1.5.5) Support Thread
I had the same issue as per post #23 and #42 above. Had to delete the IH Version number from the database and that refreshed the install.
Warning for anyone else watch out for this as that got me too:
Quote:
Since you installed/uninstalled IH 4.3.2, it's possible that that uninstall script restored an older version of /admin/includes/modules/category_product_listing.php
Now on to the problem I can't solve. All is OK when I click on a category and it lists the products. IH pop-up works there. If I click to view a product though I get a white screen from just below the breadcrumbs and in the error log I have:
Quote:
PHP Fatal error: Call to undefined function zen_lightbox() in includes/classes/observers/FualSlimboxObserver.php on line 44
Line 44:
PHP Code:
$image_link = zen_lightbox($products_image_large, $products_name, LARGE_IMAGE_WIDTH, LARGE_IMAGE_HEIGHT);
Through testing I have ascertained that this code breaks things:
/includes/modules/MYTEMPLATE/additional_images.php
PHP Code:
//-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 ***
I used to have Zen Lightbox installed but I'm working on an upgrade to V1.5.5f and I started with a stock install so there will be no remnants of Lightbox left. I have also run the uninstall sql to remove references from my database.
Running PHP Version 5.5.38 and MySQL 5.5.58. If that could be playing a part? Upgrading my store so I can go to PHP 7.
The site is not open to the outside world yet but I can enable it if needs be. Before I do that does any one have any ideas?
Brent
PS there are slight differences with /includes/modules/MYTEMPLATE/additional_images.php and the stock file. These don't appear to be intentional but wasn't sure. For example line 86:
PHP Code:
if (count($images_array) > 0) {
vs
PHP Code:
if (sizeof($images_array)) {
line 97:
PHP Code:
$num_images = count($images_array);
vs
PHP Code:
$num_images = sizeof($images_array);
line 101:
PHP Code:
if ($num_images > 0) {
vs
PHP Code:
if ($num_images) {
Re: Image Handler 5 (for v1.5.5) Support Thread
Somewhere, remaining in your configuration is one of two settings, either ZEN_LIGHTBOX_STATUS (set to 'true') or FUAL_SLIMBOX (set to 'true').
You can use your admin's Tools->Developer's Tool Kit to search (using the Look-up CONSTANT or language defines section) to search and change those settings to 'false'. That will get you going, then you need to run the SQL uninstall script for Zen Lightbox or Fual Slimbox (whichever was installed) and/or use your site's phpMyAdmin to locate and delete those configuration settings.
Re: Image Handler 5 (for v1.5.5) Support Thread
Thanks for getting back to me and giving me a few pointers!
I did do a search using the tool kit and includes/classes/observers/FualSlimboxObserver.php was the only place I found ZEN_LIGHTBOX or FUAL_SLIMBOX.
I also ran the uninstall sql for Zen Lightbox twice just to be sure my database was clean.
What I didn't do was search my database for config settings left behind. I have just taken a peak in a backup and there are indeed some settings left over so I'll clear them out.
I now understand what is going wrong. All obvious once you see the light :blush:
Brent
Re: Image Handler 5 (for v1.5.5) Support Thread
Brent, I'll also "stiffen-up" that observer processing so that the presence of that function is also required (as well as the partial uninstall of the older IH versions).
Thanks to you for the report.