Template:PD-user/doc

From WWII Archives

Revision as of 00:55, 29 October 2022 by wc>Jonesey95 (Fix Linter errors.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This template creates a license with a user link

The template automatically sets the following categories: Category:PD-user

Usage

{{PD-user |1= }}

Template parameters

ParameterDescriptionDefaultStatus
1user nameUser name of the releaser, e.g. Multichill will display Multichill.
Examplerequired
2language codeTo refer to an account on one of the Wikipedias, write here the ISO 639-1 language code,
e.g. en or any other language.
emptyoptional
3display nameThe alternate display value to show for the linked username. This can be e.g. the real name.par. 1optional
or, instead of
these 3 params,
only parameter 1
an other
definition
of user name
It may be
  • either an item of the user namespace
    • can be the complete link to the user name of the releaser, e.g. [[User:Multichill]]​0or rather complex e.g. [[:en:User talk:Multichill | Multichill]]
    • can be specified by one of the user templates, e.g. {{U}}, {{Uc}}, {{Ud}}, {{Ut}}, {{Uw}},
    • or another method to specify a user to be linked as a user name or its substitution.
  • It may be an internal or external link, coded with single […] or double [[…]] brackets.
  • It may as well be a {{Userlist}} with the parametrizing possibilities of that template.

In addition, it is possible to suppress the linking, i.e. to display plain text:

  • when the first character of the value of parameter 1 is either &, <, [ or {
    the value is taken as-it-is; e.g "[" will it be when a link template has been transcluded,
    or "&" when the value starts with e.g. &shy; or &zwj;
  • it is always possible to switch on/off the link option of template:U, to avoid links temporarely,
see the description of the User link templates.
emptyoptional
Button text
<templatedata>JSON</templatedata> ./. {{TemplateBox}}
TemplateData

TemplateData is a way to store information about template parameters (the description of those and of the whole template) for both humans and machines. It is used by VisualEditor and possibly other tools like Upload Wizard.


Existing template documentation
At Wikimedia Commons, it is recommended to use {{TemplateBox}} with either ‎useTemplateData=1 or ‎useTemplateData=only on the ‎/doc subpage and transcluding it with {{Documentation}} into the template. ‎<nowiki>-tags can be wrapped around the arguments, if required, to avoid templates being expanded.

Newly created template documentation and imports
Another option, especially for imported templates, or for users with JSON experience, is placing raw ‎<templatedata>-tags into the Wikitext of the template, as described in various Wikipediae.

Discussion
There is an ongoing discussion about that matter. Feel invited to comment if you are experienced in either way, your time permits and if you like to share your opinion or to make a suggestion.


Wikipedia's help about TemplateDataCommons-specific information

This template creates a license with a user link

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
user name1

User name of the releaser, e.g. <code>Multichill</code> will display [[:User:Multichill|Multichill]].<br>

Default
[[:User:Example|Example]]
Userrequired
language&nbsp;code2

To refer to an account on one of the Wikipedias, write here the [[:w:List of ISO 639-1 codes|ISO 639-1]] language code,<br>e.g. <code>en</code> or any other language.

Stringoptional
display name3

The alternate display value to show for the linked username. This can be e.g. the real name.

Default
par. 1
Stringoptional
an other<br>definition<br>of user nameor, ''instead'' of<br>these 3 params,<br>only '''parameter 1'''

It may be<br>

  • either ''an item of the user namespace''
    • can be the ''complete link'' to the user name of the releaser, e.g. [[User:Multichill]]&#8203;<span style="visibility:hidden; color:transparent;">0</span>or&nbsp;rather&nbsp;complex&nbsp;e.g.&nbsp;[[:en:User talk:Multichill | Multichill]]
    • can be specified by one of the user templates, e.g. &#123;&#123;[[:Template:U|U]]&#125;&#125;, &#123;&#123;[[:Template:Uc|Uc]]&#125;&#125;, &#123;&#123;[[:Template:Ud|Ud]]&#125;&#125;, &#123;&#123;[[:Template:Ut|Ut]]&#125;&#125;, &#123;&#123;[[:Template:Uw|Uw]]&#125;&#125;,
    • or another method to specify a ''user'' to be linked as a user name or its substitution.
  • It may be an internal or external link, coded with single […] or double [[…]] brackets.
  • It may as well be a '''&#123;&#123;[[:Template:Userlist|Userlist]]&#125;&#125;''' with the parametrizing possibilities of that template.

In addition, it is possible to ''suppress the linking'', i.e. to display ''plain text'':

  • when the first character of the value of parameter 1 is either &#38;, &#60;, &#91; or &#123; <br>the value is taken as-it-is; e.g "&#91;" will it be when a link template has been transcluded, <br>or "&#38;" when the value starts with e.g. &amp;shy; or &amp;zwj;
  • it is always possible to switch on/off the link option of template:[[:Template:U|U]], to avoid links temporarely,
see the description of the [[Template:U/doc|User link templates]].

Useroptional

Additional information

The template is intended to be used in the following namespaces: the File namespace

The template is intended to be used by the following user groups: all users

Placement: In the "⧼wm-license-information-permission⧽" parameter of the {{Information}} template (or the respective parameter of similar templates) or in the "Licensing" section

Example

{{PD-user|Joshua Doubek|en}}

renders as:

Public domain ⧼Wm-license-pd-author-with-author-text⧽

⧼Wm-license-pd-author-not-legally-possible⧽
⧼wm-license-pd-author-with-author-any-purpose⧽

⧼Seealso⧽

Localization

This template is localized by utilizing custom MediaWiki namespace messages.