I just went back and added the rel="lightbox-g" to all my gallery images on my ezpages - might not be the best solution but thanks to 'sed' it wasnt too bad.
Printable View
i just had another look in my mac--firefox and it works but not on pc with vista-firefox
This is doing my head in...
I have loaded this into my dev environment, and it works fine. I loaded into the test environment and I'm getting
ZEN_LIGHTBOX_COUNTER_IMAGE 1
ZEN_LIGHTBOX_COUNTER_OF 6
under the images in the lightbox instead of
Image 1 of 6
I've reloaded all the files in the install pack and checked that the file sizes are the same.
Can anybody provide some troubleshooting? Where is this referenced?
Cheers!
Hi CabernetCat,
Are you using the latest version of ZLB (1.6.2)?
I did see that issue on v1.6 installations, but it was fixed in 1.6.1
the problem is a missing file calledzen_lightbox.php in includes/languages/english/extra_definitions/[your-template-folder]/zen_lightbox
please check for that file and if you dont have it, then please download the latest version and give that a try.
daniel
Hi Daniel,
Thanks for that pointer! Problem solved. You know I checked those file structures twice... I can't beleive I missed the damn thing.
FYI:I am using 1.6.1
Hi there,
I'm having an issue where pointing at an image reveals the image path on the server rather than showing the image is being pulled from bmz_cache.
I'm running the latest version of ZC and IH2. Zen Lightbox is v.1.61.
Will v. 1.62 correct this issue, or do I need to go back and do a file merge so the lightbox file won't override the IH2 file?
If I need to do a file merge, can you advise as to which file needs to be merged and how to correctly merge the code?
Thanks :)
Yep, that's the site. When I mouse over the images on this page, this page, and this page, the file path and image name are displayed in the status bar. (It actually does this for all main product images on all product pages).
I posted this same question to the IH2 support thread first because I saw another poster had the same issue and had posted there. This is the feedback I was given:A look at the code on the product pages reveals this around line 235:Quote:
you are not using just image handler on that page you are using a lightbox mod, which overwrites image handler file for that page,
I think the very latest version of lightbox (see the support thread as i don't know if its in the downloads yet) should work out of the box with image handler
The file that sets that particular page comes with lightbox
Code:<!--bof Main Product Image -->
<div id="productMainImage" class="centeredContent back">
<script language="javascript" type="text/javascript"><!--
document.write('<a href="images/PGc1.jpg" rel="lightbox-g" title="Staying in the Now"><img src="bmz_cache/c/ca8da9d479083782b2e2dad6008ef12b.image.200x200.jpg" alt="Staying in the Now" title=" Staying in the Now " width="200" height="200" /><br /><span class="imgLink">larger image</span></a>');
//--></script>
<noscript>
<a href="http://empowermentsanctuary.com/marketplace/index.php?main_page=popup_image&pID=37" target="_blank"><img src="bmz_cache/c/ca8da9d479083782b2e2dad6008ef12b.image.200x200.jpg" alt="Staying in the Now" title=" Staying in the Now " width="200" height="200" /><br /><span class="imgLink">larger image</span></a></noscript>
</div>
<!--eof Main Product Image-->
Update, a new comment on the IH2 Support Thread from DivaVocals may be the answer. Your thoughts?
Quote:
Nigel is correct and in the next release (should be submitted this week - still testing the modifications) I'll make sure I add this to the readme.. The latest versions of the Zen Lightbox supports IH2 OUT THE BOX without any file merging required.. I'm at work and I can't remember which file it is off the top of my head, but there is ONE file that ZLB and IH2 have in common.. You do NOT need to merge the ZLB file with the IH2 file.. Simply REPLACE the IH2 file with the one from ZLB fileset and you should be good to go
One more thing...
When I installed IH2 and Zen Lightbox 161, the only common file I found was includes/modules/custom_template/additional_images.php. At that time, I overrode the IH2 file with the ZLB file.
If I download ZLB 162 and do the same thing, will this resolve the issue, or is there another file I need to do this with?
Maybe it's just best if I simply upgrade ZLB to v1.62?
Okay lemme chime in here because I am not that familiar with ZLB either:smile:.. What I do know is that it is SUPPOSED to include code which works WITH IH2 out the box (it appears that this was part of one of the improvements Alex Clarke's versions brought to the table).. What I posted on the IH2 thread was based on feedback I've received from users of BOTH mods -- users of both modules have reported that the one common file between IH2 and ZLB -- includes/modules/YOUR_TEMPLATE/additional_images.php -- should NOT be merged. They have all indicated that the ZLB version of this file shoud OVERWRITE the IH2 version of this file.
In comparison, Fual Slimbox requires the merging of the code in the common files for IH2 to work with it.. However, the issue ScriptJunkie is reporting seems to be a NON-ISSUE (see this website -- http : // www . hairisle . com/Less-Than-Perfect/Processed-Wefts/Indian-Remy-Machine-Weft-Relaxed-Texture-4-Oz. -- for an example of Fual Slimbox and IH2 working together) Whether you rightclick to view the image source or mouseover the images, the images are all being called from the IH2 bmz_cache folders for the small, medium, and large product images.
Hope all of this is useful information when researching this..:smile:
Thanks DivaVocals,
I was hoping you would chime in.
I know others have said they got IH2 and ZLB working together ok, but I dont really have a need for IH2 and I dont really have time to learn it just to be able to troubleshoot the 2 working together.
ScriptJunkie, I would just suggest making sure all IH2 is installed and then ZLB installed after so that the additional_images file gets overwritten.
daniel
Already done. When I initially installed, I started by completely removing/uninstalling an older version of ZLB. I then installed IH2. After that, I installed v1.61 of ZLB and overrode the additional images file.
Then about a half hour ago, wondering if I only thought that I overrode the additional images file, I downloaded the additional images file from my server, and compared it to both the IH2 file and the ZLB file to make sure I had the ZLB file on the server and that I didn't "transpose" them during install.
All is as it should be.
I took a look at the link Diva provided (where the site is using Fual Slimbox and IH2). I see on that site that on mouseover, the bmz cache file is displayed in the status bar as the image link. Also, when the image is right clicked and copy link is selected, the URL given points to the bmz cache.
This is not the case for me. I'm wondering if it's possible to find out what's different between ZLB and FSB as it relates to this particular functionality, and then use that difference to change how ZLB behaves?
Or is it just me that ZLB is behaving this way for? Because if it's just me, I'll uninstall and reinstall both of them and see if that resolves the "issue".
Gonna test tonight myself.. I was in the middle of compiling the latest IH2 updates (minor updates mostly) Ckosloff and I tested in previous IH2 releases IH2's functionality with both ZLB and FSB. I need to test the same two lightboxes with this upcoming IH2 update before I submit the new IH2 to the downloads (previously ckosloff tested ZLB, I tested FSB).. I will be reporting back my findings from this testing as well..
At first blush, it looks like ZLB only APPEARS to work with IH2.. In reality it looks like what happens is that IH2 works everywhere on your site but the product details page where the ZLB code seems to be using default Zen Cart image locations..
Ok...so I've ruled out that this is unique to my site. A portion of the code I posted in post 2409 can be found in this file:
includes/templates/my_custom_template/templates/tpl_modules_main_product_image.php
The code is below:
It appears to be calling both the large and medium product images from the default zen cart locations instead of from the bmz cache folder (which is where images reside when IH2 is installed).Code:<script language="javascript" type="text/javascript"><!--
document.write('<?php echo '<a href="' . zen_lightbox($products_image_large, addslashes($products_name), LARGE_IMAGE_WIDTH, LARGE_IMAGE_HEIGHT) . '" rel="' . $rel . '" title="' . addslashes($products_name) . '">' . zen_image($products_image_medium, addslashes($products_name), MEDIUM_IMAGE_WIDTH, MEDIUM_IMAGE_HEIGHT) . '<br /><span class="imgLink">' . TEXT_CLICK_TO_ENLARGE . '</span></a>'; ?>');
//--></script>
<?php } else { ?>
<?php // eof Zen Lightbox 2008-12-15 aclarke ?>
<script language="javascript" type="text/javascript"><!--
document.write('<?php echo '<a href="javascript:popupWindow(\\\'' . zen_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $_GET['products_id']) . '\\\')">' . zen_image($products_image_medium, addslashes($products_name), MEDIUM_IMAGE_WIDTH, MEDIUM_IMAGE_HEIGHT) . '<br /><span class="imgLink">' . TEXT_CLICK_TO_ENLARGE . '</span></a>'; ?>');
//--></script>
Neistudio, I know you mentioned being unfamiliar with IH2, but is this something you would know how to change? In other words, if you know how to write code, is it easy to change where the images are called from, or is IH2-specific knowledge required? (the bmz_cache folder resides at the store root).
I would do this myself and submit the changes here for the community, but I don't know how to write the code.
I have the IH2 rev 8d and ZLB1.61 ( did not know there was a 1.62
and let me tell you that I did use the file that they both share as is from I think IH2 and it would not work with LB but then I tried the one from LB totally removing the other one first and still no joy so I finally had to merge them together myself and that is how I got them both to live happily together
well then it won't let me upload it so here is the codeand we can wait to see what Diva comes up with in th try she does:
Code:<?php
/**
* additional_images module
*
* Prepares list of additional product images to be displayed in template
*
* @package templateSystem
* @copyright Copyright 2003-2007 Zen Cart Development Team
* @copyright Portions Copyright 2003 osCommerce
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
* @version $Id: additional_images.php 6132 2007-04-08 06:58:40Z drbyte $
*/
if (!defined('IS_ADMIN_FLAG')) {
die('Illegal Access');
}
if (!defined('IMAGE_ADDITIONAL_DISPLAY_LINK_EVEN_WHEN_NO_LARGE')) define('IMAGE_ADDITIONAL_DISPLAY_LINK_EVEN_WHEN_NO_LARGE','Yes');
$images_array = array();
// do not check for additional images when turned off
if ($products_image != '' && $flag_show_product_info_additional_images != 0) {
// prepare image name
$products_image_extension = substr($products_image, strrpos($products_image, '.'));
$products_image_base = str_replace($products_image_extension, '', $products_image);
// if in a subdirectory
if (strrpos($products_image, '/')) {
$products_image_match = substr($products_image, strrpos($products_image, '/')+1);
//echo 'TEST 1: I match ' . $products_image_match . ' - ' . $file . ' - base ' . $products_image_base . '<br>';
$products_image_match = str_replace($products_image_extension, '', $products_image_match) . '_';
$products_image_base = $products_image_match;
}
$products_image_directory = str_replace($products_image, '', substr($products_image, strrpos($products_image, '/')));
if ($products_image_directory != '') {
$products_image_directory = DIR_WS_IMAGES . str_replace($products_image_directory, '', $products_image) . "/";
} else {
$products_image_directory = DIR_WS_IMAGES;
}
// Check for additional matching images
$file_extension = $products_image_extension;
$products_image_match_array = array();
if ($dir = @dir($products_image_directory)) {
while ($file = $dir->read()) {
if (!is_dir($products_image_directory . $file)) {
if (substr($file, strrpos($file, '.')) == $file_extension) {
if(preg_match("/" . $products_image_base . "/i", $file) == '1') {
if ($file != $products_image) {
if ($products_image_base . str_replace($products_image_base, '', $file) == $file) {
//echo 'I AM A MATCH ' . $file . '<br />';
$images_array[] = $file;
} else {
// echo 'I AM NOT A MATCH ' . $file . '<br />';
}
}
}
}
}
}
if (sizeof($images_array)) {
sort($images_array);
}
$dir->close();
}
}
// Build output based on images found
$num_images = sizeof($images_array);
$list_box_contents = '';
$title = '';
if ($num_images) {
$row = 0;
$col = 0;
if ($num_images < IMAGES_AUTO_ADDED || IMAGES_AUTO_ADDED == 0 ) {
$col_width = floor(100/$num_images);
} else {
$col_width = floor(100/IMAGES_AUTO_ADDED);
}
for ($i=0, $n=$num_images; $i<$n; $i++) {
$file = $images_array[$i];
$products_image_large = str_replace(DIR_WS_IMAGES, DIR_WS_IMAGES . 'large/', $products_image_directory) . str_replace($products_image_extension, '', $file) . IMAGE_SUFFIX_LARGE . $products_image_extension;
// Begin Image Handler changes 1 of 2
// $flag_has_large = file_exists($products_image_large);
$flag_has_large = true;//file_exists($products_image_large);
// End Image Handler changes 1 of 2
// bof Zen Lightbox 2008-12-11 aclarke
if (function_exists('handle_image')) {
$flag_has_large = true;
} else {
// eof Zen Lightbox 2008-12-11 aclarke
$flag_has_large = file_exists($products_image_large);
// bof Zen Lightbox 2008-12-11 aclarke
}
// eof Zen Lightbox 2008-12-11 aclarke
$products_image_large = ($flag_has_large ? $products_image_large : $products_image_directory . $file);
$flag_display_large = (IMAGE_ADDITIONAL_DISPLAY_LINK_EVEN_WHEN_NO_LARGE == 'Yes' || $flag_has_large);
$base_image = $products_image_directory . $file;
$thumb_slashes = zen_image($base_image, addslashes($products_name), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT);
// Begin Image Handler changes 2 of 2 remove additional single quotes from image attributes (important!)
$thumb_slashes = preg_replace("/([^\\\\])'/", '$1\\\'', $thumb_slashes);
// End Image Handler changes 2 of 2
// bof Zen Lightbox 2008-12-11 aclarke
if (function_exists('handle_image')) {
// remove additional single quotes from image attributes (important!)
$thumb_slashes = preg_replace("/([^\\\\])'/", '$1\\\'', $thumb_slashes);
}
// eof Zen Lightbox 2008-12-11 aclarke
$thumb_regular = zen_image($base_image, $products_name, SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT);
$large_link = zen_href_link(FILENAME_POPUP_IMAGE_ADDITIONAL, 'pID=' . $_GET['products_id'] . '&pic=' . $i . '&products_image_large_additional=' . $products_image_large);
// Link Preparation:
// bof Zen Lightbox 2008-12-11 aclarke
if (ZEN_LIGHTBOX_STATUS == 'true') {
if (ZEN_LIGHTBOX_GALLERY_MODE == 'true') {
$rel = 'lightbox-g';
} else {
$rel = 'lightbox';
}
$script_link = '<script language="javascript" type="text/javascript"><!--' . "\n" . 'document.write(\'' . ($flag_display_large ? '<a href="' . zen_lightbox($products_image_large, addslashes($products_name), LARGE_IMAGE_WIDTH, LARGE_IMAGE_HEIGHT) . '" rel="' . $rel . '" title="' . addslashes($products_name) . '">' . $thumb_slashes . '<br />' . TEXT_CLICK_TO_ENLARGE . '</a>' : $thumb_slashes) . '\');' . "\n" . '//--></script>';
} else {
// eof Zen Lightbox 2008-12-11 aclarke
$script_link = '<script language="javascript" type="text/javascript"><!--' . "\n" . 'document.write(\'' . ($flag_display_large ? '<a href="javascript:popupWindow(\\\'' . $large_link . '\\\')">' . $thumb_slashes . '<br />' . TEXT_CLICK_TO_ENLARGE . '</a>' : $thumb_slashes) . '\');' . "\n" . '//--></script>';
// bof Zen Lightbox 2008-12-11 aclarke
}
// eof Zen Lightbox 2008-12-11 aclarke
$noscript_link = '<noscript>' . ($flag_display_large ? '<a href="' . zen_href_link(FILENAME_POPUP_IMAGE_ADDITIONAL, 'pID=' . $_GET['products_id'] . '&pic=' . $i . '&products_image_large_additional=' . $products_image_large) . '" target="_blank">' . $thumb_regular . '<br /><span class="imgLinkAdditional">' . TEXT_CLICK_TO_ENLARGE . '</span></a>' : $thumb_regular ) . '</noscript>';
// $alternate_link = '<a href="' . $products_image_large . '" onclick="javascript:popupWindow(\''. $large_link . '\') return false;" title="' . $products_name . '" target="_blank">' . $thumb_regular . '<br />' . TEXT_CLICK_TO_ENLARGE . '</a>';
$link = $script_link . "\n " . $noscript_link;
// $link = $alternate_link;
// List Box array generation:
$list_box_contents[$row][$col] = array('params' => 'class="additionalImages centeredContent back"' . ' ' . 'style="width:' . $col_width . '%;"',
'text' => "\n " . $link);
$col ++;
if ($col > (IMAGES_AUTO_ADDED -1)) {
$col = 0;
$row ++;
}
} // end for loop
} // endif
?>
That's interesting. The additional images file that came with my version of ZLB 161 already had those IH2 changes in them, so there was no need to merge files...simply replacing the IH2 version with the ZLB version of the file worked for me.
The issue now in my case is how ZLB interacts with the main image file. It works fine for a ZC install without IH2, but doesn't work with IH2.
I'll be taking a look at the code for that hopefully this afternoon.
You were the OTHER example I was looking for.. :laugh: I knew you ran both and I checked your site.. It looks like your images are correctly being called from the bmz_cache folder.. I may need to bug you for some other things.. If you don't mind sharing, can you PM me an e-mail address.. or better yet.. I'll PM you mine..
that's me too it is a "let's try this and hope I don't kill it type of thing" but I am learning...lol
now this may seem silly but, did you make very sure that all the files are in their right spots..sometimes a left out one (i do that too often) or one that got corrupted on the way up will do things to the mods.
Well I meant that I don't write PHP code.. I actually do have a web design certificate (I am proficient with HTML/CSS), and because I do work as Senior Business Systems Analyst, my role in development projects is typically not that of a programmer/developer or DBA.. However, I have worked in the world of web based software development for long enough that I have figured a LOT out on my own.. However I am still a LONG way from calling myself a programmer..
Ok, here's what I have so far. I may be way off base here, so I do not recommend anyone make these changes. Right now the goal is just to look at the code and explore options. Unfortunately, I just don't know enough about programming to understand if what I'm doing will work or cause a major fail.
I started with comparing the code in includes/templates/YOUR_CUSTOM_TEMPLATE/templates/tpl_modules_main_product_image in both ZLB and FSB, I'm guessing the below might be a good place start or at least the right direction to look in?
in the ZLB version of the above file, lines 23 - 25, find:Replace with this from FSB version of the above file, lines 53 -61:Code:<script language="javascript" type="text/javascript"><!--
document.write('<?php echo '<a href="' . zen_lightbox($products_image_large, addslashes($products_name), LARGE_IMAGE_WIDTH, LARGE_IMAGE_HEIGHT) . '" rel="' . $rel . '" title="' . addslashes($products_name) . '">' . zen_image($products_image_medium, addslashes($products_name), MEDIUM_IMAGE_WIDTH, MEDIUM_IMAGE_HEIGHT) . '<br /><span class="imgLink">' . TEXT_CLICK_TO_ENLARGE . '</span></a>'; ?>');
//--></script>
and then change it to this:Code:$fualSlimboxContent .= $fual_slimbox_a . $fual_slimbox_image . '</a>';
// Putting the text link together with the image is nasty!
$fualSlimboxContent .= '<br class="clearBoth" />';
$fualSlimboxContent .= $fual_slimbox_a . '<span class="imgLink">' . TEXT_CLICK_TO_ENLARGE . '</span></a>';
$fualSlimboxContent .= '</div>';
?>
<script language="javascript" type="text/javascript"><!--
document.write('<?php echo $fualSlimboxContent; ?>' );
//--></script>
There may be other code in the FSB version of the file that is equally pertinent....perhaps lines 24 - 28? I'm not sure. I'm actually not sure about any of it...but I figured it's as good a starting place as any.Code:$IH2Content .= $IH2_a . $not_sure_what_to_do_here_perhaps_define_this_in_a_way_to_pull_from_bmz_cache . '</a>';
// Putting the text link together with the image is nasty!
$IH2Content .= '<br class="clearBoth" />';
$IH2Content .= $IH2_a . '<span class="imgLink">' . TEXT_CLICK_TO_ENLARGE . '</span></a>';
$IH2Content .= '</div>';
?>
<script language="javascript" type="text/javascript"><!--
document.write('<?php echo $IH2Content; ?>' );
//--></script>
Diva, I look forward to hearing what your test results yield later on this evening.
@ ScriptJunkie (and others)
OK, I did some digging, and I dont think the problem has anything to do with the additional_images file.
I made a scratch installation of ZC1.3.9 and IH2. out of the box (w/o ZLB) I was seeing the exact same behavior you described (the main product image was being called from /images and NOT bmz_cache)
I started digging thru the files and I found that after 2 tries of merging the includes directory, [includes/modules/(theme)/main_product_image.php] was not getting updated to the IH2 version.
after manually installing this 1 file, I stared seeing expected behavior of the main product image.
after this, I installed ZLB 1.6.2 I was seeing the proper behavior still. (the lightbox image was pulled from bmz_cache and NOT /images)
So check your server and see if that file was updated to the IH2 version.
Daniel
@DivaVocals,
I was reading the IH2 forum and saw the posts about updating the readme for ZLB to address IH2, and I think thats a great idea.
If you want to PM me what you are including in the IH2 update I can paste that into the ZLB readme too.
cheers,
daniel
i went and checked mine although I usuallly don't have that problem of them not overwritten since prior to uploading a new file that is already present -- I place a ~ or write old at the end of the name after the .php ... this nulls the one that is one the server (in some cases it doesn't work and I still have to manually remove them
Will do!!:smile:
I agree.. BUT those who are using ZLB should overwrite the one from the IH2 fileset with the one from ZLB or ZLB will not work correctly..
This file is not ncluded with the IH2 fileset.. Can you let me know which version you installed.. I want everything to be apples to apples in my testing (which I am starting as we speak). I'm backing up my test store so I can rollback if needed, and will be installing ZLB on top of IH2.. Standby for my results..:smile:
I downloaded IH2 Version: 2.0 Rev 8d from the addons page today.
this is a screenshot of the file structure with the file in question highlighted. is this not correct?
http://goo.gl/pODUT
Yeah, I don't have that file either (main_product_image.php) in my IH2 version (v2.0 Rev 8d) That's why I thought the ZLB version of the file needed to be modified to create the desired behavior...
Will wait for Diva's testing to be concluded before I go seek out the IH2 version of that file and attempt to merge it with the ZLB version.
Very interesting. I just re-downloaded IH2.0 Rev 8.d and the main product image file is in the package. I don't know how that's possible (that it wasn't there before but is now when it's the same version), but as long as I have it now, I'm happy :)
Will hold off merging the two until after hearing back from Diva.
I am as well. Ultimately, did you:
Install IH2 (including uploading this one file individually) and then install ZLB (overriding that file with the ZLB version)
or
Did you install both IH2 and ZLB and then upload this file individually after merging the two versions?
Ok...clearly I'm insane. I DO have it. I was confusing the includes/modules/YOUR_CUSTOM_TEMPLATE/main_product_image.php file in IH2 with the includes/templates/YOUR_CUSTOM_TEMPLATE/templates/tpl_modules_main_product_image.php file in ZLB.
I'm going to try re-uploading includes/modules/custom/main_product_image.php from IH2 and see what happens while Diva continues her testing.
Sorry for the confusion folks!
Alright folks I'm tapped out.. My results are only partially satisfactory.. The LARGE additional images are NOT being pulled from the bmz_cache folder, and I haven't a CLUE as to why.. I need to eat, take a shower and come at this tomorrow.. I could use a set of eyeballs to help me figure out why.. Not sure if the issue is my test store, and I'm far too pooped to set this thing back to a vanilla state to start over..
Very strange! It worked instantly for me as soon as I loaded that one file. Btw, I am testing all of this on a totally clean install of ZC that is still using the classic template. I uploaded a few additional products on top of the default ones and loaded rediculosly large images for IH2 to scale down.
[thinking out loud]
Are you sure that your main image is in fact larger than what you have IH2 set to scale down a large image too? I would guess that if your image is 400px and IH2 is set to only scale down to 500px then it would just do nothing and possibly just load the original from /images.
[/thinking out loud]
Daniel
Just checked the settings. The main product images are large images 600px wide. Mediums are set to scale down to 199 and small down to 80. There's no setting to scale down to large, as the largest image is what's used by ZLB's "zoom". There's a max large file size, and I have that set to 599px wide.
In the admin for IH2, the image sizes are set using Config/Images.
Update: Issue Resolved
A few hours ago, I was poking the admin/config/images settings. It occurred to me that since IH2 only uses one large image that it then sizes down for various purposes, that perhaps the suffixes _MED and _LRG were unnecessary.
So I removed them to see if it made any difference to the issue. It did not. But I moved on to other things without putting them back.
Then, a few minutes ago, niestudio was doing me the courtesy of poking around in my files to find out why his solution worked for him and not for me.
While in the admin/config/images, he noticed the blank suffix fields and repopulated them. The issue is now resolved (for me). I don't know if this will also work for others, or what the trigger was for this issue is to begin with...but until we find out, perhaps a good work around is this:
After installing IH2 and configuring and saving your image settings, go back in to the settings and remove the _MED and _LRG suffixes and save. Then go back in and put them back in and save. Obviously this is a minor PITA to have to do, but it might solve the problem until a solution is found.
Thanks again niestudio! And thanks to Diva for her ongoing effort :)
Okay came back at it with fresh eyes.. All is well.. It just takes some time for all the images to cache apparently.. SO last night's "issue" is a non-issue..
That said the install of both modules is very straight forward with one small caveat.. IH2 and ZLB both have this file in common includes/modules/YOUR_TEMPLATE/additional_images.php.
If you are installing ZLB you need to replace the includes/modules/YOUR_TEMPLATE/additional_images.php from the IH2 fileset with the one from ZLB versus attempting to merge these two files (which is what you would NORMALLY do when two mods share the same file).
So let me repeat this.
If you are running IH2 AND ZLB, do not MERGE the includes/modules/YOUR_TEMPLATE/additional_images.php files. REPLACE the one from IH2 with the one from ZLB.
To that end you should install and configure IH2 FIRST make sure it works, then install ZLB and install and configure it.
While I'm glad this all worked out for you I'm not entirely sure that this is an issue in general with ZLB/IH2, versus something that was unique to your store... Your issues were unusual, and I could NOT replicate them at all.. My conclusion was the same as niestudio's. The includes/modules/YOUR_TEMPLATE/additional_images.php was never the issue as the includes/modules/YOUR_TEMPLATE/main_product_image.php is the file that drives the main product image for IH2.
All that said I'm glad you are all sorted out now..:clap:
I'm glad too :) Thanks to both of you for all your help :smile:
De nada!
I think the big lesson in all of this is that niestudio and I are gonna make sure that both the IH2 and ZLB readme files contain the same data with regards to the use of IH2 and ZLB together.. Should end (or at least minimize) the questions/concerns/confusion on both support threads.. (we hope :smile:)
I STILL have to test ZLB with the upcoming IH2 release.. The changes are minor, but I need to make sure that both ZLB and FSB continue to work with IH2..
yup me 2. i love both these mods and although I never had that issue at all willl either version I did have the additional immages issue tis why I mergd the files.
is the 1.6.2 version of LB in the downloads area?
do you mean the IHsmall (or medium or large) image filetype? where it says no_changeQuote:
While in the admin/config/images, he noticed the blank suffix fields and repopulated them. The issue is now resolved (for me). I don't know if this will also work for others, or what the trigger was for this issue is to begin with...but until we find out, perhaps a good work around is this:
yes ZLB 1.6.2 is in the downloads area.
updates were close on image click and an always show prev/next buttons (when additional images are present) parameter
on ScriptJunkies site I just followed the suggested settings from the IH2 readme which included:
Product Info - Image Medium Suffix = _MED
Product Info - Image Large Suffix = _LRG
This was a later cause of the problems though, the initial problem was a missing file: includes/modules/[template]/main_product_image.php
and you don't have to do this.. In fact we are recommending that you DON'T try and merge these files.. ZLB introduced code LONG ago that will ensure that ZLB and IH2 work together.. So you should be using the ZLB version of the one common module file. (ZLB and IH only share ONE file as noted in previous posts)
ok help...lol
i told you mine sometimes will put up a fight
I just upgraded a store from 1.5 to 1.6.2 LB--removed all the files, ran the 1.5 uninstaller
reuploaded each and every file--twice since getting this error on the image at the bottom of it:
ZEN_LIGHTBOX_COUNTER_IMAGE 1
ZEN_LIGHTBOX_COUNTER_OF 6
under the images in the lightbox instead of
Image 1 of 6
I did go into the languages/english/extradefinitions/current template/zen_lightbox.php
it is the original file from 1.6.2 no edits at all and it is sitting in the folder. I deleted it from the server, went to the store then refreshed the page there, tried the main image and the additional images and the error was still at the bottom--no shock since i did remove the file.
I then reupped the file, refreshed the server ftp files--refreshed the page at her store and the eror is still showing
then i went into google chrome to check in case the hard refresh of Firefox did not take and it too shows the error---
how can I fix this please.:shocking:
forgot the link to her store: http://www.pennylanebridal.com.au/sh...roducts_id=133
@Diva---will do so with my store and let you know if it behavesQuote:
and you don't have to do this.. In fact we are recommending that you DON'T try and merge these files.. ZLB introduced code LONG ago that will ensure that ZLB and IH2 work together.. So you should be using the ZLB version of the one common module file. (ZLB and IH only share ONE file as noted in previous posts)
ok Diva, I did the upgrade to 1.6.2 in both my test store and the live store for LB and ran the sql also and the need for the edits are truly gone.
although on both of my stores the error that appears at the bridal store are not there
so I just need to find out what to do at the other store..thanks
I have seen this, but only when the [includes/languages/english/extra_definitions/(template)/zen_lightbox.php] file is missing.
You said you already checked its existence, so the only other place might be:
[includes/classes/zen_lightbox/options.php]
can you copy and paste the line that is after?PHP Code:
if (ZEN_LIGHTBOX_COUNTER == 'true') {
Thats where it reads the information from the previous file.
daniel
thanks daniel
I noticed that and when it is set to close on image click the next/prev show all the time but do not work. so i set it to false leaving only to click overlay to close and it behaves...just the eroor i mentioned instead of showing image 1 of 8
I've tried starting from scratch unistalling Zen Lightbox and reinstalling it. No matter what I do I'm still getting a double lightbox of the same picture. Any suggestions? please?
Sent you a PM.
I erased all traces of "lightbox" from my database. I erased all traces of files that "Zen Lightbox" installed.
Then I started the installation from scratch.
The only thing I can think of is if there was an earlier version of "Zen Lightbox" I installed that doesnt have the file in the new readme. So there is some file that is making it activate twice.
What is even more weird is that there are no traces of lightbox before I install the module. You think I should search my database for a different name for lightbox?
Hello everyone,
I installed zen lightbox, and works great with everyone on my site BUT....... the scrolling image bar called "popular products".
When I turn zen lightbox on, the images work perfect in the lightbox for the product, but the scrolling bar we put on our site "popular products" essentially breaks.... the space is there, but all the images no longer are there, and the "right arrow" button when clicked on, shoots you to the main index page.
Any ideas? I've been going page by page on this thread, but needless to say, cannot find anything about it breaking other javascripts. I could be blind, and not seeing/searching correctly.
here is our site: Link to our Site / Example of Bar (Zen Lightbox is turned off, therefor the scrolling bar is working as it should. Wanted feedback before messing again with it)
Thank you for any help to this.
Yes I did, only because it is a live site with a lot of traffic. I didn't want to hurt sales.
Didn't know if there was any known issues with this type of problem.
I'll take a screen shot of code and images real quick as broken
http://www.sjolietanning.com/broke.gif
code didn't say anything different from what it does now.
I'll take a look at the post, thank you for your replies. It looks awesome for the images its on. I plan to do every effort to fix it.
good work.
Hi Sjolie,
I looked at the code for your site, and it is already loading jQuery which ZLB uses as well so the fact that its getting loaded twice could be your issue.
as a test fix, you could try to open [includes/classes/zen_lightbox/slimbox.php] and comment out the line that loads ZLB's copy of jQuery.
you would need to change the line towards the top
from
toPHP Code:
echo '<script type ……
note the '//' is what you are adding.PHP Code:
echo //'<script type ……
hopefully this will help.
daniel
Thank you for the reply Daniel,
I did as you suggested, and when I load it up... the entire site doesn't load... except for the background image.
I also tried darkangel's suggestion of the other script without any success.
I would be interested in freelance work for those who are experienced with this addon. We truly want to get it to work properly.
yes the other lightbox is practically like this one but I -- myself-- prefer daniel's lightbox,
Hope it behaves for you
AMAZING:) works like a charm now. I believe I tried an older script a couple years ago and forgot to remove it.. didn't realize we had two instances running.
I appreciate you both for taking the time to look at the site and giving me input, I know it isn't always fun troubleshooting someone else's problems.
Much appreciation!
no problem, glad it worked.
Note, its not an old version of the plugin that was loading, its part of your theme; it uses jQuery as well so thats why it was loading already.
from your theme:
ZLB was simply loading it again since it doesnt know to check for the existence of a previously loaded jQuery (hmm, maybe I should look into that for ZLB 1.6.3)HTML Code:<script type="text/javascript" src="includes/templates/theme438/jscript/jscript_jquery-ui.min.js"></script>
Daniel
That makes sense.
I remember trying to install "slim lightbox" addon atleast a year or so ago... I believe that was the addon name. Figured that might of been the extra existence of the script.
Thanks for the input!
hi guys, I have a small problem with zen light box.
When I try to insert a new product the process goes in loop, and in mydebug files there's this error string:
thx for help!Code:[06-Mar-2011 22:04:03] PHP Warning: preg_match() [<a href='function.preg-match'>function.preg-match</a>]: Compilation failed: missing ) at offset 48 in /home/passio23/public_html/includes/modules/classic/additional_images.php on line 47
Did you see this forum post about the same issue?
This user found an image that had a ( in the file name. Could this be the case for you too?
http://www.zen-cart.com/forum/showth...ilation+failed
Daniel
I need to add the lightbox effect to the category Icon above the product listing. This is a wholesale site, and all user ordering will be done from the product listings. I don't want them to have to go back to the category listing to see the large image.Attachment 8968. I am not sure how to go about this.
Thanks- SJ
I'm not sure thats going to be possible without some custom hacks.
The ZLB works but replacing the default popup images with lightbox functionality, but the category images are not clickable by default.
you might be better off just editing Admin > Images > Category Icon Image Width (& Height) - Product Info Pages to make your images larger to start with.
daniel
Thanks for you reply, daniel. I kind of had that feeling. I tend to want things that don't exactly fit the mold. I'll keep hacking away at it (pun intended) and see where it takes me.
SJ
Love this mod, really dresses up the old website! But...
Can't find my solution after running several searches on the support thread and the rest of the forum. Not covered in the read me either.
Clean new install of zen cart 1.3.9h, (think the h is right, doing this from memory), image handler for_vx_2-0Rev8d, and zen light box 1.6.1. Installed in the order given. Works great on most images EXCEPT -
1. Main image on individual product page. Maybe that's a feature, not a flaw? Keep from downloading the largest version of the file unless you really mean to do so?
2. But the frustrating one for me is the images on my ez pages do not have the lightbox effect.
Read me states will do so out of the box for every image that has a link. Made sure of that. Any idea what I'm missing?
I am totally ignorant regarding scripting and coding. Manage to stumble my way through by careful application of the knowledge (and mistakes) of others on this forum.
Link is phoenixwoodworks D o t net . The "About Phoenix" sidebox on the upper right contains the ez pages. And the Glossary link is the one I'm most concerned with.
Any help you offer will be most gratefully appreciated.
Thanks,
Bruce
Hi Bruce, I'm not sure what you mean by #1, can you please explain?
for #2 it will work on ez-pages however since they are generated manually, you have to also manually add a reference to the lightbox. - rel="lightbox"
try changing your image link(s) on your glossary page
FROM
TOHTML Code:<a href="graphics/barrel.jpg"><img src="graphics/barrel.jpg"
and see if that helps you.HTML Code:<a href="graphics/barrel.jpg" rel="lightbox"><img src="graphics/barrel.jpg"
daniel
Hi Bruce,
On second look you are correct, this should be working automatically. It appears that there is a bit of code missing from V1.6x. thanks for bringing it to my attention, I'll work on getting it re-implemented. In the meantime, that "fix" should still work for you if you want to try it.
daniel
Sorry not to be clear. When an individual product is displayed on the main page, the primary image does not open a lightbox on hover. The additional images all do however.
My point was since the initial, or primary image is already the _MED image, perhaps the mod is configured not to automatically load the _LRG image during every - on hover. Thought it might be coded that way and not an abnormality.
Should have mentioned I'd already tried that with no results. After thrashing around for a solution for hours, easy to forget everything you've attempted! That is mentioned in the read me. I have gone back and added that to all links. Still no improvement.Quote:
for #2 it will work on ez-pages however since they are generated manually, you have to also manually add a reference to the lightbox. - rel="lightbox"
try changing your image link(s) on your glossary page
FROM
TOHTML Code:<a href="graphics/barrel.jpg"><img src="graphics/barrel.jpg"
and see if that helps you.HTML Code:<a href="graphics/barrel.jpg" rel="lightbox"><img src="graphics/barrel.jpg"
daniel
I do have an empty anchor immediately proceeding each image, like <a name="barrel"> </a> for my index links to jump to. Tried removing it from one image and saw no change. Could those anchors have any negative effect?
Any other suggestions?
This hover is not part of lightbox but it is for image handler that you also have installed...and as far as I can tell and what they have stated it does not work for the main product image as part of the pack. probably since that one is large enough, hopefully to not need it and it is the one that can be clicked for a larger view vs the ones on the product listing pages.
got it to almost work...course since I do not have the image in my store it just hangs but you can try this:
use the code at the beginning
then at the end of the image link add the </a> and see if that helps. I do not know if it is an external page you have or if you have inserted the information into the ez pages area itself but give it a try.Code:<a href="images/name-of-image.jpg" rel="lightbox">
however you may need to play with the images/ part since you do not have the images in the main images folder but your templates images folder
That's exactly what I do have. (He goes to look again, riddled with self doubt, though he's SURE that's what he typed.) Yep, what I got. Here's first image tag...
Code:<a href="images/barrel.jpg "rel="lightbox"><img src="images/barrel.jpg" width="300" border=0 ></a>
Notice I've moved pics from directory "graphics" (on the same level of dir tree as "images" to dir "images". They are in main template folder. Have also added _MED and _LRG suffixed versions of the pics in their respective directories.Quote:
however you may need to play with the images/ part since you do not have the images in the main images folder but your templates images folder
Oh yeah, someone asked the question if this was internal link. Nope, pasted the code into ez pages editor. Should I try making a separate page and use an internal link? Can I steal the javascript info for the header from - "view page source"? Do I need that in the header if it loads in the main page? Won't that language be called with header template?
You can tell how overwhelmingly I'm out of my depth here! Appreciate your patience.
the source code I played with was from your custom page and it listed them as being in the template/images folder...hmmm
with the IH2 imstalled you may need to remove the _MED and _LRG from the names of the images...it names them with _01 and so forth for each additional image, it also used the bmz_cache folder to store its images and ignores the Larg and Med folders.
not sure if LB ignores them too or just goes to the image link....maybe not truncating the link for the actual image???
Quote:
Oh yeah, someone asked the question if this was internal link. Nope, pasted the code into ez pages editor.
this is how i tested it by putting it directly into the ez page spot, but as I said...it just hangs cause I do not have the image nor that folder but the LB did come up.
I am not that experienced either...only been playing with css and php for a few years now but do try to rearrange and fix some things on my own test store.Quote:
Should I try making a separate page and use an internal link? Can I steal the javascript info for the header from - "view page source"? Do I need that in the header if it loads in the main page? Won't that language be called with header template?
You can tell how overwhelmingly I'm out of my depth here! Appreciate your patience.
I will try downloading the image then setting the path to my stor to see if it do indeed work or not.
get back to you
just tried it on my test store
http://fantasiesrealm.com/market2/in...age=page&id=24
on the shelf image and it works
Well this is great! Got the onClick behavior working. I thought the onHover behavior was a feature of zen Lightbox not IH. But I did figure out a work around. Stole the code from "View Source". This -
And altered it to this -Code:<img src="bmz_cache/b/b5233a7cfa57af0be9130f5763986905.image.150x99.jpg" alt="81" title=" 81 " width="150" height="99" style="position:relative" onmouseover="showtrail('bmz_cache/3/3ece05810123fa0c4d2a17b727d91e63.image.300x199.jpg','81',150,99,300,199,this,0,0,150,99);" onmouseout="hidetrail();" />
In case someone as incompetent as me stumbles across this thread, some detail. Path to image follows <img src= and showtrail( . First pair of numbers in string are width and height of image as displayed (the 200, 150). I'd constrained image size with width="200". Next two numbers are full size of image (400,300) and the last two original width and height again. Assume you could also call a larger version with a different path in the showtrail info.Code:<img src="images/quarter_sawn.jpg" alt="quarter_sawn.jpg" width="200" style="position:relative" onmouseover="showtrail('images/quarter_sawn.jpg',' ',200,150,400,300,this,0,0,200,150);" onmouseout="hidetrail();" />
Sorry if this seems like kindergarten to some of you old hands, but I had to puzzle this all out for myself. Trying to save someone else the same frustration. Love searching the threads and finding someone dealing with your issue, but their last post is "Fixed it!" with never a clue as to how. Trying to be a bit more helpful than that.
The good news is - we finally kicked it's little ######## and got the desired result. Thanks for everyone that offered help and advise. REALLY appreciate your time and effort.
yay for your sugar. don't it feel grand when you figure out sumpin on your own and it works.
glad you posted how you fixed but me is a big dodo and need what file to add it to...I will keep a copy of this work around should I ever need it for someone else's store.
Yeah it do. And so far, it's always happened before I shoot myself in total frustration!
Sorry. Trying not to talk down to this technically savvy crowd. Doctored code above simply is used to position your image on the page. It is an image tag with the necessary java script embedded within.Quote:
glad you posted how you fixed but me is a big dodo and need what file to add it to...I will keep a copy of this work around should I ever need it for someone else's store.
Just put that line where you want your pic. Make sure your path to the image is correct in both places. Fix the number string to match the dimensions of your pic. Two places for the original size, one for the "zoomed" size. And you're good to go.
Hope that walked the fine line between treating you like an idiot and assuming you know more than you do! Hard to do sometime.
Thanks again for your tremendous efforts on my behalf. I couldn't begin to do this without benefiting from the knowledge and mistakes of others.
Appreciate it.