One of the cool things about trying new open source software is having the opportunity to tinker with it when things don’t work quite the way you like, or quite the way that you would have done them. This week, I installed a WordPress blog and spent a couple hours playing with various features and community-written plugins. One of my instant favorites is a plugin called LightBox<\/a>, which displays large versions of your images in a DHTML overlay when a visitor with a compatible browser clicks on a link to an image. You can see it in use in other posts on this page, though I have not had time to update my blog archives for using it just yet.<\/p>\n
Colin, I’m already bored! Show me something cool or shut up already!<\/em>… Ok, fine, go here.<\/a><\/p>\n
A while after discovering LightBox and getting it installed, I discovered LiteBox<\/a>, a derivative based on the moo.fx<\/a> library and prototype.lite. I soon switched over to this, to save on download time.<\/p>\n
So a bit last night, and more this afternoon, I sat down and hammered out my own release of the LiteBox plugin. I call it “SmartBox”, and it pretty handily resolves these issues. You can see it in use here on my blog. Try clicking on a picture like one of the fountaincam<\/a> snapshots<\/a>, just to see the lightbox effect as originally intended.<\/p>\n
Now, take a look at any picture posted from Flickr, such as my Grandma’s Strawberry Jam<\/a>. If you mouseover the thumbnail, you’ll see the link heading off to flickr-land to view the full size image there. But try clicking on it, and up pops a 500px larger version, instead of directing you to Flickr’s website. Very nice. The link, if you check again, has been dynamically rewritten to point to a bigger copy of the image that Flickr for some reason won’t just post automatically for me.<\/p>\n
<\/a>
\nFinally, take a look at these two examples: If you follow this link: Waterfall near Medford, OR (no lightbox)<\/a> you’ll see a tall, narrow image that is almost certainly taller than your browser window. With the old LiteBox, that would have popped up full size when clicking on a LiteBox-enabled link. That would be annoying. So would following this link: Crater Lake Edge (no lightbox)<\/a>, a short but very wide image. Note:<\/strong> your browser may resize the image for you: hover your mouse over it and look for a zooming cursor (Firefox) or an “expand” button (IE6) to see that the image is actually pretty large.<\/em><\/p>\n
Instead, try these new SmartBox-enabled links, which automatically scale the image size to fit:
\n
\nWaterfall<\/a><\/p>\n
\nCrater Lake Edge<\/a><\/p>\n
You can obtain the plugin by downloading this ZIP package and extracting it into your WordPress plugins directory: smartbox-0.3.zip<\/a>
\nOr, by checking out the code from subversion:
\nsvn co http:\/\/svn.mccambridge.org\/smartbox<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"