Xepher.Net Forums

Xepher.net => Technical Support => Topic started by: yny-u on April 19, 2010, 12:38:40 AM

Title: Xepher banner and Lightbox 2 not playing well
Post by: yny-u on April 19, 2010, 12:38:40 AM
It looks like both the Xepher link banner and Lightbox 2 (a Javascript based image display thing) use an element (a div, I think) with the "overlay" id, and this messes Lightbox 2 up.. Would it be easy to change the Xepher banner's id to "xepher_banner_overlay" or something? Might be good to change it to more specific id for something that is included on so many pages anyway.

I have tried fixing this by changing the Lightbox 2 id, but it turns out that this is rather more involved than I can manage at the moment.

~Thanks
Title: Re: Xepher banner and Lightbox 2 not playing well
Post by: Xepher on April 19, 2010, 05:10:38 AM
I actually made a point of using unique IDs for everything when I wrote the thing, just to avoid stuff like this. It's been quite a while since I coded it, so I don't remember a lot of it offhand, and figured I must've missed one. I'm happy to change it, but I just searched through all my files, and there is no reference at all to "overlay" in any of the newsbox code. Can you give me an example page/URL where this is happening, so I can debug there? Currently there's no newsbox on your site (I'm guessing you removed it since it was breaking things.) Perhaps copy whatever page had the problem to some temp/test name, and add the newsbox there, and I'll work on that one.
Title: Re: Xepher banner and Lightbox 2 not playing well
Post by: Xepher on April 19, 2010, 05:18:02 AM
Hmm... lightbox uses the same javascript libraries I'm using, so the bug is bound to be in there somewhere. Try adding "&skip_scriptaculous=1" to your newsbox code... like this

EDIT: Code Correct from original post... "src=" added in front of url.
<script type='text/javascript' src='http://xepher.net/newsbox.js.php?username=yny-u&shape=box&skip_scriptaculous=1'></script>

It looks like I've had that in there for ages... so I probably ran into this before, but I just don't remember. It may or may not work with whatever version of the library lightbox2 is using, and it might also depend on which shows up first in the page. If it doesn't work, gimme a url for a test page where it's broken, and I'll futz around with it.
Title: Re: Xepher banner and Lightbox 2 not playing well
Post by: yny-u on April 19, 2010, 06:53:21 AM
Yep, the problem goes away if I use the skip scriptaculous version.. But the banner doesn't display. I guess that is why my quick anddirty attempt at a fix didn't work (I tried changing all instances of "overlay" in the lightbox code to "lb_overlay", but that did not fix the problem.

Here is a link to a test version of my top page with the banner reactivated. You will see why I disabled it ^^;

http://yny-u.com/test/ (http://yny-u.com/test/)

Thank you for your help.

*edit*
I am using Firefox v. 3.6.3 on a Mac, haven't had a chance to test and see if the same thing occurs in IE..
*/edit*
Title: Re: Xepher banner and Lightbox 2 not playing well
Post by: Xepher on April 19, 2010, 07:35:55 AM
I fail... I gave you a bad code example above, and you copied it directly (instead of just adding the &scriptaculous=1 part)

It should be

<script type='text/javascript' src='http://xepher.net/newsbox.js.php?username=yny-u&shape=box&skip_scriptaculous=1'></script>

Note the added "src=" part in front of the url. I don't know how to edit your site correctly, so I kinda kludged it by editing the template file and then just nuking the cached versions. It looks to work correctly though, and both the banner and lightbox are working correctly on your main site.
Title: Re: Xepher banner and Lightbox 2 not playing well
Post by: yny-u on April 19, 2010, 12:56:19 PM
Great, thank you very much. All working now ^^