Forum:Possible alternative to gallery tag

Gallery template
I worked out a template, imitating the tag, but more similar to its old behaviour. Here is a couple of examples:

Default:

Let's change parameters:

Supported parameters:
 * width and height - width and height (in pixels) of the rectangle in which thumbnail is inscribed. Default values 120 and 120.
 * position - left, center, or right - align of gallery itself (default:center)
 * captionalign - left, center, or right - align of captions (default:left)
 * captiontextcolor - color of captions (default:black)
 * captionsize - font size of captions (for example: 8pt, 0.7em, etc.) NB: it differs from analogous parameter of tag.

Limitations in comparison to tag:
 * It looks well in Firefox 3.6 and IE8, but I'm not sure about other browsers.
 * no support of columns (or perrow) parameter
 * no "Add" button (but do you really use it?)
 * no support of bordercolor, bordersize parameters, but it can be implemented if needed
 * no support of spacing parameter (but something similar can be implemented if needed)
 * not more than 10 images yet, but this number can be easily raised up to any finite value (20 will be enough for all practical cases, I think).

So, maybe to use this template instead of gallery tag?

Ruxax 16:47, August 10, 2010 (UTC)

Discussion
That portrait one looks awesome. Really neat job. --YazzyDream 16:55, August 10, 2010 (UTC)

I tested it with Chrome 5.0 Opera 10.6 and Safari 5, no problem. Is margin 10px necessary? Tipota 17:32, August 10, 2010 (UTC)


 * This margin 10px sets distance between thumbnails, it can be changed if you want to, but I think if it were 0, gallery wouldn't look very good. Ruxax 17:56, August 10, 2010 (UTC)


 * Really good alternative I must say. Really looks and fells familiar.Mugiwara Franky 07:14, August 11, 2010 (UTC)

What about border color? Now it is gray, change it to blue? or what color do you like? Is the default caption's font size OK? Other suggestions? Ruxax 10:39, August 11, 2010 (UTC)

The distance between the first and the second image is 13px and not 10px.Tipota 11:06, August 11, 2010 (UTC)


 * Corrected. Ruxax 11:32, August 11, 2010 (UTC)