Template talk:PD-Layout

Return to "PD-Layout" page.

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

It is done in CSS, isn't it? --Slomox (talk) 11:25, 24 January 2009 (UTC)
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. 06:57, 12 August 2009 (UTC)


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

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

This template is brokenEdit

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. 20:30, 19 January 2011 (UTC)

{{License template tag}}Edit

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)

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)

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)
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)
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)
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)
After the closing tag |} of the first table, one could insert a hidden div. -- Rillke(q?) 22:24, 24 May 2013 (UTC)
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)
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)
You are funny Face-wink.svg. 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)
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)

Small cleanupEdit

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

✓ Done --Jarekt (talk) 17:53, 26 May 2013 (UTC)
Thanks! --Patrick87 (talk) 18:03, 26 May 2013 (UTC)
Last modified on 26 May 2013, at 18:03