Template talk:PD-Layout

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

Wouldn't this be better done with CSS? --GW_SimulationsUser Page | Talk 19:29, 26 April 2008 (UTC)[reply]

It is done in CSS, isn't it? --Slomox (talk) 11:25, 24 January 2009 (UTC)[reply]
It's HTML when it's not included in a stylesheet (.css), but yeah, the style attribute is for any CSS property (called "inline CSS"). Anyway, no, that wouldn't be better because templates used on image description pages show up on other wikis that wouldn't have any of the classes we define locally. 75.4.151.131 06:57, 12 August 2009 (UTC)[reply]

RTL[edit]

{{Editprotected}} please add direction:{{dir}}; to template style. thanks−ebraminiotalk 11:37, 12 January 2011 (UTC)[reply]

Unless I am mistaken, there already is direction: {{Dir|{{{lang}}}}}; in template style. Jean-Fred (talk) 12:43, 12 January 2011 (UTC)[reply]
oh, sorry, i wanted to fix this template problem.−ebraminiotalk 13:26, 12 January 2011 (UTC)[reply]

This template is broken[edit]

These edits have fucked up this template, because they have resulted in the "||}" part getting transcluded. Of course Wikipedia trusts incompetent registered users, but does not trust me to fix this anonymously, so I won't. 188.192.109.47 20:30, 19 January 2011 (UTC)[reply]

As I mentioned in Commons:Village_pump#How_to_find_images_without_a_license.3F, I am adding {{License template tag}} to this and few other style templates so we can build a mechanism to search for images with no license. --Jarekt (talk) 13:16, 6 September 2011 (UTC)[reply]

Invisible table still necessary?[edit]

I just realized that every PD template contains an invisible (style="display:none") table in the beginning that stems from {{PD-layout}}. The invisible table was added on 16 October 2010‎ by DieBuche with the comment "make all PDs machine readable".

Is this table still needed? It blows up the templates post-expand include size without being visible to the reader, breaking e.g. Commons:Image copyright tags visual. If it's still used programatically it's ok, but if it's unused it should probably be removed. --Patrick87 (talk) 17:52, 24 May 2013 (UTC)[reply]

See Commons:Machine-readable data. Whether it is still required depends on whether all PD-Templates implement this their own which is unlikely. It is used by Help:Gadget-Stockphoto. An improved system would just expose one unique identifier and then look it up in a table via XHR but we are far away from having a well-suited system. -- Rillke(q?) 18:13, 24 May 2013 (UTC)[reply]
I see. Is there a reason to set style="display:none" for every single <span>? Wouldn't it be enough to only set it on the parent node (the one which specifies class="licensetpl")? Why is the parent currently a Wikitable anyway? Wouldn't a simple <div> be more suitable? --Patrick87 (talk) 19:26, 24 May 2013 (UTC)[reply]
As far as I can assess the situation, all the changes you suggest could be made without breaking anything. But it's questionable whether it will be sufficient for the purpose you try to achieve (ensuring that all templates at Commons:Image copyright tags visual render). Nonetheless it is a step into the right direction. Please formally {{Edit request}}, ask in IRC or at COM:AN so a second admin can decide here. You may also ask another admin directly, prefereably User:Magnus Manske or User:Multichill as their tools possibly rely on the HTML output. -- Rillke(q?) 19:59, 24 May 2013 (UTC)[reply]
Just realized that replacing the Wikitable with a <div> is not an option. The reason is that {{PD-Layout}} was designed to only contain the style of the table and is used directly after the opening <nowki>{|</nowiki>. Therefore there's probably no easy way to add <span>s, except with the workaround currently used: Starting a second table and using the opening brace for that one. Actually this is bad because the table with class="licensetpl" doesn't include the actual license template as specified on Commons:Machine-readable data, but probably there is no other reasonable way to add the data to all the PD license tags. --Patrick87 (talk) 22:18, 24 May 2013 (UTC)[reply]
After the closing tag |} of the first table, one could insert a hidden div. -- Rillke(q?) 22:24, 24 May 2013 (UTC)[reply]
But we want to replace the first table (unless we're talking of different tables). Actually there should be no table at all in this template, only style information for the tables defined in the respective PD templates themselves. --Patrick87 (talk) 22:36, 24 May 2013 (UTC)[reply]
Agreed +Tables for layout purposes are deprecated anyway. You may want to write a bot modernizing all of our license templates. -- Rillke(q?) 10:02, 25 May 2013 (UTC)[reply]
You are funny . Are there actually any license tags without a table? I thought all current license tags and similar templates used a Wikitable for layout purposes? --Patrick87 (talk) 14:18, 25 May 2013 (UTC)[reply]
No joke. Template:Check categories does not use a table, aber steht damit leider ziemlich allein da. Ich glaube ich sollte diesen Punkt zu Help:Authoring a license-template hinzufügen. -- Rillke(q?) 14:53, 25 May 2013 (UTC)[reply]

Small cleanup[edit]

{{edit request|technical=yes}} Could you please update Template:PD-Layout with the code from Template:PD-Layout/sandbox? It's just some minor cleanup (stripping the unnecessary style="display:none" attributes) as discussed in the section above. --Patrick87 (talk) 14:38, 25 May 2013 (UTC)[reply]

✓ Done --Jarekt (talk) 17:53, 26 May 2013 (UTC)[reply]
Thanks! --Patrick87 (talk) 18:03, 26 May 2013 (UTC)[reply]