Author Topic: Xepher banner and Lightbox 2 not playing well  (Read 5433 times)

0 Members and 1 Guest are viewing this topic.

yny-u

  • Newbie
  • *
  • Posts: 42
    • View Profile
    • yny-u
Xepher banner and Lightbox 2 not playing well
« 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
« Last Edit: April 19, 2010, 01:53:36 am by yny-u »

Xepher

  • Techsmith
  • Administrator
  • *****
  • Posts: 4,328
  • Illegitimis non carborundum!
    • View Profile
    • Xepher.net
Re: Xepher banner and Lightbox 2 not playing well
« Reply #1 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.

Xepher

  • Techsmith
  • Administrator
  • *****
  • Posts: 4,328
  • Illegitimis non carborundum!
    • View Profile
    • Xepher.net
Re: Xepher banner and Lightbox 2 not playing well
« Reply #2 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.
Code: [Select]
<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.
« Last Edit: April 19, 2010, 07:36:51 am by Xepher »

yny-u

  • Newbie
  • *
  • Posts: 42
    • View Profile
    • yny-u
Re: Xepher banner and Lightbox 2 not playing well
« Reply #3 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/

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*
« Last Edit: April 19, 2010, 06:57:12 am by yny-u »

Xepher

  • Techsmith
  • Administrator
  • *****
  • Posts: 4,328
  • Illegitimis non carborundum!
    • View Profile
    • Xepher.net
Re: Xepher banner and Lightbox 2 not playing well
« Reply #4 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

Code: [Select]
<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.

yny-u

  • Newbie
  • *
  • Posts: 42
    • View Profile
    • yny-u
Re: Xepher banner and Lightbox 2 not playing well
« Reply #5 on: April 19, 2010, 12:56:19 pm »
Great, thank you very much. All working now ^^