Template talk:Potd filename

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

Gallery[edit]

{{Editprotected}}

<gallery>
{{Potd/2011-01-01|gallery=1}}
{{Potd/2011-01-02|gallery=1}}
{{Potd/2011-01-03|gallery=1}}
{{Potd/2011-01-04|gallery=1}}
{{Potd/2011-01-05|gallery=1}}
{{Potd/2011-01-06|gallery=1}}
</gallery>

To make a gallery with the a/m code, how would we need to modify this template? --  Docu  at 04:36, 30 December 2010 (UTC)[reply]

Actually, Category:Pictures of the day (2011) is sufficient. --  Docu  at 08:27, 31 December 2010 (UTC)[reply]

Automatic error correction[edit]

{{Editprotected}}

Replace both instances of {{{1|}}} with {{PAGENAME:{{{1|}}}}}. This makes the template accept either File:Foo.jpg or Foo.jpg seamlessly (it removes File: or Image: if and only if they exist). It's a trick we use over on en-wiki a lot. Adam Cuerden (talk) 17:55, 10 May 2022 (UTC)[reply]

@Adam Cuerden: I think POTD is special enough that we can just expect people to use the correct format. I can also imagine that some third-party tools read directly the source text, and would get confused by this. In normal templates, this is used a lot on Commons as well, but this is not a normal template. —Tacsipacsi (talk) 01:45, 15 May 2022 (UTC)[reply]
@Tacsipacsi: The thing is, Template:Motd filename does have the correction, so there should probably be consistency. Of course, the ideal situation would be a Wikidata-like editing box, where the format's adjusted before it's even saved. Adam Cuerden (talk) 21:00, 19 May 2022 (UTC)[reply]
@Adam Cuerden: Consistency is important, but I’d make it consistent the other way round. (However, that’d mean a potentially breaking change, so existing uses of {{Motd filename}} need to be checked and corrected as necessary beforehand.) An auto-validating interface would be cool, but unfortunately I don’t see it likely to be implemented. —Tacsipacsi (talk) 23:28, 19 May 2022 (UTC)[reply]