slimbox option in wpg2 3.07

philippe723

Joined: 2008-07-26
Posts: 3
Posted: Sat, 2008-07-26 03:34

Hello,

my website is www.dodaa.com
The pages in the main frame of the site (yes, old fashioned html frames :) ) are built in wordpress, and the frame on the right-hand side links to posts in the middle frame with images brought in using wpg2 3.07.

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?
again, the site is www.dodaa.com, and the right-hand panel has links to examples.
Any help would be appreciated, thanks!

 
ozgreg
ozgreg's picture

Joined: 2003-10-18
Posts: 1378
Posted: Sat, 2008-07-26 05:09

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..

____________________________________
Wordpress / Gallery2 (WPG2) Plugin, , WPG2 Documentation, WPG2 Demo

 
OzDamian

Joined: 2008-04-30
Posts: 35
Posted: Sat, 2008-07-26 06:32

Interesting!!
I thought lightbox loaded before images but slimbox didn't load until the page had loaded. On my site, slimbox doesn't work until the page has loaded however I do run other JS as well... I'll tag along to see how you go with this one :)

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
- Your link at the bottom of the page in the middle frame "gohome" loads the entire site into the centre frame.

- 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
Posted: Sat, 2008-07-26 20:11

Hi there, thanks for the quick response.
And thank you for bringing the applesearch script issue to my attention. I removed all code from the header.php and the sidebar.php file that referenced applesearch, to test if there was a conflict. And it doesn't seem to be the case. No applesearch bar's js., yet still no slimbox preload. I personally find the searchbar useful, but I'll keep it disabled for testing purposes until I can figure out what's going on with the slimbox.

So still troubleshooting :) but now I know what the problem isn't :)

Any other ideas?

 
OzDamian

Joined: 2008-04-30
Posts: 35
Posted: Sun, 2008-07-27 08:43

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
ozgreg's picture

Joined: 2003-10-18
Posts: 1378
Posted: Mon, 2008-07-28 01:48

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..

____________________________________
Wordpress / Gallery2 (WPG2) Plugin, , WPG2 Documentation, WPG2 Demo

 
OzDamian

Joined: 2008-04-30
Posts: 35
Posted: Mon, 2008-07-28 01:58

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
ozgreg's picture

Joined: 2003-10-18
Posts: 1378
Posted: Mon, 2008-07-28 02:43
OzDamian wrote:
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 confusion, theme = wp theme not g2 theme

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..

____________________________________
Wordpress / Gallery2 (WPG2) Plugin, , WPG2 Documentation, WPG2 Demo

 
OzDamian

Joined: 2008-04-30
Posts: 35
Posted: Mon, 2008-07-28 03:05

The theme I use is Regulus, but I have made many changes to it over the past couple years.
What I have done is load a fresh copy on my test site and slimbox working as it should.
I am now going through and changing files one at a time to the modified files and checking to see if slimbox delays, if/when it does this I will compare the scrip between the offending file and the original to see if I can determine what is causing the problem.

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
ozgreg's picture

Joined: 2003-10-18
Posts: 1378
Posted: Mon, 2008-07-28 03:22

If you are using FF then grab the firebug add-in as it will help list all the DOM objects being loaded..

____________________________________
Wordpress / Gallery2 (WPG2) Plugin, , WPG2 Documentation, WPG2 Demo

 
OzDamian

Joined: 2008-04-30
Posts: 35
Posted: Mon, 2008-07-28 03:23

Small update:
I have more than one conflict.

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&amp;department=1&amp;serversession=1&amp;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
Posted: Mon, 2008-07-28 08:06

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.
However, some times I can load a page, click a photo prior to the page completely loading and be redirected to the photo url rather than the slimbox effect activating. Yet this is not consistent, I can reload the same page many times and not beat the slimbox script.
What may be happening is, when I do beat slimbox, maybe I am beating the page loading including header info, not just the images.

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
Your site seems a little different though, slimbox will not load till all picture have load, not just the page. What I would be looking for is some page wrapper or JS that may be running, maybe even the form you have on the page.

Good luck

 
ozgreg
ozgreg's picture

Joined: 2003-10-18
Posts: 1378
Posted: Mon, 2008-07-28 22:55

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..

____________________________________
Wordpress / Gallery2 (WPG2) Plugin, , WPG2 Documentation, WPG2 Demo

 
philippe723

Joined: 2008-07-26
Posts: 3
Posted: Mon, 2008-07-28 23:11

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
ozgreg's picture

Joined: 2003-10-18
Posts: 1378
Posted: Mon, 2008-07-28 23:18

Most definitely, I was not aware that Slimbox had a few version bumps.. It went quiet for a while..

Glad you got it working.. :)

____________________________________
Wordpress / Gallery2 (WPG2) Plugin, , WPG2 Documentation, WPG2 Demo