Template:Ut

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

This is creating a link to a user's talk page. It hides the "User talk:" prefix.

Template documentationview · edit · history · purge ]
This documentation is transcluded from Template:U/doc.

Link to a user, either internal or interwiki

  • For users without a user page you may link to their talk page with {{Ut}}.
  • For links to users of the German Wikipedia, use {{Ud}}.

Usage

{{Ut |1= |9= |10= }}

Many users have only a User Talk page but no User page on Commons. This results in a red link with the standard linking [[User:UserName]].
An easy edit to fix this link is just to change the {{U| to {{Ut| to link the user talk page with the user name.

Another reason for a redlink may result of changing the user name by the postfix "~commonswiki".
An easy edit to fix this link is just to change it to {{Uw| to link the new user page with the user name,
or to the talk page with {{Uwt| when only this one exists.

Sometimes neither user page nor the user talk page exist on Commons.

  • The Template:Uc checks whether the user page exists, and links to it if yes.
Otherwise it checks whether the user talk page exists, and links to it if yes.
Otherwise it checks whether a user~commonswiki page exists, and links to it if yes..
Otherwise it checks whether a user~commonswiki talk page exists, and links to it if yes..
Otherwise it links to the special page "user contributions" that lists the editor's contributions on Commons.
If the other pages are created later, it automatically prefers the talk page over the user page.
Since existence checks are not possible in other Wikipedias, these checks are performed only when no language code is specified.

This template pings the mentioned user like a normal page link. To not ping the user, see {{Noping}}.

Template parameters

ParameterDescriptionDefaultStatus
1Username

It is recommended to define the user name.

If absent, the name is shown of the last editing user

{{REVISIONUSER}}suggested
2Displayed TextMay be formatted wikitext or html.{{{1}}}optional
3Interwiki Prefixlanguage code: for interwiki link. If absent, link to user entry in the Commonsemptyoptional
4

± ("+" or "-" sign) to precede the user name with the namespace User:

+ ("plus" sign) to make User: a part of the link
- ("minus" sign) to precede User: as plain text

(if both signs are specified, "+" is used and "-" is ignored)
The +/- parameter can as well be specified with parameter 2 or 3.

emptyoptional
linkspecify link=no to suppress the linkemptyoptional

more parameters to format the namespace (when "+" or "-" is specified)
» not every possible combination of parameter values is useful «
optional
casefor formatting of the namespace:
  • case=l display "user" instead of "User"
  • case=i display the national translation, in general a link
  • case=n display the national translation without linking it
emptyoptional
i18nAn ISO 639 language code, to follow another translation then yours
when parameter setting is case=i or case=n
enoptional
9emptyoptional
10emptyoptional
Template data
<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

Link to a user, either internal or interwiki.

Template parameters[Edit template data]

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Username1

It is recommended to define the user name.

Default
{{REVISIONUSER}}
Usersuggested
10

Unknownoptional
Displayed Text2

May be formatted wikitext or html.

Default
{{{1}}}
Lineoptional
Interwiki Prefix3

Language code for an interwiki link. If absent, link to user entry in the Commons.

Unknownoptional
4

+ or - to precede the user name with the namespace prefix “User:”

+ ("plus" sign)
make “User:” a part of the link.
- ("minus" sign)
precede “User:” as plain text.

(if both signs are specified, "+" is used and "-" is ignored)

The +/- parameter can as well be specified with parameter 2 or 3.

Suggested values
+ -
Stringoptional
6

Unknownoptional
9

Unknownoptional
case

for formatting of the namespace:

  • <code>case=l</code> display "user" instead of "User"
  • <code>case=i</code> display the national translation, in general a link
  • <code>case=n</code> display the national translation without linking it

Suggested values
l i n
Stringoptional
i18n

An [[:w:ISO 630-1|ISO 639]] language code, to follow another translation then yours

when parameter setting is <code>case=i</code> or <code>case=n</code>

Default
en
Stringoptional
link

specify “link=no” to suppress the link

Auto value
no
Stringoptional

Additional information

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

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

Relies on:
Main template code {{U/main}}

Examples

Instead of [[User:Konstantinopoulosstephanopoulos|Konstantinopoulosstephanopoulos]]
write just {{U|Konstantinopoulosstephanopoulos}} 0for the same output Konstantinopoulosstephanopoulos

Instead of [[User:Renamed user wfoeefkqoifeqofmcqm|Renamed user wfoeefkqoifeqofmcqm]]
write just {{U|Renamed user wfoeefkqoifeqofmcqm}} 0for the same output Renamed user wfoeefkqoifeqofmcqm

A matter of Weird garbage.

Localization

This template is not intended to be localized.

The template does not generate any localizable text; with + or - always the namespace in English: "User" is displayed; only in

combination with case=i or case=n the namespace can be translated using the "{{LangSwitch}}" construct (according to lang).
Table: different displays for {{Ut}} with the namespace option 0
{{ Utusername }} 0this is the standard username
{{ Utusername- }} User:username
{{ Utusername-case = l }} user:username
{{ Utusername-case = i }} LangSwitch Error: no default:username
{{ Utusername-case = n }} user:username
{{ Utusername+ }} User:username
{{ Utusername+case = l }} user:username
{{ Utusername+case = i }} user:username
{{ Utusername+case = n }} user:username
{{ Utusernamelink = n }} ‍username
{{ Utusername-link = n }} User:‍username
{{ Utusername-link = ncase = l }} user:‍username
{{ Utusername-link = ncase = i }} LangSwitch Error: no default:‍username
{{ Utusername-link = ncase = n }} user:‍username
{{ Utusername+link = n }} User:‍username
{{ Utusername+link = ncase = l }} user:‍username
{{ Utusername+link = ncase = i }} LangSwitch Error: no default:‍username
{{ Utusername+link = ncase = n }} user:‍username

[edit ]

User and user talk links

Code Result [1] Shortcut

{{U|Username}}

Username     links to user page

{{Uc|Username}}

Username     conditional link to contributions page

{{Ud|Username}}

Username     links to German user page =
{{Ue|Username}} Username     links to English user page (not yet a template) =

{{Un|Username}}

‍Username     does not link to user page; no echo function

{{Ut|Username}}

Username     links to user talk page

{{Uw|Username}}

Username     trails the given name with "~commonswiki"

{{Uwt|Username}}

Username     links to the talk page of "~commonswiki" user

{{Userlist|Username}}

Username     Lua based list of one or more users {{ Ul }}
WWW Combinations:

{{UL2.0|Username}}

Username (talk)Customizable template

{{Ult|Username}}

Username (talk)

{{User|Username}}

Username (talk · contribs)

{{Uv|Username|:en:}}

:en:Username (talk | contribs) ~

{{User2|Username}}

Username (talk · contributions · Statistics)

{{User3|Username}}

Username (talk · contributions · Move log · block log · uploads · Abuse filter log {{Vandal}}

{{User6|Username}}

Username (talk · contributions · Move log · Statistics · logs · block log)

{{User7|Username}}

Username (talk · contributions · user rights management)

{{User8|Username}}

Username (talkcontribsblock logfilter log)

{{User13|Username}}

Username (talk · contribs · logs · block log)

{{User14|Username}}

Username (talk · contributions · deleted user contributions · recent activity · logs · block log · global contribs · CentralAuth)

{{User21|Username}}

Username (talk · contribs · count · global contribs)

{{Userlinks|Username}}

Username (talk · contribs · deleted contribs · logs · edit filter log · block user · block log)

{{Admin|Username}}

Username (talk contribs blocks protections deletions moves rights rights changes) {{ A }}

{{UserSUL|Username}}

Username (talk • contribs • rename user)

{{BotUser|Username}}

Username (contribs)

{{Newbot|Username}}

taskscontribscountlogspage moves block user block logflag logglobal contribsflag bot

{{Checkuser|Username}}

Username (talk contribs Luxo's SUL deleted contribs logs block user block log )
  1. Interwiki template: Interwiki access (with 3=language code)

Be aware that other templates may use the parameter "editor" or "by" for the same purpose.