[Commons-l] Image boxes clicky thingy

Magnus Manske magnusmanske at googlemail.com
Mon Jul 2 22:30:49 UTC 2007


(starting new thread, as the exhibitionist one doesn't entirely
encompass this topic;-)

I went ahead and hacked a little javascript to draw clickable image
boxes. To see it (it is completely invisible to everyone by default,
except for a template that adds a new category to the image
description page), look at [[Template:Imagebox]] and follow the
instructions.

To view the only example of this (my own picture, as I didn't want to
vandalize someone else's;-) look at [1]. It marks the bee in a
semi-transparent box with a red border, with the name of the category
it links to ("Bee") written on it. If you click on the box, you go to
that category.

Notes:
* This is just a demo. If you want it for real, gimme feedback!
* This is the very first halfway working version. There's no show/hide
toggle, no "box drawing" function, nothing.
* Almost everything about this can be changed.
* No, I won't do circles or ellipses ;-)
* For me, it didn't work so well together with my other commons
javascripts ;-) If you have problems and use other javascript,
surround the other JS /* like this */ for testing purposes.

Cheers,
Magnus

[1] http://commons.wikimedia.org/wiki/Image:Valeriana_officinalis_2007-06-02_%28flower_with_bee%29.jpg



More information about the Commons-l mailing list