Endless Paradigm

Full Version: [MyBB] Lightbox2 Mod
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Lol, decided to work on some MyBB mods for fun :)  Anyways, just been spending hours on this interesting mod...

This integrates Lokesh Dhakar's cool Lightbox2 into MyBB.  Lightbox2 is a fancy way to show images/thumbnails.
  • Attached thumbnails will use Lightbox2
  • ImageShack thumbnails will use Lightbox2
  • Direct links to images will use Lightbox2
  • Adds two MyCodes to use Lightbox2:
    • [img=<image>]<content>[/img]
    • [thumb=<image>]<thumbnail image>[/thumb]
  • Uses a slightly modified Lightbox2:
    • Larger images will appear with a scrollbar - note that this has issues with the Prev/Next buttons and the scrollwheel.  A switch has been added into lightbox.js - see that file for more details
    • The image link appears in the description field
    • effects.js stripped down

Note that this is still somewhat experimental - if you find a bug, please report :)

More Details
Compatibility: should work on all MyBB 1.2x
Templates Affected:
  • postbit_attachments_thumbnails_thumbnail (note: this plugin assumes you have not changed this template)
Files Affected:
/jscripts/prototype.lite.js
/jscripts/editor.js
/inc/class_parser.php

Preview:
ImageShack
[Image: onegaitwins011024hf9.th.jpg]

Direct link
http://img171.imageshack.us/img171/2958/somefinkdx3.jpg

[img] and [thumb] tags
[img=http://img171.imageshack.us/img171/86/theringofdeathag5.jpg]Click here :)[/img]
[thumb=http://img247.imageshack.us/img247/7871/lh01000eie2.jpg]http://img247.imageshack.us/img247/7871/lh01000eie2.th.jpg[/thumb]

Attached Thumbnails
See below

Click here to view the code used to produce the above samples

Code:
[b]ImageShack[/b]
[url=http://img167.imageshack.us/my.php?image=onegaitwins011024hf9.jpg][img]http://img167.imageshack.us/img167/3716/onegaitwins011024hf9.th.jpg[/img][/url]

[b]Direct link[/b]
http://img171.imageshack.us/img171/2958/somefinkdx3.jpg

[b][font=courier new][[i][/i]img][/font] and [font=courier new][[i][/i]thumb][/font] tags[/b]
[img=http://img171.imageshack.us/img171/86/theringofdeathag5.jpg]Click here :)[/img]
[thumb=http://img247.imageshack.us/img247/7871/lh01000eie2.jpg]http://img247.imageshack.us/img247/7871/lh01000eie2.th.jpg[/thumb]

[b]Attached Thumbnails[/b]
[i]See below[/i]



:dl: Download (22.6KB)
I like...!  Very nice. :)
Worked very nicely 1st time through, but when I went from EP to google and back again, the lightbox was all gone :(
All images were brought up in their own windows until the last 1, which used lightbox again, then all the images were fine (again)?

Edit: Never mind...  Just clicked on a thumb from another thread and it worked perfectly!
Thanks for the comments :P

Doesn't happen to me though - though I tried.
By the way what browser are you using?  Firefox?
Haha at first I had no idea what you were talking about because out of habit I always open images in a new tab.  Anyways I agree very nice, and its working fine for me so far (using Firefox 2.0.0.4).
Wow awesome stuff. I like neat features like that.

Also using Firefox.

FIREFOX For the win

Desu.
ZiNgA BuRgA Wrote:Thanks for the comments :P

Doesn't happen to me though - though I tried.
By the way what browser are you using?  Firefox?

Hmmm, yes - Firefox V2.0.0.4...
It just did it again.  Lightbox loads fine on all of the images, no problem.  Then if I use a link to another site like Google or Trademe or whatever, and click "back" to here, the images no longer load in the Lightbox?!? The whole tab changes and I need to click "back" to return to the page...

I tested it on the 1st link you posted and it doesn't do it.

:neutral:
Nup - tried, but still can't replicate your problem - anyone else having the same issue?  Could be some plugins you have which conflict with Lightbox I guess.
I've only got media pirate and talkback installed...  it's no biggie, sorry for raining on the parade - I do really, really like the Lightbox!!!
Lol, nah, it's fine - I did expect bugs, as the job was rather... messy.  I personally noticed a glitch, but that could be due to my slow connection (sometimes, the box would resize displaying the old image, then after a while, would change the proper image).
Needs an update for 2.0.10
Pages: 1 2
Reference URL's