Template talk:Creator

From Wikimedia Commons, the free media repository
Jump to: navigation, search
Info non-talk.svg Template:Creator has been protected indefinitely because it is a highly-used or visible template. Use {{Edit request}} on this page to request an edit.
Please test any changes in the template's /sandbox or /testcases subpages, or in a user subpage, and consider discussing changes at the talk page before implementing them.

Statistics (Please do not archive)[edit]

Date Number of Creator templates Number of Files using Creator template
6430 281k
7488 321k
8698 379k
10,285 452k
15,441 872k
24,783 1457k

Only says "birth" even if also death-info[edit]

The following:

 | Name              = Fortuné Méaulle
 | Birthdate         = 1844-04-11
 | Birthloc          = Angers
 | Deathyear         = 1901
 | Deathloc          = 

displays as:

Fortuné Méaulle (1844–1901) Link back to Creator infobox template

Lua version of the code[edit]

We have very preliminary version of the LUA code that mimics the current display part of the {{Creator}} template at Module:Creator. See for example:

Eugeniusz Lokajski  (1908–1944) Link back to Creator infobox template wikidata:Q735173
Eugeniusz Lokajski
Alternative names "Brok"
Description Polish photographer and athlete
Date of birth/death 14 December 1908 25 September 1944
Location of birth/death Warsaw Warsaw
Work period 1944
Work location Warsaw Uprising mostly in Śródmieście district.
Authority control

I will be adding more capabilities to look up info from wikidata and will work on large section that creates maintenance categories. But I hope to have something ready for testing soon. --Jarekt (talk) 14:35, 15 September 2016 (UTC)

Protected edit request[edit]

{{edit protected}} This template's documentation is displaying on pages in the Creator namespace that use the template. I believe it's because of the following line under "automatic categorization of pages in Creator: namespace".


The template already includes its documentation within noinclude tags at the bottom of the template. Could someone remove the line shown above? Thanks. --Auntof6 (talk) 18:24, 8 October 2016 (UTC)

 Not done Auntof6 I am lost why do you want to remove that documentation, for example in Creator:Sorin_Adam, or any other. Documentation within noinclude tags at the bottom of the template adds documentation to the template. --Jarekt (talk) 04:13, 11 October 2016 (UTC)
@Jarekt: I don't understand why the creator pages need documentation on how to use the template. Doesn't template documentation need to be displayed on the template page, and not on the pages that use the template? There are two places in the template that include the documentation page: the one at the bottom that displays the doc on the template page, and the one I suggest removing that displays it on creator pages. There are other types of pages that use this template, and the doc doesn't display on those. Am I missing something? --Auntof6 (talk) 04:19, 11 October 2016 (UTC)
Auntof6, All templates including Creator or Institution templates should include documentation. Creator templates are more or less the same and do not need individual documentation, so a single documentation page is added to 20- something thousands creator pages with the command you are proposing to remove. --Jarekt (talk) 04:33, 11 October 2016 (UTC)
@Jarekt: I'm still not sure I understand. Are you saying that the creator pages are templates? --Auntof6 (talk) 04:35, 11 October 2016 (UTC)
Auntof6, they are pages used like templates, (transcluded to other pages,) but which are in a specialized namespace. --Jarekt (talk) 05:03, 11 October 2016 (UTC)
Ah! I didn't know that. Now it makes sense. Thanks for the explanation. --Auntof6 (talk) 05:08, 11 October 2016 (UTC)

Bugfix in this template[edit]

There are two tests using this code:

{{#ifeq: {{localurl:{{PAGENAME}}}} | {{localurl:{{{Homecat}}}}} || ... }}

It does not work at all, there's no such "localurl:" parserfunction. This causes a tracking category to be overpopulated.

I think that the purpose of this test was to compare the current page name (as returned by {{PAGENAME}}, where it may be HTML-encoded for some ASCII punctuation characters allowed by MediaWiki such as the apostrophe ', with the value of a plain-text parameter ({{{Homecat}}}) which may include non significant whitespaces or different lettercase in the first letter, and which is generally not URL-encoded). The work around is to use this simple code (passing the specified parameter to the PAGENAME parser function to normalize it the same way as for the current pagename returned by default):

{{#ifeq: {{PAGENAME}} | {{PAGENAME|{{{Homecat}}}}} || ... }}

Another equivalent solution uses #titleparts (reverse conversion from the HTML-encoded characters to plain UTF-8 characters), but still with the equivalent canonicalisation of pagenames (leading/trailing whitespaces removed, whitespaces compacted, canonicalisation for the namespace or for the leading character of the page title, resolution of relative URLs...).

Please unprotect this template to make this necessary change (two occurences). verdy_p (talk) 03:21, 10 October 2016 (UTC) {{editprotected}}

Note: the Template:Creator/sandbox version fixes that (it also fixes various dangling newlines at end of the table, adds scope="col/row" in header cells and eliminates unnecessary HTML elements (notably the outer div to contain the table; it also fixes the layout of descriptions containing bulleted or numbered lists or multiple paragraphs). verdy_p (talk) 06:25, 10 October 2016 (UTC)
verdy_p, localurl magic word is explained here and it seems to me that it is working fine. Category:Creator templates with non-matching home categories holds creator pages whose name does not match the category name. It is not a problem by itself but since most creator template names match the home category names, if someone needs a list of creator pages and their home pages, one can often use a shortcut and guess the name of the home category based on creator page name. However creator pages in Category:Creator templates with non-matching home categories need to be treated differently. You are saying that "category [is] overpopulated". Can you give any examples? --Jarekt (talk) 17:37, 10 October 2016 (UTC)
It is one of the tracking categories tested using "localurl:"; all these page are cetegorized due to missing links to pages named with a "localurl:", edit one of these pages, you'll see at the bottom a red link for missing included "templates"... verdy_p (talk) 20:56, 10 October 2016 (UTC)
Note: localurl does not work correctly to compare pagenames as they are returned by the internal PAGENAME parser function (and similar), because they are HTML-encoded (this is a problem for all pages containined as ASCII apostrophe for example in their name becaues tests with "#ifeq:" will not match them. We need a name canonicalisation (and unfortunately localurl does not work coherently when there are optional namespaces). To have coherent results, "#titleparts:" works much better (it has been tested since lon in French wikis where there are many page titles with apostrophes, and even here on Commons.
For some resons the proposal to change the way PAGENAME returns HTML-encoded names has not been accepted (because PAGENAME is frequently used within attributes where quotes cause problems.
The alternate proposal to fix #ifeq: so that it will HTML-decode its parameters was also rejected. And anyway we need a way to canonicalize pagenames with their correct namespace name (replacing aliases) and a single capitalization form for namespaces, and a correct capitalization for pagenames outside the namespace. verdy_p (talk) 21:03, 10 October 2016 (UTC)
verdy_p I edited one of the pages and I see no red links for any missing pages. The purpose of localurl is to grab 2 strings that could be in many alternative formats and create a 2 strings in unified format (whatever that might be) so they can be compared. Can you point out a specific page where something is not working right? --Jarekt (talk) 04:06, 11 October 2016 (UTC)