Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[MyBB] Lightbox2 Mod
Cooler thumbnails
Author Message
ZiNgA BuRgA
Smart Alternative

Posts: 17,022.2988
Threads: 1,174
Joined: 19th Jan 2007
Reputation: -1.71391
E-Pigs: 446.1274
Offline
Post: #1
[MyBB] Lightbox2 Mod
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:
1
2
3
4
5
6
7
8
9
10
11
12
[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)


Attached File(s) Thumbnail(s)
       
(This post was last modified: 06/07/2007 02:14 AM by ZiNgA BuRgA.)
01/07/2007 02:39 AM
Visit this user's website Find all posts by this user Quote this message in a reply
cR@Zy!NgLi$h
Speculator

Posts: 804.3073
Threads: 37
Joined: 26th Apr 2007
Reputation: -1.64513
E-Pigs: 8.9041
Offline
Post: #2
RE: [MyBB] Lightbox2 Mod
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!

[Image: signature2ct1.jpg]
(This post was last modified: 01/07/2007 04:09 AM by cR@Zy!NgLi$h.)
01/07/2007 03:33 AM
Find all posts by this user Quote this message in a reply
ZiNgA BuRgA
Smart Alternative

Posts: 17,022.2988
Threads: 1,174
Joined: 19th Jan 2007
Reputation: -1.71391
E-Pigs: 446.1274
Offline
Post: #3
RE: [MyBB] Lightbox2 Mod
Thanks for the comments :P

Doesn't happen to me though - though I tried.
By the way what browser are you using?  Firefox?
(This post was last modified: 01/07/2007 04:13 AM by ZiNgA BuRgA.)
01/07/2007 04:12 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Peacefully Disturbed
Completely Useless

Posts: 220.9250
Threads: 9
Joined: 29th Apr 2007
Reputation: 3.37413
E-Pigs: 1.0248
Offline
Post: #4
RE: [MyBB] Lightbox2 Mod
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).

I'm not disappointed in you, I'm disappointed in myself, for believing in you.
[Image: peacefullydisturbedsignx8.png]
Did you park in a handicap spot? - No, I parked in two, I don't want any cripples scratching my car!
(This post was last modified: 01/07/2007 04:53 AM by Peacefully Disturbed.)
01/07/2007 04:52 AM
Find all posts by this user Quote this message in a reply
|-Anubis-|
<3 Girls

Posts: 1,241.1884
Threads: 45
Joined: 12th Feb 2007
Reputation: -2.28734
E-Pigs: 26.8142
Offline
Post: #5
RE: [MyBB] Lightbox2 Mod
Wow awesome stuff. I like neat features like that.

Also using Firefox.

FIREFOX For the win

Desu.

[Image: chikarusigrf1.png]
01/07/2007 07:27 AM
Find all posts by this user Quote this message in a reply
cR@Zy!NgLi$h
Speculator

Posts: 804.3073
Threads: 37
Joined: 26th Apr 2007
Reputation: -1.64513
E-Pigs: 8.9041
Offline
Post: #6
RE: [MyBB] Lightbox2 Mod
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:

[Image: signature2ct1.jpg]
01/07/2007 11:53 PM
Find all posts by this user Quote this message in a reply
ZiNgA BuRgA
Smart Alternative

Posts: 17,022.2988
Threads: 1,174
Joined: 19th Jan 2007
Reputation: -1.71391
E-Pigs: 446.1274
Offline
Post: #7
RE: [MyBB] Lightbox2 Mod
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.
02/07/2007 02:50 AM
Visit this user's website Find all posts by this user Quote this message in a reply
cR@Zy!NgLi$h
Speculator

Posts: 804.3073
Threads: 37
Joined: 26th Apr 2007
Reputation: -1.64513
E-Pigs: 8.9041
Offline
Post: #8
RE: [MyBB] Lightbox2 Mod
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!!!

[Image: signature2ct1.jpg]
02/07/2007 03:18 AM
Find all posts by this user Quote this message in a reply
ZiNgA BuRgA
Smart Alternative

Posts: 17,022.2988
Threads: 1,174
Joined: 19th Jan 2007
Reputation: -1.71391
E-Pigs: 446.1274
Offline
Post: #9
RE: [MyBB] Lightbox2 Mod
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).
02/07/2007 03:30 AM
Visit this user's website Find all posts by this user Quote this message in a reply
ahero4heor
Neophitic Presence

Posts: 2.2382
Threads: 0
Joined: 2nd Dec 2007
Reputation: 0
E-Pigs: 0.5000
Offline
Post: #10
RE: [MyBB] Lightbox2 Mod
Needs an update for 2.0.10
02/12/2007 02:31 PM
Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)

 Quick Theme: