Can i code it so the other javascript files are only loaded on the index page and lightbox is loaded on the other pages. There is someting with them that does'nt work together so.
Can someone help me out
Printable View
Can i code it so the other javascript files are only loaded on the index page and lightbox is loaded on the other pages. There is someting with them that does'nt work together so.
Can someone help me out
I fixed the error message just had a .php file in the jscript folder so now it's only 1 js file that does'nt work with lightbox can someone help me out?
I'm using 1.3.9f and am having trouble getting this module to work.
I've installed it with no errors and had no file conflicts. All the includes seem to happen on the pages & when I load up the products_info page for a product and inspect the page using firebug I can see that the links for the image are being created by zen lightbox. e.g:
but when I click on the image it just opens the large image in the window. I have to click back in the browser to go back to the product_info page.Code:<script language="javascript" type="text/javascript"><!--
document.write('<a href="images/large/10/067_Image_0002_LRG.jpg" rel="lightbox-g" title="Food Tray Dispenser (16 Tray)"><img src="images/10/067_Image_0002.jpg" alt="Food Tray Dispenser (16 Tray)" title=" Food Tray Dispenser (16 Tray) " width="150" height="100" /><br /><span class="imgLink">Click to enlarge</span></a>');
//--></script>
<noscript>
<a href="http://www.actionaidsaustralia.com/index.php?main_page=popup_image&pID=21025" target="_blank"><img src="images/10/067_Image_0002.jpg" alt="Food Tray Dispenser (16 Tray)" title=" Food Tray Dispenser (16 Tray) " width="150" height="100" /><br /><span class="imgLink">Click to enlarge</span></a></noscript>
</div><!--eof Main Product Image-->
I've noticed a few on this thread have had this problem but I can't see a solution???
We are using the large image suffix feature of zen cart e.g imagename_LRG.jpg...don't know if this doens't work with zen lightbox???
url to a demo product is:
http://www.actionaidsaustralia.com/i...ducts_id=21025
thanks,
Same question here. Didn't see an answer to it. Anyone having luck with getting gallery mode to include both product images and other images in sideboxes etc?Quote:
Is there any way to get the gallery mode to work on the main product image AND on the other images on the page? Please help :clap:
Slimbox 1.67 is what's in zen lightbox which uses mootools library. If your site is using jquary library, the two don't mix well. I think there was a walk around back some posts.... not sure why. Best answer is to upgrade Slimbox to version 2.0 which makes use of the jquary library instead of Mootools.
Hi Everyone,
I have just installed this and everything is functioning correctly on the site but I don't have any controls in Admin. I've checked the DB and all the entries from the SQL file are there, is there something else I am supposed to do?
I am running the Classic green template almost straight out of the box, apart from a sales reporting Mod this is the only other Mod installed.
Thanx in adv,
Bob
Exactly the same problem as Bob by the sounds of it.
Installed as per the instructions, lightbox appears in the admin but when I click on it nothing in there to do?
When I added the sql patch it took me to a page error 404 .... is this normal?
So what is the problem here?
running zen cart 1.38a
Have done a restore on my zen cart and the lightbox still remains in the admin??
How do you remove this?
Managed to remove it .... unsure why this is not working though?
tried installing this again, no luck. Does not work!
there is a php file included in the download files that is outside the includes folder...where the hell does that go as there is nothing in the instructions that mention this file?
Is there anyone that can help with this please ?? :clap::clap:
the read me tels you that the loose file is for adding to some folders.
when you installed it did you make certain you installed the files from the folders in the zip to the exact same folders in the server?
a link would be really helpful too but if you let me see i might be able to help
sent you a pm darkangel
Darkangel.... unsure where you gone?
I have installed the faul slimbox version with no probs, uploaded the sql file and this uploaded as it should rather then a 404 page error on this version?
The only thing I need to do now is work out how to add additional images or a gallery of images so customer can click next / previous etc.
After a few trials I've managed to install the SQL patch correctly and also installed all the files in the right folders. However, when I click on any photo on my site I only get a white window and has to reload the page to get rid of it.
What have I done wrong ?
My site is www.PUREchocolatetruffles.co.uk.
Any help would be very welcome. Thanks.
Kim
I found the error. Had to delete remains from a mootools_on_product_info installation. Sorry to have bothered you.
Kim
For all those with jquery issues......mootools has a dollar safe mode now http://mootools.net/blog/2009/06/22/...lar-safe-mode/
Thank you, I followed your tutorial and uploaded as you decribed but can not get LIghtbox to work
this is the link I have on the gallery (ez)page
<a href="http://stainlesssteelshoulderscrew.com/images/slottedSS.jpg" rel="here is my caption">My Image</a>
additionally I uploaded the javascript to the "conditions page"
and it gave me a blank page(I removed it)
please advise:smile:
make double sure you put the files in the correct places on your server, please.
do you have a different theme other than the classic one---yes---then the template files need to go into that folder not the default one too
the is one file you may need to merge with the original one too and then there is the additional pages file that needs to go into a foler with the name of your template too.
the file for it to work in the different pages needs to be added to each page folder you want it to show in...like the download pages, shopping cart and so on.
Hello and congratulations to Alex for the excellent Zen Lightbox mod.
I installed the version v1.5 on v1.3.9f zen cart, and everything works except for the page info product:
clicking on the image (image_MED.jpg) opens in the lightbox the same image and not the great (image_LGR.jpg).
I do not know if I did not understand how it works or if I need to use
image_LGR.jpg only or if there is some problem.
Can somebody help me?
P.S. I searched the forum but I could not find the right thread.
I am new to Zen-Cart.
I have installed this add-on and I have also installed this addon
http://www.zen-cart.com/index.php?ma...roducts_id=672
I have read the whole thread but I cannot find how to add multiple images to a product. Anyone can help?
Thanks.
I use small and large.... never had a need for medium.. it does work with small and large... we can't tell if you have a problem without something to look at...
At the top of the forum, links to tutorials... lots of good info... one on using additional images takes a bit to read it...https://www.zen-cart.com/tutorials/index.php?article=58 and follow it, once additional images is working right, then lightbox takes whats working and displays it.
[QUOTE=davewest;949393]I use small and large.... never had a need for medium.. it does work with small and large... we can't tell if you have a problem without something to look at...
thank,
you can look here: http://www.napolistore.it/index.php?...roducts_id=182
I put the small image in: images/myimage.jpg and the large in: images/large/myimage_LRG.jpg
certainly something wrong
The tutorial for images takes a reading or two to get it, but if you don't get things to work before lightbox, it seems to be a problem with lightbox when its not.
Think of it this way may help.... you need a container to hold the images you plan on using for a product type.... say PRODUCTS or AUCTIONS...
your small images would then be..
images/PRODUCTS/12324.jpg
your medium
images/medium/PRODUCTS/12324_MED.jpg
your large
images/large/PRODUCTS/12324_LRG.jpg
same with auction images
your small images would then be..
images/AUCTIONS/12324.jpg
your medium
images/medium/AUCTIONS/12324_MED.jpg
your large
images/large/AUCTIONS/12324_LRG.jpg
That's basically what I did... except for the medium... think the tutorial also talks about dropping everything into one folder as long as the _LRG _MED is on the files works too, but I like keeping mine as above...
To test to see if all is working right as should... turn off scripting and the normal popup should work... check the image file name.
Great add-on and got it working on 2 different stores. Cannot get it to work on ezpages, however? I know it says to add the jscript_zen_lightbox.php file to the file in modules>pages but there is no file for the ezpage folders I created? Any ideas? Thanks!
Hi, i discovered the same thing today, when i updated Chrome. In the others browsers work fine, like you said.
I have tried some tweaks and hacks but with no result.
The lightbox that you mentioned to work outside off Zen Cart does not relly on MooTools as Zen LightBox.
I will do some more digging to see whats about the Moo tools .JS that Chrome doesnt like or maybe its a bug from Chrome ?
Best regards, Zoli.
Hi,
I have a new site (link below) and I have installed a script which you can see on the right side. Now this is a Java Script. If I remove that java script Light Box works without any problem but script doesn't.
If I keep the script the lightbox breaks and images open in plain white window, which can be seen on the site at the moment.
Any help as to how can I keep both scripts ?
Thanks
Site here ------ http://bit.ly/9flPfh
Bump!!!!
Seems that the zen lightbox does not work with all browsers. It does not load the picture, just displays an empty white box with the following browsers I tested:
Opera 9.51
Google Chrome 7.0.517.41
How to correct this? I would think that I have to remove Zen Lightbox if this issue can not be solved.
The idea should be the same as any other page.... load the script and call to zen_lightbox(url, description, options);
maybe something like..
I've used the same idea on other pages on my site...Code:<?php
require_once(DIR_FS_CATALOG . DIR_WS_CLASSES . 'zen_lightbox/slimbox.php');
require_once(DIR_FS_CATALOG . DIR_WS_CLASSES . 'zen_lightbox/autoload_default.php');
?>
if (ZEN_LIGHTBOX_GALLERY_MODE == 'true' && ZEN_LIGHTBOX_GALLERY_MAIN_IMAGE == 'true') {
$rel = 'lightbox-g';
} else {
$rel = 'lightbox';
}
?>
<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>
I guess after Chrome 4 it stop working... until Chrome is fixed, you could add AppleWebKit to the list checking for non-DOM ready browsers.
in... includes\classes\zen_lightbox\autoload_default.php
It works with Opera/9.80 (Windows NT 5.1; U; en) Presto/2.6.30 Version/10.63Code:if (!/android|iphone|ipod|series60|symbian|windows ce|AppleWebKit|blackberry/i.test(navigator.userAgent)) {
window.addEvent("domready", Slimbox.scanPage);
}
IE6-8
Firefox Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3
Thanks Dave but I'm not sure where to put the code? I'm pretty much of a newbie to php! Should there be a file for the ez-pages I'm trying to call to? I read somewhere that they are taken care of in the data base tables? I have searched all of the zen cart files and can't find them so far?:shocking:
Thanks for your patience!:cry:
I was wrong about Chrome... its Mootools that needs to be upgraded to version 1.3 in zen lightbox.... Chrome wont work with anything lower then 1.3 of Mootools....
Yes, ezpages are completely in the database... Just before you open or create a new ezpage, change the editor to 'Plain text'. That way you can enter html/php as you create your page.
Slimbox is only activated by the one file in the page folder, you need to place that code at the top of the ezpage. Then call the function at your image locations. Because I don't use ezpages, I'll have to play around with it a bit to see what else slimbox can do...
@john4803
Had to do some searching, thought the page had gone, but found it again here http://code.google.com/p/slimbox/wiki/MooToolsAPI
I've tried both ways and this works best for ez-pages instead of javascript.... should degrade to a popup or new window...
this work on Slinbox 1.71 and full mootools 1.3
On your ez-page do your links with the rel="lightbox" in the links for linghtbox to work...
if you want more then one image....Quote:
<a href="images/image-1.jpg" rel="lightbox" title="my caption">image #1</a>
Hopefully this helps... I should of searched for this page before now... also, the old Slimbox that came with this mod is not compatible with newer version of Mootools... many of the functions have changed in mootools This is Slimbox 1.71 setup to work as before with zen lightbox mod... you will also need to replace mootools in your template folder with a newer one... I use the full core 1.3 compacted compatible version..Quote:
<a href="images/image-1.jpg" rel="lightbox-atomium">image #1</a>
<a href="images/image-2.jpg" rel="lightbox-atomium">image #2</a>
<a href="images/image-3.jpg" rel="lightbox-atomium">image #3</a>
Attachment 8309
Dave West -
I am having a similar problem to ZeeRocK's .
Maybe an answer to mine would be an answer to his somehow...
I want to put a zen lightbox effect into my banner sidebox. I want to be able to click the image in the sidebox and have it open a larger image.
I can do that successfully if I put the jscript_zen_lightbox.php file into the includes/modules/pages/index folder.
BUT putting that jscript into the index folder causes an advanced product filter add on to not function in my tpl_index_product_list.php file.
So I've been trying to put the following into the bannerbox file somehow but dont know where to put it:
<?php
require_once(DIR_FS_CATALOG . DIR_WS_CLASSES . 'zen_lightbox/slimbox.php');
require_once(DIR_FS_CATALOG . DIR_WS_CLASSES . 'zen_lightbox/autoload_default.php');
?>
if (ZEN_LIGHTBOX_GALLERY_MODE == 'true' && ZEN_LIGHTBOX_GALLERY_MAIN_IMAGE == 'true') {
$rel = 'lightbox-g';
} else {
$rel = 'lightbox';
}
?>
<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>
Any help is much appreciated!
UPDATE:
ZeeRock,
try installing fual_slimbox.v0.1.5 . Follow the instructions for Zen Lightbox 1.4 users . I have ZL 1.5 but it worked fine for me.
My jscript problem disappeared with the installation.
Note:
I had to remove the ZL css in order for the styling to look right in the new fual pop up windows.
Hope it works for you! I've been banging my head on this --what should have been a very simple --thing for days.
I also noticed this Chrome7 problem.
Where's the problem? Why it doesn't work?
Is this ZL still developed or we should migrate to alternative?
I just successfully upgraded my zen lightbox by opening the slimbox.php file and upgrading the slimbox code to slimbox version 2 for jQuery rather than MooTools. I'll get a link up for the fix as soon as i've tested that the lightbox options are working (i think they are just don't want to pass on lousy code). My Chrome 7 issues is now gone though. :clap:
Go to Mootools web site, download 1.3 compacted, rename it to something like 'jscript_mootools-1.3.js' replace mootools in your template jscript folder... download the zip I uploaded some posts back, unzip and replace the one in \includes\classes\zen_lightbox\slimbox.php and that should do it...
Fuel had a even older version of Slimbox then zen lightbox did.... not sure if it was updated...
Slimbox 2 works grate with the jquery library... same thing, edit the slimbox.php to do the jquery calls using the php coding like before and all should work the same.... I have other scripts using the mootools library is why I'll stay with it...
I am having the same problem with Google Chrome 7.0.517.41. I tried to follow this thread and fix it, but Im not sure where you get the mootools update from. On their site (http://mootools.net/download) downloading "MooTools Core 1.3 with compatibility" gives me one file called "mootools-core-1.3-full-compat.js", but in Dave's steps it says "replace mootools in your template jscript folder". I have 2 files in my "/public_html/includes/templates/CUSTOM/jscript" folder called "zen_lightbox_mootools_custom.js" and "zen_lightbox_mootools_default.js". Which one do I replace, or am I doing something wrong?
Can someone write how to do this in a clear step by step guide, because this thread is hard to follow.
Thanks!
What I did was open the mootools1.3.js file (in Dreamweaver), copy the code and replace the code in both the mootools_custom.js and motools_default.js. Then upload these two new files to your server to replace the old ones.
After that, download the zip file from Dave and replace the slimbox file. Worked for me. Hope that helps.
Thanks Sethaholic, that worked :)
Not work for me . please help
I tried this :
1. download mootools-core-1.3-full-compat.js
2. replace zen_lightbox_mootools_default.js , zen_lightbox_mootools_custom.js from /include/my_tmplate/jscript with downloaded .js and change the name like before.
3. download slimbox.zip from previus page dave's post and overwrite the initial one one /includes/classes/zen_lightbox
Doesn't work with chrome .
you can take a look here http://www.ducashop.ro/ducashop/inde...oducts_id=1033
is working ! Browser cache problem ...
Just updated my site and now it's fine.
Should we expect 'genuine' fix for this one or there's nobody to do it?
After i upload all the file and try to send the sql it pop out this message
1146 Table 'spreecha_zc1.configuration_group' doesn't exist
in:
[SELECT @cgi := configuration_group_id FROM configuration_group WHERE configuration_group_title = 'Zen Lightbox';]
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.
Anyone can help me....thank you
when I try inserting the sql through admin of the store it never does it right...it claims to be successful but it will give me that message at times too sooooo
I go directly to myphpadmin and insert any sql there...
remember to add the prefix to your tables if you have any.
I suggest to use the store admin to remove the sql from your database then go to myphoadmin ---from your servers control panel ---- and insert the sql there.
Hello,
Thank you for your great contribution.
I have a small problem with lightbox on reviews pages. I have a website in 5 languages (http://www.olaf.legnica.pl) and the standard language is Polish. There are 3 reviews, all in Polish. If a review is displayed in Polish (http://www.olaf.legnica.pl/index.php...6&reviews_id=3), everything is OK (see pic. 1), but after having switched to another language I have an unnecessary text on the left border of the image (see pic. 2). Moreover, it stays when I switch back to Polish (http://www.olaf.legnica.pl/index.php...oducts_id=1886).
How to get rid of that?
Best regards,
Stan
Please let me know when you figure it out, I'm having the same problem and have spent the last two days trying to figure out why. I ended up changing the name of the
lightbox_lightiningload.js to something else until I can figure out why that particular file gives a security warning. I really love the lightbox...
:dontgetit
Hi everyone hope you can help please,
I did what dave said got the new mootools and replaced (overwrote) the code inside both the zen_lightbox_mootools_default.js and zen_lightbox_mootools_custom.js with the code in the new mootools 1.3 files plus uploaded the new slimbox.php file from dave's earlier post.
It isn't working.
It doesnt make sense to me to overwrite all the code with the new code since the older files were a little different.
Can someone please post here the updated zen_lightbox_mootools_default.js and zen_lightbox_mootools_custom.js
that already have the new mootools correct code in them and then i can simply upload them and job done
Or at least tell me what parts of those files need replacing.
cheers!
The two files need to be deleted... zen_lightbox_mootools_default.js and zen_lightbox_mootools_custom.js
both are the older versions of mootools and not needed once you place the mootools 1.3 into the folder.
One thing... I use mootools for other things... like my sidebox menu... thous the jscript_mootools.js naming. One advantage to this, lightbox can work across the site by just adding the rel="lightbox" to a image link. If your not using it across the site, then replacing one of the two files would work too...
Dave GOD BLESS YOU for helping on this thread but I cant understand your English or your meaning... Can anyone translate for me what Dave is saying????:wacko:
I DELETED the two older zen_lightbox mootools files and replaced just with ONE mootoos file... it doesnt work...
Why should it work! the top of Daves own Slimbox.php says
So OBVIOUSLY the zen_lightbox is calling up those specific files.PHP Code:
{ echo 'zen_lightbox_mootools_custom'; } else { echo 'zen_lightbox_mootools_default'; } echo '.js"></script>';
PLEASE CAN ANYBODY THAT HAS THIS WORKING ON THE LATEST CHROME POST ACTUAL COPIES OF THE J-SCRIPT FILES HE USES WITH ZEN_LIGHTBOX AND A COPY OF HIS SLIMBOX.PHP FILE
Daves ones dont work and I aint a programmer.....FILES FIX PLEASE!!!!
Ok,
I tried the other method using Slimbox 2.0 but only had partial success. Now the lightbox effect works in all browsers including chrome but it no longer displays the "close" link at the bottom or the "next"/"previous" at the top.
I suspect this maybe a CSS issue ill continue testing.
In the meantime allow me to elaborate on what I did.
I left all the files in my jscript folder INTACT, all the old mootools files zen lightbox uses and calls up from slimbox.php file.
What I did change however is the slimbox code inside the slimbox.php file and the result looks like this:
If I still go ahead and remove the mootools files from the jscript folder it stops working. So although the new slimbox uses the jquery library, Zen Lightbox still seems to need and require the old mootools files. Needless to say Dave's fix didnt work for me, the great mage speaks in cryptic tones not decipherable by a dummy like me. Dave write us dummies a proper step by step post explaining the "obvious" and including some files pleeeez:unsure:PHP Code:
<?php
/**
* Zen Lightbox
*
* @author Alex Clarke ([email protected])
* @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: slimbox.php 2008-12-15 aclarke $
*/
echo '<script type="text/javascript" src="' . $template->get_template_dir('.js', DIR_WS_TEMPLATE, $current_page_base, 'jscript') . '/'; if (ZEN_LIGHTBOX_TRANSITION_EFFECT != 'false') { echo 'zen_lightbox_mootools_custom'; } else { echo 'zen_lightbox_mootools_default'; } echo '.js"></script>';
?>
<script language="javascript" type="text/javascript"><!--
/*
Slimbox v2.04 - The ultimate lightweight Lightbox clone for jQuery
(c) 2007-2010 Christophe Beyls <http://www.digitalia.be>
MIT-style license.
*/
(function(w){var E=w(window),u,f,F=-1,n,x,D,v,y,L,r,m=!window.XMLHttpRequest,s=[],l=document.documentElement,k={},t=new Image(),J=new Image(),H,a,g,p,I,d,G,c,A,K;w(function(){w("body").append(w([H=w('<div id="lbOverlay" />')[0],a=w('<div id="lbCenter" />')[0],G=w('<div id="lbBottomContainer" />')[0]]).css("display","none"));g=w('<div id="lbImage" />').appendTo(a).append(p=w('<div style="position: relative;" />').append([I=w('<a id="lbPrevLink" href="#" />').click(B)[0],d=w('<a id="lbNextLink" href="#" />').click(e)[0]])[0])[0];c=w('<div id="lbBottom" />').appendTo(G).append([w('<a id="lbCloseLink" href="#" />').add(H).click(C)[0],A=w('<div id="lbCaption" />')[0],K=w('<div id="lbNumber" />')[0],w('<div style="clear: both;" />')[0]])[0]});w.slimbox=function(O,N,M){u=w.extend({loop:false,overlayOpacity:0.8,overlayFadeDuration:400,resizeDuration:400,resizeEasing:"swing",initialWidth:250,initialHeight:250,imageFadeDuration:400,captionAnimationDuration:400,counterText:"Image {x} of {y}",closeKeys:[27,88,67],previousKeys:[37,80],nextKeys:[39,78]},M);if(typeof O=="string"){O=[[O,N]];N=0}y=E.scrollTop()+(E.height()/2);L=u.initialWidth;r=u.initialHeight;w(a).css({top:Math.max(0,y-(r/2)),width:L,height:r,marginLeft:-L/2}).show();v=m||(H.currentStyle&&(H.currentStyle.position!="fixed"));if(v){H.style.position="absolute"}w(H).css("opacity",u.overlayOpacity).fadeIn(u.overlayFadeDuration);z();j(1);f=O;u.loop=u.loop&&(f.length>1);return b(N)};w.fn.slimbox=function(M,P,O){P=P||function(Q){return[Q.href,Q.title]};O=O||function(){return true};var N=this;return N.unbind("click").click(function(){var S=this,U=0,T,Q=0,R;T=w.grep(N,function(W,V){return O.call(S,W,V)});for(R=T.length;Q<R;++Q){if(T[Q]==S){U=Q}T[Q]=P(T[Q],Q)}return w.slimbox(T,U,M)})};function z(){var N=E.scrollLeft(),M=E.width();w([a,G]).css("left",N+(M/2));if(v){w(H).css({left:N,top:E.scrollTop(),width:M,height:E.height()})}}function j(M){if(M){w("object").add(m?"select":"embed").each(function(O,P){s[O]=[P,P.style.visibility];P.style.visibility="hidden"})}else{w.each(s,function(O,P){P[0].style.visibility=P[1]});s=[]}var N=M?"bind":"unbind";E[N]("scroll resize",z);w(document)[N]("keydown",o)}function o(O){var N=O.keyCode,M=w.inArray;return(M(N,u.closeKeys)>=0)?C():(M(N,u.nextKeys)>=0)?e():(M(N,u.previousKeys)>=0)?B():false}function B(){return b(x)}function e(){return b(D)}function b(M){if(M>=0){F=M;n=f[F][0];x=(F||(u.loop?f.length:0))-1;D=((F+1)%f.length)||(u.loop?0:-1);q();a.className="lbLoading";k=new Image();k.onload=i;k.src=n}return false}function i(){a.className="";w(g).css({backgroundImage:"url("+n+")",visibility:"hidden",display:""});w(p).width(k.width);w([p,I,d]).height(k.height);w(A).html(f[F][1]||"");w(K).html((((f.length>1)&&u.counterText)||"").replace(/{x}/,F+1).replace(/{y}/,f.length));if(x>=0){t.src=f[x][0]}if(D>=0){J.src=f[D][0]}L=g.offsetWidth;r=g.offsetHeight;var M=Math.max(0,y-(r/2));if(a.offsetHeight!=r){w(a).animate({height:r,top:M},u.resizeDuration,u.resizeEasing)}if(a.offsetWidth!=L){w(a).animate({width:L,marginLeft:-L/2},u.resizeDuration,u.resizeEasing)}w(a).queue(function(){w(G).css({width:L,top:M+r,marginLeft:-L/2,visibility:"hidden",display:""});w(g).css({display:"none",visibility:"",opacity:""}).fadeIn(u.imageFadeDuration,h)})}function h(){if(x>=0){w(I).show()}if(D>=0){w(d).show()}w(c).css("marginTop",-c.offsetHeight).animate({marginTop:0},u.captionAnimationDuration);G.style.visibility=""}function q(){k.onload=null;k.src=t.src=J.src=n;w([a,g,c]).stop(true);w([I,d,g,G]).hide()}function C(){if(F>=0){q();F=x=D=-1;w(a).hide();w(H).stop().fadeOut(u.overlayFadeDuration,j)}return false}})(jQuery);
// AUTOLOAD CODE BLOCK (MAY BE CHANGED OR REMOVED)
if (!/android|iphone|ipod|series60|symbian|windows ce|blackberry/i.test(navigator.userAgent)) {
jQuery(function($) {
$("a[rel^='lightbox']").slimbox({/* Put custom options here */}, null, function(el) {
return (this == el) || ((this.rel.length > 8) && (this.rel == el.rel));
});
});
}
OK, God forbid anyone should post here a PROPER solution to help others with the new chrome issue so after fiddling for 2 days I bring you here the proper working fully tested solution *no fiddling required*.
Get this file Attachment 8349
Upload to the following locations and replace existing files:
Replace slimbox.php in your
.../includes/classes/zen_lightbox
With the new slimbox.php file included in my ZIP
Replace stylesheet_zen_lightbox.css in your
.../includes/templates/YOUR_TEMPLATE/css
with the new stylesheet_zen_lightbox.css file included in my ZIP
copy the GIFS (photo) files to your
.../includes/templates/YOUR_TEMPLATE/images
THATS IT!!!
DONT TOUCH your JScript folder files!! - leave that for the wisecracks...
The only reason that this thread isnt FLOODED with people having this problem is simply because most haven't updated their chrome version.
Even I by total chance had to uninstall chrome and reinstall a new version to resolve unrelated issues and then my woes started with lightbox.
GOOD LUCK!! :clap:
Hello.
I have done the updates and works fine in chrome and firefox. However it no longer works in Internet Explorer 8.
Any advise?
Thanks...
Ive tried it on IE and it works fine....
It's strange since the whole issue was to do with chrome, IE and firefox even work without the fix...
I would say clear your cache and try again.
Did you always have the issue with IE or only after the fix?
Hello.
I actually did the previous update which is the one that I had problems in IE8. I just tried the update you posted and I can't get that to work in any browser
Did you keep a backup of your files before any fix was applied?
Please restore your files as before to the situation where basically everything works except on chrome.
Then apply my fix only and let me know how it goes,
cheers
Yes, I did do that but the pictures still come up not in a light box but in a new window :(
I was getting that as well, for a while... can you give me ftp access to inspect your files? its very hard to guess like this but I assure you everything should work right if you have only the original Zen Lightbox 1.5 files and then apply my fix only,
PM me
This solution did not work for me. Have the old files so I can easily revert but when I followed your instructions, it opens each image file in a window by itself not as the lightbox effect - is doing this on both Chrome and IE (didnt check FF but presume same).
Any ideas on this?? Any suggestion gratefully received.
cheers
Leah
Look, there are so many solutions posted here and many possible amendments to the files. At the point that you have tried to install my fix, just before, did everything work ok with the lightbox except that it wasnt working with chrome?
If the answer is yes then I really cant tell what is causing this without seeing your files.
If no, then make sure you download the lightbox 1.5 files again and overwrite your existing files and then do my little fix.
Again my fix assumes your only issue is chrome... which was the position I was in before managing this.
let me know,
Well mine didnt work for the past two weeks - then I left it to today, and it works. So Google must have fixed it.
I'm sure Dave's advice works great its just that I couldn't figure out his English.
If you or anyone would be kind enough to write a proper detailed step by step guide including some sample files all in one post perhaps other people would also benefit from this.
Just writing cryptic advise, getting confused questions, writing some cryptic answers and repeating the whole process until finally some people succeed, some people fail and some people despair isn't really that helpful, although any input is of course voluntary and very much appreciated but why not do it properly...:yes:
I can write what Dave's fix is:
1) replace includes/classes/zen_lightbox/slimbox.php with this slimbox.php from his previous post.
2) Download the mootools update here (http://mootools.net/download/get/moo...full-compat.js).
3) Rename mootools-core-1.3-full-compat.js to zen_lightbox_mootools_custom.js.
4) Make a copy of zen_lightbox_mootools_custom.js and rename it zen_lightbox_mootools_default.js.
5) Upload zen_lightbox_mootools_custom.js and zen_lightbox_mootools_default.js to replace these files in includes\templates\YOUR-TEMPLATE-FOLDER\jscript
I have a very strange probelm with this however. The fix works perfectly on my test site at www.mygamedemos.com/store but does not work on my main site usig the same method: http://www.cocobeau.co.uk I have checked all the filese many times. I dont know what the problem is.
Hi I did what you are saying which is basically replace the *content* of the custom.js file and the default.js file with the new mootools 1.3 file content. Then upload that slimbox file...
IT DOESNT WORK!!!! It makes no difference only makes things worst! If you will check the content of Dave's slimbox file and the new mootools you will see there is no relationship, Zen Lightbox defines and wants to use 2 unique mootools files and dave's solution gives it one!! Please don't take this the wrong way but do you really think the people who wrote Zen Lightbox are slightly retarded that they made 2 files for no reason? even not being a programmer I realise this....
In the end of the day that "solution" won't work on your real site.
Well my solution isn't mine at all its that guy from before that upgraded to slimbox 2 that uses the Jscript library.
BUT HE DIDNT SAY HOW TO DO IT! OR INCLUDE FILES!!!:blink:
I give people an easy option as long as they didnt spoil their original lightbox files with other "solutions".
Having said all of that I commend you :bigups:for taking the time to confirm what dave meant in the solution if that's indeed what he meant (he told me DIRECTLY you can DELETE the old mootools he never said rename them).
We may never know what he really means unless we learn his Mage language :P:huh:
To be more clear, the fix for me works on every browser for my test site at www.mygamedemos.com/store. However, with the same setup, it doesnt work on Internet Explorer 8.0.6001.18702 for my main site www.cocobeau.co.uk
That is the name of the file. I renamed it to something else, which disabled the Zen Lightbox in my site, but got rid of the security warning. If I turn off Zen Lightbox in the admin panel, the warning still comes up on any of the pages that display images using the Zen Llightbox. I don't want to get rid of the files just in case someone can find a cause for the security warning(s).
The post I responded to was way back in this thread, but it does appear to be that file that is causing the problems. There are no hard coded http://'s anywhere on the site, or in the files for Zen Lightbox. The host I have provides ssl to the entire site only, so if I use it there are IE security warnings. I use Lightbox on another page of the site for a carousel, and there are no security warnings on that page.
The file is in /includes/templates/the name of my template/jscript/
in that folder are the
lightbox.js
lightbox_effects,js
lightbox_prototype.js
lightbox_scriptaculous.js
zen_lightbox_mootools_custom.js
zen_lightbox_mootools_default.js
lightbox_lightningload.js
/*
* load lightbox before image loading is complete:
* http://dean.edwards.name/weblog/2006/06/again/
*/
function init() {
// quit if this function has already been called
if (arguments.callee.done) return;
// flag this function so we don't do the same thing twice
arguments.callee.done = true;
// kill the timer
if (_timer) {
clearInterval(_timer);
_timer = null;
}
// load the lightbox before images are loaded
initLightbox();
};
/* for Mozilla */
if (document.addEventListener) {
document.addEventListener("DOMContentLoaded", init, false);
}
/* for Internet Explorer (removing the comments does not fix the problem or change anything...)*/
/*@cc_on @*/
/*@if (@_win32)
document.write("<script id=__ie_onload defer src=javascript:void(0)><\/script>");
var script = document.getElementById("__ie_onload");
script.onreadystatechange = function() {
if (this.readyState == "complete") {
init(); // call the onload handler
}
};
/*@end @*/
/* for Safari */
if (/WebKit/i.test(navigator.userAgent)) { // sniff
var _timer = setInterval(function() {
if (/loaded|complete/.test(document.readyState)) {
init(); // call the onload handler
}
}, 10);
}
/* for other browsers */
window.onload = init;
:wacko:
What values are allowed in the admin "Resize Transition" field, other than FALSE?
Are there different options for the animation effect when the box opens?
Monsunemoon is hitting the nail right on the head - the correct renaming is important. The file includes/classes/zen_lightbox/slimbox.php specifically calls for these java script files:
This works a treat on both my local and live installs in the 3 major browsers of their individual latest versions. :yes:Code:
echo '<script type="text/javascript" src="' . $template->get_template_dir('.js', DIR_WS_TEMPLATE, $current_page_base, 'jscript') . '/'; if (ZEN_LIGHTBOX_TRANSITION_EFFECT != 'false') { echo 'zen_lightbox_mootools_custom'; } else { echo 'zen_lightbox_mootools_default'; } echo '.js"></script>';
Mootools is where the effects are coming from... If you followed my 'English' and upgraded to the full mootools, then Fx.Transition is available to you... If you stuck with the old custom version of mootools that came with ZenLightbox, then none.
Just tried this one and it works grate
Fx.Transitions.Elastic.easeInOut
Possibles easeIn, easeOut, easeInOut
Types... linear, quad, cubic, quart, quint, pow, expo, circ, sine, back, bounce, elastic
Easier to Google for Fx.Transitions then to get into code here... with the full mootools build, it's all open... I've tried bounce and elastic they work, some of the others may slow Slimbox down.... By the way... Slimbox is still an active project in Google groups and coders... supported in both jQuery and Mootools libraries.
OK, I've jsut installed Fual Slimbox as per the file:///C:/00000000/superfancy%20files/fual_slimbox.v0.1.5/documentation/readme.html
Since I already had Zen Lightbox 1.5 installed, I've also overwritten all the patch files using the fual_slimbox.v0.1.5\zen_lightbox.patch.
I've installed the SQL patch and enabled fual slimbox. However, it's not working at all.
Any recommendfations?
(attempted install is on www.superfancy.co.uk and zen cart version is 1.3.8a)
Here is the link: http://mootools.net/download
Seth&Dave,
Thanks for your help. I was struggling to get Chrome to work with lightbox, but after reading this thread you guys made my day.
TJ
The fix stated earlier worked like a champion for myself.
I have a slight concern with the size of the:
zen_lightbox_mootools_custom.js
The file weights in at a pretty hefty 137kb but optimizing it can get you to the 100kb mark.
I have no clue regarding Javascript and to be honest it isn't something on my near sighted to do list to start learning. Theoretically could this file be trimmed substantially or is everything in it a core function?
Great, I'll get involved in the compact version...
I suspected it would all be required - but it is always nice to know it is rather than to guess, not that I would know the first thing about modyfying it even if some of it wasn't necessary :shocking: It most certainly looks like a heck of a lot of work that has gone into it!!!
Thanks for getting back to me I appreciate it..
Hi Dave,
I have done your fix, but now in all browsers, the large image link just opens a new page with the image. Lightbox is not functioning at all. I am using Zen-Cart v1.3.9g. What versions have you tested your fix on? I'm not sure what else to try, but I need to get this working ASAP!
Thanks,
Danielle
zen cart 1.3.9.d upgraded from 1.3.8a
I received a notice from a customer that my lightbox (zen lightbox 1.5) was hanging in their google chrome browser when they clicked on a product picture. I checked it with my google chrome and sure enough it was hanging in mine too. I removed the lightbox and tried different versions with no luck so I went back to my original zen lightbox and now that won't work right.
I had it installed on zen 1.3.8a working good and carried it over during update to zen 1.3.9d but now that's it has been removed and trying to put it back it just won't work right in any browser. I click on an image and I can see the lightbox trying to open and then the image just pops out opening in the browser instead and then I have to click the browser back button to go back to my store.
I tried aozhaver's fix but it didn't make any difference to what is happening.
There are no debug files in my cache for a clue.
I searched this thread, but didn't find anything relevant.
We are using sub-categories as our product pages. Because of this, we put several images along with a description in the sub-category description box. It doesn't look like sub-categories have a folder in modules/pages to put the appropriate file. How can I get this lightbox code to work with my image code in the sub-category description?
I hope that is clear enough. Thanks for any help.
Hi Guys
Lightbox has been great, installed easily, works in all the browsererc and I have no problems except I get exactly the same problem in 'reviews', the code number in square brackets followed by a small piece of code example .[BRB 002]">
next to the image. You can see an example on my test site http://www.blackrunbikes.co.uk/mount...&products_id=2
The review page appears to use the same image code as all the other pages but only has this fault on the reviews page as far as i can tell
Any ideas or help would be great.
Kind regards
Steve
For those who fail to make it work after following Dave's instructions, remember to EMPTY your chrome browser CACHE after applying the fix. I had to do this in order to see the fix working! Thanks Dave.
yayyy! after taking a break and coming back and re-re-reading davewests directions and finally finding the slimbox zip that was posted I finally 'GOT IT' and my lightbox is now working in chrome. :clap: It was driving me nuts without my lightbox.
Thank you davewest!
For anyone else that finally discovers they or their customers have a problem with their stores lightbox in google chrome:
go here - http://mootools.net/download
and download the file - MooTools Core 1.3 with compatibility
Go to this post
http://www.zen-cart.com/forum/showpo...postcount=2139
and find near the bottom and download the slimbox.zip file
unzip the the slimbox.zip file and upload the slimbox.php file to \includes\classes\zen_lightbox\, replacing the existing one.
Open the MooTools Core 1.3 file in a text editor. Highlight and copy the code, then paste the code into the two files (removing the code that's in them)
/includes/templates/Your_Template/jscript/
zen_lightbox_mootools_custom.js
zen_lightbox_mootools_default.js
Hi Sickguy
Your post 'Re: Problem with images in reviews'
where are Dave's instructions you say I should follow, i can only see instructions for post related to 'Re: Zen lightbox chrome fix' which I do not have a problem with, my LightBox works fine in all browser. I just have aproblem with the images in Reviews which have unwanted text/code to the left of the image
Cheers
Steve