User talk:Pengo/ite

Namespace, filenames
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)


 * 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. &mdash;Pengo 13:18, 8 March 2006 (UTC)

A simpler idea
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... &lt;svg width="100px"> svg code &lt;/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)


 * 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 )


 * 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, except it takes parameters (the first being the SVG image name) &mdash;Pengo 13:25, 8 March 2006 (UTC)