MyBB Community Forums

Full Version: Lightbox 2
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm attempting to incorporate Lightbox 2 ( http://www.huddletogether.com/projects/lightbox2/ ) into a MyBB forum. You can see the forum at http://homeundone.com/

Its working now, any post with an attached photo will open up in Lightbox. The problem is that it doesn't work properly in Firefox because I had to butcher the code a little.

The problem is that like MyBB, Lightbox 2 utilizes the Prototype framework. When both versions of the javascript (Lightbox's full and MyBB shortened) are included they cause a conflict that messes with the editing tools in the newpost/editpost pages.

My solution was to include the MyBB version in the header as usual, and load the Lightbox version right in the postbit_thumnails_thumnail template. This works awesome in IE and Safari, but is visually off in Firefox. I suppose this has something to do with the javascript not being loaded in the head, or a conflict of some sort, but I'm lost.

Is there anything I can do to make this work? It looks awesome.
That's because you are not adding it to the body tag correctly. I used lightbox for my mod.

http://www.mybbcentral.com/showthread.php?tid=3

Maybe that will help you get it sorted out.
Hey labrocca. Your mod is awesome, its not Lightbox 2 though. In the new version the photo fades in and the frame expands to the photo's height and width. Regardless, I tried the new body tags to no avail..still distorted in Firefox.
It would be helpful to know which modules of Mootools MyBB is compiled by default. I think that this is the source of the conflict.

Also, some information on the Prototype version used in MyBB would be awesome.

Thanks,
Q Big Grin