Jump to content

User talk:Pengo/ite

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

Namespace, filenames

[edit]

I like your idea a lot, and it's something we especially need to make Commons a more multilingual website. We'd have to create a separate namespace for these image templates, probably "Image template:". That way, users won't stumble upon these templates and wonder why none of the text is showing up correctly. Also, how would these generated SVGs be stored on the upload.wikimedia.org server? (All SVGs here are transformed into PNGs first, then saved for a time on the upload server.) What would the filenames be like? I'd imagine the filenames would have to either be horrendously long or horrendously unreadable for things like translatable maps. – Minh Nguyễn (talk, contribs) 08:24, 6 March 2006 (UTC)[reply]

Thanks for the feedback.
As for the namespace, I see no reason to put them in a special name space. The templates variables could have sensible defaults (so the SVG renders sensibly without any supplied variables) and/or have a banner on the image description page warning the user "This is a templatable SVG image, etc". It's good form to give some documentation for templates anyway, and this would apply doubly for SVG image description pages.
As normal SVGs are saved as PNGs already, then I see no reason why this mechanism should work differently for templated SVG files as well. The filename could incorporate a hash of the (normalised) parameter list. So a little horrendous, but only 12 or so hexdigits of horrendousness. Having said that I don't know a lot about how temporary image files (like SVG PNGs, or scaled JPGs) are stored with MediaWiki etc, but it seems you could use the same mechanism for templated SVGs. —Pengo 13:18, 8 March 2006 (UTC)[reply]

A simpler idea

[edit]

We can simply have an extension, which would turn the following code into an inline image (which can be put into a div and floated):

... foo bar some wiki text...
<svg width="100px">
   svg code
</svg>
... baz bar wiki text...

We could then put code like that into regular templates and use use parameter values in them, and transclude them to get customizable maps and charts. Zocky | picture popups 21:53, 7 March 2006 (UTC)[reply]

There's already an "Inline SVG extension". Can anyone verify if it allows templates within the svg code? If it does then pengo/ite is a bit redundant.
http://meta.wikimedia.org/wiki/Inline_SVG_extension (also [1])
If it doesn't, then it could be a good starting point.
Having said that, I'm not really trying to push a new syntax. Pengo/ite works just as another built-in template, like {{CURRENTTIME}}, except it takes parameters (the first being the SVG image name) —Pengo 13:25, 8 March 2006 (UTC)[reply]