Template:Unsigned2/doc

From Gentoo Wiki
Jump to:navigation Jump to:search
Note
This page is a template. It contains some standardized, often used text, which can be transcluded inside other pages. As this template is widely used in our wiki, it may be protected in which case only staff members can change it. Use the discussion page to propose enhancements or fixes, or to voice your opinion.

This template is the same as {{Unsigned}}, but with the first two unnamed parameters (the date and username) in the reverse order. This may make it easier to use when copying the information from the page history or from a diff.

Parameters

Parameter name Required? Default value Description
Anonymous parameter 1 Yes (n/a) Date (or in fact any additional text).
Anonymous parameter 2 Yes (n/a) Username.
unsigned No unsigned If provided, replaces the word "unsigned" in the message.

The unsigned parameter is intended for cases where the comment was "manually" signed (using plain text instead of the magical four tildes: ~~~~). If the commenter did not provide a date, it makes sense to use unsigned=undated; if they provided a username and a date, you still might want to use his template with unsigned= to provide readers a link to the commenter's user page and contributions. See the testcases below.

Note that if you have set a timezone in your preferences, the time shown to you in a page history or diff may be different from the time shown to other users. This may make the date provided by this template look wrong to some users. This effect can be minimized (although not avoided completely) by simply not using the "time" part of the date (as shown in the testcases). Alternatively, you can include the time with the correct timezone (although this information is not shown in page histories and diffs, so you'll have to do more work).

Usage

{{subst:Unsigned2|date|username}}
{{subst:Unsigned2|date|username|unsigned=}}

See the template's testcases:

Correct

Date and username (two anonymous parameters)
Wiki code
{{subst:Unsigned2|26 January 2017|User}}
Main version
— The preceding unsigned comment was added by User (talkcontribs) 26 January 2017
Sandbox version


Username only (empty first parameter)
Wiki code
{{subst:Unsigned2||User}}
Main version
— The preceding unsigned comment was added by User (talkcontribs)
Sandbox version


↑ This is OK, but it's better to provide a date. If you really want the username only, it's easier to use {{Unsigned}}.


When the username contains an equal sign (explicitly naming 2nd parameter)
Wiki code
{{subst:Unsigned2|26 January 2017|2=User=name}}
Main version
— The preceding unsigned comment was added by User=name (talkcontribs) 26 January 2017
Sandbox version


↑ Using 1= on the date is optional.


Showing something other than the date (two anonymous parameters)
Wiki code
{{subst:Unsigned2|— oops|User)}}
Main version
— The preceding unsigned comment was added by User (talkcontribs) — oops
Sandbox version


↑ Note: There may not be any good reason to use anything but the date in the first position.


Dating a signed comment (using unsigned=undated)
Wiki code
{{subst:Unsigned2|26 January 2017|User|unsigned=undated}}
Main version
— The preceding undated comment was added by User (talkcontribs) 26 January 2017
Sandbox version


Hiding the word "unsigned" (empty value for unsigned)
Wiki code
{{subst:Unsigned2|26 January 2017|User|unsigned=}}
Main version
— The preceding comment was added by User (talkcontribs) 26 January 2017
Sandbox version


↑ This is useful when a comment has been "manually" signed using plain text.


Suppressing the link on the word "unsigned" (using unsigned=unsigned)
Wiki code
{{subst:Unsigned2|26 January 2017|User|unsigned=unsigned}}
Main version
— The preceding unsigned comment was added by User (talkcontribs) 26 January 2017
Sandbox version


Incorrect

No parameters (exposes raw wikicode)
Wiki code
{{subst:Unsigned2}}
Main version
— The preceding unsigned comment was added by [[User:{{{2}}}|{{{2}}}]] ([[User talk:{{{2}}}|talk]] • [[Special:Contributions/{{{2}}}|contribs]])
Sandbox version


Only first anonymous parameter (exposes raw wikicode)
Wiki code
{{subst:Unsigned2|26 January 2017}}
Main version
— The preceding unsigned comment was added by [[User:{{{2}}}|{{{2}}}]] ([[User talk:{{{2}}}|talk]] • [[Special:Contributions/{{{2}}}|contribs]]) 26 January 2017
Sandbox version


↑ Unlike {{Unsigned}}, this template requires two parameters.


Three anonymous parameters (not supported)
Wiki code
{{subst:Unsigned2|26 January 2017|User|radical!}}
Main version
— The preceding unsigned comment was added by User (talkcontribs) 26 January 2017
Sandbox version


See also