1337Box Enhanced Lightbox v0.62

bwgbwg Registered Users, Retired Mod Posts: 2,119 SmugMug Employee
I really like lightbox, i think it's a much more efficient way to view photos than single image view. I've put together a script that will modify the thumbnails in all the gallery styles to open in lightbox (even slideshow and filmstrip).

There is also an option to force singleImage url's to open in lightbox as well. For example: http://bigwebguy2.smugmug.com/gallery/883844/2/41496382/Large will be opened straight into lightbox instead of being opened in singleImage.

This script has been tested on Firefox 1.5, IE6 on WinXP and Safari, Camino 1.0, Firefox 1.5 on OSX. It works with image protection on or off.

To use this script, copy the contents of the attached file to the javascript block in your customization screen. There are more detailed instructions in the script.

Please post any bugs/questions in this thread. Enjoy!

16 January 2007 v0.62
- fixed bug where 1337 would throw errors if you hid galleries/categories on your homepage

04 June 2006 v0.61
- removed cart button due to SM implementing cart in LB

25 April 2006 v0.6
- fixed cart disappearing on size change

25 April 2006 v0.5
- Renamed to 1337Box and added cart functionality. Minor bug fixes.

24 April 2006 v0.4
- Initial release
Pedal faster
«1

Comments

  • AndyAndy Registered Users Posts: 50,016 Major grins
    edited April 24, 2006
    Nice job, Lee clap.gifclap.gif
    Thanks for hacking!
  • rdlugoszrdlugosz Registered Users Posts: 277 Major grins
    edited April 24, 2006
    Add to cart overlay?
    I think this is a great hack & I'll be using it on my site. I only wish there were an overlay (similar to the thumbs up/down rating overlay) that pops up allowing a user to add the current photo to the shopping cart. The trouble with the lightbox view on the traditional or all thumbs views is that you can only purchase via the "buy multiple photos" link.

    Any chance SM could add a "buy" overlay to the image overlays?
  • bwgbwg Registered Users, Retired Mod Posts: 2,119 SmugMug Employee
    edited April 25, 2006
    rdlugosz wrote:
    I think this is a great hack & I'll be using it on my site. I only wish there were an overlay (similar to the thumbs up/down rating overlay) that pops up allowing a user to add the current photo to the shopping cart. The trouble with the lightbox view on the traditional or all thumbs views is that you can only purchase via the "buy multiple photos" link.

    Any chance SM could add a "buy" overlay to the image overlays?

    excellent suggestion. new version 0.5 with cart! check out the first post.
    Pedal faster
  • DavidTODavidTO Registered Users, Retired Mod Posts: 19,160 Major grins
    edited April 25, 2006
    I don't personally really care about the cart in lightbox, but I did notice that when I change the viewing size the cart goes away.
    Moderator Emeritus
    Dgrin FAQ | Me | Workshops
  • bwgbwg Registered Users, Retired Mod Posts: 2,119 SmugMug Employee
    edited April 25, 2006
    DavidTO wrote:
    I don't personally really care about the cart in lightbox, but I did notice that when I change the viewing size the cart goes away.
    dammit.

    i tested this thing backwards and forwards...key presses and everything.

    forgot to test size changing.

    sigh.
    Pedal faster
  • AndyAndy Registered Users Posts: 50,016 Major grins
    edited April 25, 2006
    bigwebguy wrote:
    dammit.

    i tested this thing backwards and forwards...key presses and everything.

    forgot to test size changing.

    sigh.

    Testing is hard. There are a dozen of us testing stuff all the time - still hard!
  • bwgbwg Registered Users, Retired Mod Posts: 2,119 SmugMug Employee
    edited April 25, 2006
    DavidTO wrote:
    I don't personally really care about the cart in lightbox, but I did notice that when I change the viewing size the cart goes away.

    fixed. new version 0.6
    Pedal faster
  • Mike LaneMike Lane Registered Users Posts: 7,106 Major grins
    edited April 29, 2006
    This is pretty hot snot. You know if we can just plop those js files in our page? Or will it take teh l337 hacking to make it work in smugmug?
    Y'all don't want to hear me, you just want to dance.

    http://photos.mikelanestudios.com/
  • bwgbwg Registered Users, Retired Mod Posts: 2,119 SmugMug Employee
    edited April 29, 2006
    Mike Lane wrote:
    This is pretty hot snot. You know if we can just plop those js files in our page? Or will it take teh l337 hacking to make it work in smugmug?
    yeah, i saw that a while ago. it's like the apple version of SM's current lightbox. You cant just plop the stuff in there and have it work...the SM lightbox can be bypassed like i'm doing in 1337box though and call the hotsnotbox instead....i'll look if i get a chance.
    Pedal faster
  • Mike LaneMike Lane Registered Users Posts: 7,106 Major grins
    edited April 29, 2006
    bigwebguy wrote:
    the apple version
    lol3.gif
    bigwebguy wrote:
    the hotsnotbox
    :lol4
    Y'all don't want to hear me, you just want to dance.

    http://photos.mikelanestudios.com/
  • peestandinguppeestandingup Registered Users Posts: 489 Major grins
    edited May 3, 2006
    Lee, is there a way to force the Medium size when someone activates Lightbox when viewing in Smugmug style? I still want all the other sizes available, but I just dont want it to start out viewing in Large because its usually too big for the screen & you have to scroll to see captions, especially when viewing portraits. And if you have a bunch of different sized photos that you're viewing in the same gallery liked cropped, portraits, landscapes, photos with & without captions, it throws off the Lightbox navigation bar slightly so that you always have to move your mouse around to click the ">" button. That doesnt happen in Medium view. The nav bar stays the same nomatter what & doesnt move around.

    And can I disable this hack from activating when using the Slideshow & Journal styles? I use Journal style for my videos section, so when someone clicks to see a video, Lightbox pops up & doesnt take them to the next page where the vid is located. Theres no way to get to it, besides changing the viewing style.
  • bwgbwg Registered Users, Retired Mod Posts: 2,119 SmugMug Employee
    edited May 3, 2006
    Lee, is there a way to force the Medium size when someone activates Lightbox when viewing in Smugmug style? I still want all the other sizes available, but I just dont want it to start out viewing in Large because its usually too big for the screen & you have to scroll to see captions, especially when viewing portraits. And if you have a bunch of different sized photos that you're viewing in the same gallery liked cropped, portraits, landscapes, photos with & without captions, it throws off the Lightbox navigation bar slightly so that you always have to move your mouse around to click the ">" button. That doesnt happen in Medium view. The nav bar stays the same nomatter what & doesnt move around.

    And can I disable this hack from activating when using the Slideshow & Journal styles? I use Journal style for my videos section, so when someone clicks to see a video, Lightbox pops up & doesnt take them to the next page where the vid is located. Theres no way to get to it, besides changing the viewing style.
    you can hack the script to get it to do both of those things, but you're on your own to do so. Sorry but i dont want to get into the position of customizing this for every individual situation. I'll keep your suggestions in mind for future updates though.
    Pedal faster
  • peestandinguppeestandingup Registered Users Posts: 489 Major grins
    edited May 3, 2006
    bigwebguy wrote:
    you can hack the script to get it to do both of those things, but you're on your own to do so. Sorry but i dont want to get into the position of customizing this for every individual situation. I'll keep your suggestions in mind for future updates though.
    Thats cool. Even though I know absolutly nothing about javascript, guess I can try to mess with it a little. But, yes. That would be sweet if you included those in your next update 'cause they are definitely issues.
  • bwgbwg Registered Users, Retired Mod Posts: 2,119 SmugMug Employee
    edited May 3, 2006
    Thats cool. Even though I know absolutly nothing about javascript, guess I can try to mess with it a little. But, yes. That would be sweet if you included those in your next update 'cause they are definitely issues.

    forcing medium is an issue? with my script? methinksnot.
    Pedal faster
  • peestandinguppeestandingup Registered Users Posts: 489 Major grins
    edited May 3, 2006
    bigwebguy wrote:
    forcing medium is an issue? with my script? methinksnot.
    Sorry, not really issues. Perhaps potential conflicts?? rolleyes1.gif

    J/K, but I did run into that Journal problem with my video gallery. But this script does rock pretty hard & I did figure out how to disable the hack in Journal style (just erase it). Duh on my part, but I honestly didnt think it would be that simple in javascript for some reason. Script is scary to me.

    But now, the shifting nav bar in Lightbox Large is a little annoying, but maybe thats just how it is without the script, I never really noticed it before. Which is why I just wanted it to automatically default to Medium across the board, but still allow Larges to be clicked on. But, alas. I will never figure that one out. :(:
  • bwgbwg Registered Users, Retired Mod Posts: 2,119 SmugMug Employee
    edited May 3, 2006
    Sorry, not really issues. Perhaps potential conflicts?? rolleyes1.gif

    J/K, but I did run into that Journal problem with my video gallery. But this script does rock pretty hard & I did figure out how to disable the hack in Journal style (just erase it). Duh on my part, but I honestly didnt think it would be that simple in javascript for some reason. Script is scary to me.

    But now, the shifting nav bar in Lightbox Large is a little annoying, but maybe thats just how it is without the script, I never really noticed it before. Which is why I just wanted it to automatically default to Medium across the board, but still allow Larges to be clicked on. But, alas. I will never figure that one out. :(:
    cool, glad you took the plunge. it's really not that hard.

    i'll see if i can integrate the medium thing into it...but it goes away from the way preferred sizes are currently handled so i'm not really sure if i want to give the option on forcing an initial size. I'm all about consistency and one thing i hate is getting an unexpected result from a previously realized behavior.
    Pedal faster
  • bwgbwg Registered Users, Retired Mod Posts: 2,119 SmugMug Employee
    edited May 3, 2006
    But now, the shifting nav bar in Lightbox Large is a little annoying, but maybe thats just how it is without the script, I never really noticed it before. Which is why I just wanted it to automatically default to Medium across the board, but still allow Larges to be clicked on. But, alas. I will never figure that one out. :(:
    Is the shifting you're talking about the result of the scrollbar appearing for portrait orientated photos?

    you can always use the keyboard arrows to navigate instead of the < > buttons
    Pedal faster
  • peestandinguppeestandingup Registered Users Posts: 489 Major grins
    edited May 3, 2006
    bigwebguy wrote:
    Is the shifting you're talking about the result of the scrollbar appearing for portrait orientated photos?
    Its really just at random times. Using a monitor with a screen resolution of at least 1024 x768, click here, then click on the big photo to activate Lightroom. Then scroll forward through about 5 pics, then backwards about 5 pics. Do the arrows shift around for you?? They do for me.
  • bwgbwg Registered Users, Retired Mod Posts: 2,119 SmugMug Employee
    edited May 3, 2006
    Its really just at random times. Using a monitor with a screen resolution of at least 1024 x768, click here, then click on the big photo to activate Lightroom. Then scroll forward through about 5 pics, then backwards about 5 pics. Do the arrows shift around for you?? They do for me.
    yeah, they shift when the vertical scrollbar is displayed. not much you can do about that.
    Pedal faster
  • peestandinguppeestandingup Registered Users Posts: 489 Major grins
    edited May 3, 2006
    bigwebguy wrote:
    yeah, they shift when the vertical scrollbar is displayed. not much you can do about that.
    Did you try it in Medium?? Its perfect, no shifting. I wonder why?
  • bwgbwg Registered Users, Retired Mod Posts: 2,119 SmugMug Employee
    edited May 3, 2006
    Did you try it in Medium?? Its perfect, no shifting. I wonder why?
    because the vertical scrollbar doesnt show....at least for me on my screen size.
    Pedal faster
  • peestandinguppeestandingup Registered Users Posts: 489 Major grins
    edited May 3, 2006
    bigwebguy wrote:
    because the vertical scrollbar doesnt show....at least for me on my screen size.
    Yeah, thats it. When it goes from scrollbar to non-scrollbar, the nav bar jumps around.

    I wish Lightbox was smart enough to counteract that & sense when the browser displays the scroll bar so the nav bar would compensate for it. Perhaps the overall nav bar length could be shortened so it didnt touch the ends of the browser window?? That would do it.

    But, yeah. In the meantime, I would like to force Medium at start up.
  • bwgbwg Registered Users, Retired Mod Posts: 2,119 SmugMug Employee
    edited May 3, 2006
    Yeah, thats it. When it goes from scrollbar to non-scrollbar, the nav bar jumps around.

    ok, glad you finally switched on. i only said that 4 posts ago.
    Pedal faster
  • peestandinguppeestandingup Registered Users Posts: 489 Major grins
    edited May 3, 2006
    bigwebguy wrote:
    ok, glad you finally switched on. i only said that 4 posts ago.
    Sorry, dude. Im slow today (and most days). I heard what you said, but the portrait comment was throwing me off because for me, ALL of the images in LARGE show the scrollbar, besides maybe like 1 or 2 in a whole set. So it just wasnt registering with me.

    To sum it up, yes. Im stupid. I'll just sit quietly over here in the corner so I wont disturb the other kids who are here to learn. :snore
  • rdlugoszrdlugosz Registered Users Posts: 277 Major grins
    edited May 16, 2006
    photo options dropdown for logged in user
    bwg - feature request time! :)

    Think you could make the "photo options" drop down appear somewhere onscreen with the lightbox if you're logged in? I have some galleries set to "all thumbs" and I need to change that to something else temporarily in order to get to those options.

    Thanks!
  • rdlugoszrdlugosz Registered Users Posts: 277 Major grins
    edited May 16, 2006
    Prevent return to top?
    Also, as another feature request...

    Any way you can prevent the page from scrolling back to the top upon the lightbox closing?
  • bwgbwg Registered Users, Retired Mod Posts: 2,119 SmugMug Employee
    edited May 16, 2006
    rdlugosz wrote:
    bwg - feature request time! :)

    Think you could make the "photo options" drop down appear somewhere onscreen with the lightbox if you're logged in? I have some galleries set to "all thumbs" and I need to change that to something else temporarily in order to get to those options.

    Thanks!
    mwink.gif

    you'll have to be patient with me on this...i got big plans for this but i am super busy right now so it may be a while before i can get around to it.
    Pedal faster
  • bwgbwg Registered Users, Retired Mod Posts: 2,119 SmugMug Employee
    edited May 16, 2006
    rdlugosz wrote:
    Also, as another feature request...

    Any way you can prevent the page from scrolling back to the top upon the lightbox closing?
    i actually made this request to the smugmug folks a while ago...we'll see.

    http://dgrin.com/showthread.php?p=294226#post294226
    Pedal faster
  • peestandinguppeestandingup Registered Users Posts: 489 Major grins
    edited May 26, 2006
    Im really digging this hack, Lee. Thanks.

    FEATURE REQUEST:

    Put a "save photo" or "D" for download link beside the image sizes, just like it is in the regular viewer in SM style. This is really the only thing keeping me from letting Lightbox open when someone clicks on a thumbnail. Full access like that would be killer. I know they could always go original & then right-click, but thats not very elegant.

    BTW, take a look at this dude's site. Click on some of those links & pics on his page & then close them. Isnt that soo cool? You think Lightbox could be made to act that pretty??
  • bwgbwg Registered Users, Retired Mod Posts: 2,119 SmugMug Employee
    edited May 26, 2006
    Im really digging this hack, Lee. Thanks.

    FEATURE REQUEST:

    Put a "save photo" or "D" for download link beside the image sizes, just like it is in the regular viewer in SM style. This is really the only thing keeping me from letting Lightbox open when someone clicks on a thumbnail. Full access like that would be killer. I know they could always go original & then right-click, but thats not very elegant.

    BTW, take a look at this dude's site. Click on some of those links & pics on his page & then close them. Isnt that soo cool? You think Lightbox could be made to act that pretty??
    not sure about the save photo link....there is no easy way to check if originals are enabled or not...it's a big mess and i dont want to slow the thing down anymore. i'll keep it in mind.

    that guy has a cool effect for sure...and like i said i have plans. just be patient.
    Pedal faster
This discussion has been closed.