(me again) lightbox conflict between sidebar and wpg2 page?
misssakura
Joined: 2007-09-26
Posts: 12 |
Posted: Thu, 2007-10-11 07:59 |
Oh no it's me again, run for the hills! Anyway WPG2 is working beautifully on the main page, embedding is a breeze, lightbox running smoothly. However when I view the embedded gallery page, lightbox doesn't work. Once again, excuse the mess (note I haven't tested in anything other than firefox so best to view it there because who knows what horrors i've created in IE): http://rococobaroque.co.uk/index.php?page_id=21&g2_itemId=63 Embedded WPG2 page and sidebar, lightbox not working http://rococobaroque.co.uk/index.php < as you can see, lightbox functioning perfectly here. The gallery2 theme i'm running is popgrey which is lightbox enabled, image block lightbox is enabled within the theme. Lightbox works in standalone gallery as you can see here: http://rococobaroque.co.uk/gallery/main.php?g2_itemId=63 Any ideas? Because I have such a skinny column layout it's not practical to load the images in anything other than lightbox, and while I don't absolutely positively have to have the embedded gallery page, it would be nice. Is it some sort of conflict? One thing I find odd is this in the generated source of the embedded page: Quote:
</div> Is it just me or is that tag totally truncated at the start? |
|
Posts: 492
The quick answer is, "Yes, that tag is totally truncated at the start."
I'll take a look to see if I can tell where the conflict is.
I haven't tested with a lightbox-enabled G2 theme. Ozgreg was really the main driver on that, but he's on his honeymoon right now. So, please bear with me while we try some things out.
First, can you try a search within the theme for the phrase rel="lightbox and post the code that's around it? That should give me an idea of what's going on. Or even better, could you post a URL for the theme's homepage. I tried a quick Google, and didn't see an obvious link.
Kirk
____________________________________
G2Image Documentation, G2Image Demo Page, My Family Website
Posts: 12
Oops, it's called Grey Pop, might be why you couldn't find it.
http://codex.gallery2.org/Gallery2:Themes:greypop Here is the official gallery page for the theme.
Here is a snippet of code from the generated source of my installation:
The url for that is: http://rococobaroque.co.uk/gallery/main.php?g2_itemId=63
Here is reference to the code from the theme installation package:
This is found in albumlight.tpl.
Posts: 12
Any idea what's causing it?
Posts: 492
Sorry,
Didn't get to it this weekend. My wife had to go to Richmond at the last minute, so I played Mr. Mom and drove the kids around all weekend. Ozgreg did all the work on the WPG2 core lightbox integration, so I have to take some time to really learn that part of the code to figure out what's going on.
But at a quick look, it looks like it should work. The rel=lightbox isn't truncated in that example. It's just the last part of the whole "a" tag. The inner "a" tag is to give the "View Photo Page" link to the Gallery2 page of that image outside of lightbox.
So, the question is "Why is the link truncated in your embedded page?" Which is what I'll have to dig into the code for.
(Looks like it's working? I just went to http://rococobaroque.co.uk/index.php?page_id=21&g2_itemId=63 to take another look at the page source and the lightbox popped up correctly. The theme was squashing it a little, but the lightbox was there. Did you change anything? EDIT: After more clicking, the sidebar on that page does not have correct lightbox support. Are you seeing the same thing, embedded page has lightbox but sidebar on the embedded page doesn't?)
Kirk
____________________________________
G2Image Documentation, G2Image Demo Page, My Family Website
Posts: 492
Do you have both the lightbox module on in G2 and the "enable lightbox for the embedded gallery (or words to that effect - I don't have a WPG2 page up right now) in the WPG2 lightbox tab? The Lighbox script is being loaded twice in the embedded page. I'd try disbling one and then the other to see which one will make it work for both the embedded page links and the sidebar grid. In theory either should work (but not both at the same time). I'd start by disabling it on the WPG2 Lightbox tab, since that's easier than disabling the G2 module and will leave Lightbox working in your G2 standalone site.
Kirk
____________________________________
G2Image Documentation, G2Image Demo Page, My Family Website
Posts: 12
This is all so confusing....I went back and viewed the source (I haven't worked on the site for a few days)..it's not truncated anymore but I don't get any lightbox pop up.
So I disabled the lightbox support for gallery in the wpg2 wordpress admin, and tada - the embedded page now has lightbox.
However the sidebar doesn't, which is similar to what you said. The sidebar works on the main page but not with the embedded page. A quick look at the source reveals that the sidebar grid now looks like this:
So the tag isn't writing properly...
Posts: 492
Yeah. I'm thinking we'll need to split the "Enable internal script" into "Enable internal script on normal WP pages" and "Enable internal script on embedded gallery."
Kirk
____________________________________
G2Image Documentation, G2Image Demo Page, My Family Website