slimbox option in wpg2 3.07
philippe723
Joined: 2008-07-26
Posts: 3 |
![]() |
Hello, my website is www.dodaa.com My issue: I'm handling MANY photos per post, and slimbox, according to its documentation, should activate the effect upon clicking before all images are loaded. I have selected 'slimbox' under the wpg2 settings on the 'use internal lightbox script' dropdown, and reposted, yet, it still won't show the lightbox effect until allll the images are loaded. Does anyone know why this is, or have experience with the new version of wpg2 and its slimbox option? |
|
ozgreg
![]()
Joined: 2003-10-18
Posts: 1378 |
![]() |
Slimbox is most definitely meant to activate before page load finishes. I notice you have another JS active also on that page, could this JS be blocking the one page load event.. ____________________________________ |
|
OzDamian
Joined: 2008-04-30
Posts: 35 |
![]() |
Interesting!! There are a couple things I notice when looking at your site The page calls applesearch.init which is causing errors (undefined) <script type="text/javascript"> //<![CDATA[ window.onload = function () { applesearch.init(); } //]]> </script> These will most likely be unrelated to your slimbox but I thought I would mention them for you - There is the character " = " showing in the left frame, this could be a harmless typo, or it may be due to a bug, not closing tags etc. |
|
philippe723
Joined: 2008-07-26
Posts: 3 |
![]() |
Hi there, thanks for the quick response. So still troubleshooting Any other ideas? |
|
OzDamian
Joined: 2008-04-30
Posts: 35 |
![]() |
I have been having a play but haven't figured it out yet. I find if I stop the page loading before all the photos have loaded the slimbox scrip still works in IE but not in Firefox, yet if I don't stop the page loading I need to wait for the page and all thumbnails to finish loading before the script will work. Almost like the the JS is sent early but the browser doesn't let it run till it feels the page has finished I might set up a test site with out any other plugins to see how it goes. |
|
ozgreg
![]()
Joined: 2003-10-18
Posts: 1378 |
![]() |
Ok I think I understand what might be happening, and you can see this effect in FF3. From the slimbox site, "Slimbox is ready to launch as soon as the document is ready." which is the stage PRIOR to the loading of images, I get a slimbox effect on my blog prior to all the photos being loaded.. Sorry but I cannot support the actual slimbox script as I simply do not have the JS skills to do this however slimbox does have a google support group I noticed the script has been updated, you could try applying the updated JS. The other trick would be to switch your site quickly over to the Standard WP default theme and see if the slimbox will load then as I seen themes that block slimbox before.. ____________________________________ |
|
OzDamian
Joined: 2008-04-30
Posts: 35 |
![]() |
For me the problem is in the theme, haven't nutted out what exactly, but using a different theme solves the problem. EDIT: just to prevent confussion, theme = wp theme not g2 theme |
|
ozgreg
![]()
Joined: 2003-10-18
Posts: 1378 |
![]() |
OzDamian wrote:
For me the problem is in the theme, haven't nutted out what exactly, but using a different theme solves the problem. Love to know what exactly confuses Slimbox to prevent it loading. The other option is to also try changing to the lightbox scipt, which is the heavier cousin to slimbox but uses a different JS DOM object to load.. ____________________________________ |
|
OzDamian
Joined: 2008-04-30
Posts: 35 |
![]() |
The theme I use is Regulus, but I have made many changes to it over the past couple years. Note: I do use wp slimbox plugin, if I deactivate the plugin and select the use internal script option in wpg2/lightbox options the effects do not work at all, nor will lightbox internal script. |
|
ozgreg
![]()
Joined: 2003-10-18
Posts: 1378 |
![]() |
If you are using FF then grab the firebug add-in as it will help list all the DOM objects being loaded.. ____________________________________ |
|
OzDamian
Joined: 2008-04-30
Posts: 35 |
![]() |
Small update: First one. I modefide my theme sidebar.php file to add <div id="live"> <!-- Powered by: Crafty Syntax Live Help http://www.craftysyntax.com/ --> <script type="text/javascript" src="/live/livehelp_js.php?relative=Y&department=1&serversession=1&pingtimes=15"></script> <!-- copyright 2003 - 2007 by Eric Gerdes --> </div> Removing has fixed slimbox on wpg2 pages (NOTE: I use wp sidebar on wpg2 pages). On blog pages slimbox is still being delayed. |
|
OzDamian
Joined: 2008-04-30
Posts: 35 |
![]() |
Thanks ozgreg for the thumbs up on firebug, I now have it and updated to FF3 in the process My head is getting a bit dizzy with this on ;) The only positive result I have found is, Crafty Syntax Live Help causing slimbox to delay. Removing it, slimbox works prior to all photos loading in all pages. I did think that Google maps may have been causing problems, as I could beat slimbox more easily with pages that also included google maps with larger .gpx or .kml files. But I am not convinced that there is any problem here, it just makes a larger page download. Non of the wp plugins I use seem to influence results What seems to influence how much time I have to beat slimbox is page content, ie: google maps, tables, links, script, etc. But again I don't think there is really any problem as such. I then went and check a few other sites, including http://ozgreg.com and I can beat slimbox on them in the same way. philippe723 Good luck |
|
ozgreg
![]()
Joined: 2003-10-18
Posts: 1378 |
![]() |
It is my understanding that mootools, the JS framework lightbox is running on uses the window event domready as the hook to execute the slimbox javascript it is my limited understanding that his dom event will not fire until the entire page is loaded (including any external links) but NOT including any images, thus yes I can see how you could have a delay.. ____________________________________ |
|
philippe723
Joined: 2008-07-26
Posts: 3 |
![]() |
I got it to work, everyone! It turns out it was indeed the slimbox.js/mootools.js files in the g2image directory. I downloaded slimbox from the site, and replaced those two files with the ones I downloaded, and it worked like a charm. The photos open in a lightbox effect as soon as you click them, without having to wait. Thanks for all your help everyone. This might be a suggestion for the next version of wpg2, to use the latest slimbox code in the g2image directory. Again, thanks everybody -Philippe |
|
ozgreg
![]()
Joined: 2003-10-18
Posts: 1378 |
![]() |
Most definitely, I was not aware that Slimbox had a few version bumps.. It went quiet for a while.. Glad you got it working.. ____________________________________ |
|