-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
HÃ¥kon Wium Lie wrote:
I've spent the last few days analyzing
Wikipedia's HTML code for
images and captions. The current code is quite good, but verbose and
it has redundancies. Here is a proposal that describes how to simplify
and improve the code:
http://www.princexml.com/howcome/2009/wikipedia/image/
The proposed solution reduces the number of elements from 10 to 6 and
the code size is reduced by more than 50%.
Some quick criticisms:
The width of the element is set on a class
("w180") instead of using a
style attribute. Wikipedia offers thumbnail images in six different
sizes (120px, 150px, 180px, 200px, 250px, 300px) and this number is
low enough to use classes. The main benefit of using classes is that
alternative style sheets can change the presentation, e.g., for
printing purposes. The style attribute, on the other hand, can never
be overridden.
Actually, you can set the width to any value you wish in the input
document, which would cause problems with your suggestion.
([[File:Example.png|123px|thumb|Some text.]] will always display at
123px wide, no matter what preferences are used).
Also, as someone else already mentioned, the string "Enlarge" can be
changed by local admins (at [[MediaWiki:Thumbnail-more]]), and is
language dependent - users can change their interface language at any
time, either via Special:Preferences, or by appending ?uselang=foo or
&uselang=foo to the URL.
Otherwise, this seems to be well presented.
- --
ABCD
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla -
http://enigmail.mozdev.org
iEYEARECAAYFAknV+vEACgkQOypDUo0oQOoDkgCbB4j1eo0KHznoRowjiDa718ZA
JlsAn1EBZF8v2XMRHwU98CGNbqusIxNb
=j0J9
-----END PGP SIGNATURE-----