Another Lightbox hack

NOTICE
CONTENTS NO LONGER APPLICABLE

The content discussed in this post is no longer valid; as I’m now using a different “lightbox” implementation.
More here

When opening an image via lightbox, closing an image can get very counter intuitive. The close button is at the bottom right, which sucks if you have an image that’s larger than the viewing area. Trying to move that close button on the upper right can be too tedious as it requires a lot of modification on the DOM script and CSS. The easier thing would be to simply allow users to close the image when they click on it, after all, what else does one person usually do after viewing an image but close it right?

A hack for this is easy to do, however this usually broke Lightbox‘s “group” mode – instead of moving to the previous/next image, it prioritizes the close function assigned to the image container instead of the group mode’s prev/next overlays – resulting in the image closing anywhere you click.

The trick was to find another place where I could inject similar code, while making sure that it only does it when it’s viewing a single image. Read More

Eye-candy statistics

I was a bit bored a while ago, so I thought I’d just try to duplicate how this certain guy made his really cool pie-charts. There were so many comments asking how he did it even if they looked pretty simple to do (aside from having to actually conceptualize them of course). I even ended up making a template for it – for when I’ll use it (of which I have no friggin’ idea hahaha). In any case, just like the original guy did, I took information of visitors’ browser resolutions 1 I guess for the image to have some value however small – to prove that my decision to abandon 800×600 was the correct choice. from Mint’s Agent 007 pepper 2 A Mint plugin is called a “Pepper.”. I just did one chart though, since it was time consuming.

Notes

Notes
1 I guess for the image to have some value however small – to prove that my decision to abandon 800×600 was the correct choice.
2 A Mint plugin is called a “Pepper.”

Beefing up the comment form

I added two things on the comment form:

  1. Live comment preview – shows immediate feedback on how your comment would look like after posting (which is why I took out the “preview” button)
  2. Security captcha – anti-spambot mechanism. I know it’s not foolproof, but it does the job most of the time

Lightboxing and Flickr

NOTICE
CONTENTS NO LONGER APPLICABLE

The content discussed in this post is no longer valid; as I’m now using a different “lightbox” implementation.
More here

JC made me check out his installation of a cool WordPress plugin that does lightboxing. I decided to apply the same stuff in my blog – and modify it a bit to be able to link to the image’s Flickr page somewhat dynamically.

Results

If you’re not interested in the details, then just spot the difference between these two lightbox-enabled links (I just hope it does work as I intended it to).

Here’s an image which I linked to Flickr

Here’s an image which I linked to the Gallery within my domian

LINK REMOVED (as the old gallery doesn’t exist anymore)

If you noticed the difference, and are interested in how I did that – read on… Read More