Zen Follower
- Join Date:
- Oct 2007
- Posts:
- 413
- Plugin Contributions:
- 0
Zen Lightbox addon [Support Thread]
ok, I finally got this working. Found out I had to add the rel="lightbox" to each image link for it to work.
Views: 953,017
Zen Follower
ok, I finally got this working. Found out I had to add the rel="lightbox" to each image link for it to work.
New Zenner
i just installed ZLB on my site and it's work fine... but there is small problem ... my product page look like this :-

after i upload = tpl_modules_main_product_image.php
the product page is not as it was ???

my original ( tpl_modules_main_product_image.php ) file contain :-
<?php /** * Module Template * * @package templateSystem * @copyright Copyright 2003-2005 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: tpl_modules_main_product_image.php 3208 2006-03-19 16:48:57Z birdbrain $ */ ?> <?php require(DIR_WS_MODULES . zen_get_module_directory(FILENAME_MAIN_PRODUCT_IMAGE)); ?> <div id="productMainImage" class="centeredContent"> <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> <noscript> <?php echo '<a href="' . zen_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $_GET['products_id']) . '" target="_blank">' . zen_image($products_image_medium, $products_name, MEDIUM_IMAGE_WIDTH, MEDIUM_IMAGE_HEIGHT) . '<br /><span class="imgLink">' . TEXT_CLICK_TO_ENLARGE . '</span></a>'; ?> </noscript> </div>what should i do to make it look as it is ... and make the main image work fine with the mod ??
you can check that on my site => https://www.srokey.info
Totally Zenned
I looked at this in Firefox, IE, Chrome, and Safari. They all looked the same - like you wanted it to look.
It appears you solved your own issue. If you're seeing something different when you look at it, that's a whole other issue unrelated to this mod.
Good luck and happy zenning :smile:
thunder2010:
i just installed ZLB on my site and it's work fine... but there is small problem ... my product page look like this :-
after i upload = tpl_modules_main_product_image.php
the product page is not as it was ???
my original ( tpl_modules_main_product_image.php ) file contain :-
what should i do to make it look as it is ... and make the main image work fine with the mod ??
you can check that on my site => https://www.srokey.info
Totally Zenned
It appears you solved your own issue.
Looks like he solved it by uninstalling Lightbox.
New Zenner
ScriptJunkie:
I looked at this in Firefox, IE, Chrome, and Safari. They all looked the same - like you wanted it to look.
It appears you solved your own issue. If you're seeing something different when you look at it, that's a whole other issue unrelated to this mod.
Good luck and happy zenning :smile:
Thank you for your replay :smile: ,But i didn't solve it yet. I only didn't replace my [ tpl_modules_main_product_image.php ] with the one come with the mod.
that's why i posted my [ tpl_modules_main_product_image.php ] contains so any one can tell me where to add the ZLB cod for this file in my file.
New Zenner
RescoCCC:
Looks like he solved it by uninstalling Lightbox.
It's great mod. and i didn't find one better than it. So it's still there :D , But it's only not working for the main image and work for all sup images.
Totally Zenned
thunder2010:
It's great mod. and i didn't find one better than it. So it's still there :D , But it's only not working for the main image and work for all sup images.
Ok, so is the issue a layout issue of the product page (as indicated by your screen shots in your initial post), or is the issue one of the lightbox not functioning correctly.
If it's a function issue, please list the specific issue you are experiencing, what you've done so far to troubleshoot it, and provide a link to the exact page where the problem exists
Totally Zenned
ScriptJunkie:
Ok, so is the issue a layout issue of the product page (as indicated by your screen shots in your initial post), or is the issue one of the lightbox not functioning correctly.
If it's a function issue, please list the specific issue you are experiencing, what you've done so far to troubleshoot it, and provide a link to the exact page where the problem exists
He's having a layout issue. If you check this product:
http://srokey.info/blackberry-storm-2-9550-unlocked-p-148.html
You'll see that the main image isn't using Lightbox, but Lightbox is working fine on the secondary images. That's because he went back to the original tpl_modules_main_product_image.php because the one that came with the mod messed up the layout.
Personally, I think it's just a matter of editing the file that comes with the mod in order to correct the layout.
New Zenner
RescoCCC:
He's having a layout issue. If you check this product:
http://srokey.info/blackberry-storm-2-9550-unlocked-p-148.html
You'll see that the main image isn't using Lightbox, but Lightbox is working fine on the secondary images. That's because he went back to the original tpl_modules_main_product_image.php because the one that came with the mod messed up the layout.
Personally, I think it's just a matter of editing the file that comes with the mod in order to correct the layout.
Yes, It's exactly as you say man.
I need some one to tell me how i can edit [ tpl_modules_main_product_image.php ] to don't miss my product layout.
when i upload the [ tpl_modules_main_product_image.php ] that comes with the mod it miss my layout and let the main image work in the mod as it should.
But if i didn't change it my product layout still as it is now but the main image not work with the mod.
So i need to make the main image work with the mod while keeping my product layout.
Totally Zenned
Actually, his lightbox isn't working on any of his images because it's not fully installed.
The functionality you see with the additional images zooming on mouseover is a function of the Image Handler mod - not this mod.
RescoCCC:
He's having a layout issue. If you check this product:
http://srokey.info/blackberry-storm-2-9550-unlocked-p-148.html
You'll see that the main image isn't using Lightbox, but Lightbox is working fine on the secondary images. That's because he went back to the original tpl_modules_main_product_image.php because the one that came with the mod messed up the layout.
Personally, I think it's just a matter of editing the file that comes with the mod in order to correct the layout.
Totally Zenned
Hi Thunder,
Although ZLB has changed the way your product page layout appears, your issue is really a page layout issue, rather than a ZLB support issue.
To ensure support of a general layout issue (even one caused by a mod), it is best to ask your question in the page layout section of the forum.
Although someone in this ZLB support thread may choose to provide assistance, they will be able to more easily do so if you reinstall the ZLB file that you've removed: tpl_modules_main_product_image.php
The kind of issue you're having is a really good example of why it's necessary to compare and merge common files before installing a mod.
By that I mean...any file that comes with a mod that has a duplicate in your store which you've already customized for function or layout (such as tpl_modules_main_product_image.php)... the mod file and your own customized file need to be compared to one another and their changes merged together into a single new file, so that changes from both files are saved.
Good luck and happy Zenning :smile:
thunder2010:
Yes, It's exactly as you say man.
I need some one to tell me how i can edit [ tpl_modules_main_product_image.php ] to don't miss my product layout.
when i upload the [ tpl_modules_main_product_image.php ] that comes with the mod it miss my layout and let the main image work in the mod as it should.
But if i didn't change it my product layout still as it is now but the main image not work with the mod.
So i need to make the main image work with the mod while keeping my product layout.
Totally Zenned
Actually, his lightbox isn't working on any of his images because it's not fully installed.
The functionality you see with the additional images zooming on mouseover is a function of the Image Handler mod - not this mod.
If you click the images they are using ZLB.
Zen Follower
Hi client is not using images so I wish to uninstall lightbox .. havent been able to find any instructions on how to do this. I know there is an uninstall sql but not really sure whether do this from my php my admin or from zen cart admin and not completely sure how to do it. Thanks for any instructions
Totally Zenned
RescoCCC:
If you click the images they are using ZLB.
Yes, but since ZLB isn't properly/fully installed (the common file has been replaced by his original), ZLB is not handling his images - Image Handler is handling is images and is responsible for the zoom effect on mouseover.
ZLB is not working at all on his site and will not work on his site until he properly installs it (replaces the file he removed).
Only once ZLB is properly/fully installed on his site will anyone be able to troubleshoot his layout issue.
Totally Zenned
Hi Amanda,
The first thing you need to do is find out what version of Zen Lightbox your client is using...as the uninstall sql will be version specific.
Next, visit the ZLB page of the community addon section of the forum. There you will see a list of ZLB versions, each with its own download link.
The versions are listed in chronological order, starting with the most recent version at the top. If your client is using an older version, scroll down until you find it.
Use the download link to grab the installation package zip file. The uninstall sql file will be in that package.
You can run the uninstall.sql either from the store admin or from phpMyAdmin. Some sites (including my own) have had trouble with this mod's sql files properly installing/uninstalling from the store admin and have had to run the file from phpMyAdmin.
If you know how and feel comfortable usingphpMyAdmin, I recommend doing it that way to avoid any snags.
Once you've run the uninstall sql file, simply delete the ZLB files. To know which files are the ZLB files, have a look at the Read_Me file that comes with the download pack.
Or - just read the Read_Me and follow the installation instructions in reverse :smile:
wotnow:
Hi client is not using images so I wish to uninstall lightbox .. havent been able to find any instructions on how to do this. I know there is an uninstall sql but not really sure whether do this from my php my admin or from zen cart admin and not completely sure how to do it. Thanks for any instructions
New Zenner
ScriptJunkie:
Yes, but since ZLB isn't properly/fully installed (the common file has been replaced by his original), ZLB is not handling his images - Image Handler is handling is images and is responsible for the zoom effect on mouseover.
ZLB is not working at all on his site and will not work on his site until he properly installs it (replaces the file he removed).
Only once ZLB is properly/fully installed on his site will anyone be able to troubleshoot his layout issue.
<?php /** * Module Template * * @package templateSystem * @copyright Copyright 2003-2005 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: tpl_modules_main_product_image.php 3208 2006-03-19 16:48:57Z birdbrain $ */ ?> <?php require(DIR_WS_MODULES . zen_get_module_directory(FILENAME_MAIN_PRODUCT_IMAGE)); ?> <div id="productMainImage" class="centeredContent"> <?php // bof Zen Lightbox 2008-12-15 aclarke
I solved the problem buy edit [ tpl_modules_main_product_image.php ]
the new file now contain :-if (ZEN_LIGHTBOX_STATUS == 'true') {
<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> <noscript> <?php echo '<a href="' . zen_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $_GET['products_id']) . '" target="_blank">' . zen_image($products_image_medium, $products_name, MEDIUM_IMAGE_WIDTH, MEDIUM_IMAGE_HEIGHT) . '<br /><span class="imgLink">' . TEXT_CLICK_TO_ENLARGE . '</span></a>'; ?> </noscript> </div>
if (ZEN_LIGHTBOX_GALLERY_MODE == 'true' && ZEN_LIGHTBOX_GALLERY_MAIN_IMAGE == 'true') {
$rel = 'lightbox-g';
} else {
$rel = 'lightbox';
}
} else {
}
?>
In fact the problem was in this line :-
<div id="productMainImage" class="centeredContent back">
I replaced it to be :-
<div id="productMainImage" class="centeredContent">
Also i removed some cods and edit the file to look like what i post and it work fine for me now.:clap::clap::clap:
Totally Zenned
Glad you figured it all out :smile:
thunder2010:
I solved the problem buy edit [ tpl_modules_main_product_image.php ]
the new file now contain :-In fact the problem was in this line :-
I replaced it to be :-
Also i removed some cods and edit the file to look like what i post and it work fine for me now.:clap::clap::clap:
Zen Follower
Hi I am using the latest version of light box 1.6.2 and had some difficulty installing it due to the fact that after following advice on forum about putting a prefix before database tables for added security I had to ring up my server provider and they walked me through it. Now my client does not want any product images and I am trying to uninstall lightbox but of course I am getting the same error message
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'uninstall.sql' at line 1
As there are only 2 lines in the uninstall file
DELETE FROM configuration WHERE configuration_key LIKE 'ZEN_LIGHTBOX_%';
DELETE FROM configuration_group WHERE configuration_group_title = 'Zen Lightbox';
I thought that there may be an easy way to insert the table prefix like this
DELETE FROM ???_configuration WHERE configuration_key LIKE 'ZEN_LIGHTBOX_%';
DELETE FROM ???_configuration_group WHERE configuration_group_title = 'Zen Lightbox';
but am a bit nervous about executing that command and would like your expert opinions.
New Zenner
wotnow:
Hi I am using the latest version of light box 1.6.2 and had some difficulty installing it due to the fact that after following advice on forum about putting a prefix before database tables for added security I had to ring up my server provider and they walked me through it. Now my client does not want any product images and I am trying to uninstall lightbox but of course I am getting the same error message
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'uninstall.sql' at line 1
As there are only 2 lines in the uninstall file
DELETE FROM
configurationWHEREconfiguration_keyLIKE 'ZEN_LIGHTBOX_%';
DELETE FROMconfiguration_groupWHEREconfiguration_group_title= 'Zen Lightbox';I thought that there may be an easy way to insert the table prefix like this
DELETE FROM
???_configurationWHEREconfiguration_keyLIKE 'ZEN_LIGHTBOX_%';
DELETE FROM???_configuration_groupWHEREconfiguration_group_title= 'Zen Lightbox';but am a bit nervous about executing that command and would like your expert opinions.
yes, Thant is right if you make prefix then you need to add it when you want to uninstall.
It 'll work fine if you do it
Totally Zenned
If you inserted a database prefix upon installation, then you must insert the exact same database prefeix upon uninstallation.
I don't know if your ??? are replacements for the prefix name you used, or if you literally mean to use ???.
The answer is, don't use ???. Use the exact same prefix you used to install when you uninstall.
wotnow:
Hi I am using the latest version of light box 1.6.2 and had some difficulty installing it due to the fact that after following advice on forum about putting a prefix before database tables for added security I had to ring up my server provider and they walked me through it. Now my client does not want any product images and I am trying to uninstall lightbox but of course I am getting the same error message
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'uninstall.sql' at line 1
As there are only 2 lines in the uninstall file
DELETE FROM
configurationWHEREconfiguration_keyLIKE 'ZEN_LIGHTBOX_%';
DELETE FROMconfiguration_groupWHEREconfiguration_group_title= 'Zen Lightbox';I thought that there may be an easy way to insert the table prefix like this
DELETE FROM
???_configurationWHEREconfiguration_keyLIKE 'ZEN_LIGHTBOX_%';
DELETE FROM???_configuration_groupWHEREconfiguration_group_title= 'Zen Lightbox';but am a bit nervous about executing that command and would like your expert opinions.
Fields marked required must be completed.
Tell staff why this post should be reviewed.