Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:REVISIONUSER2/doc: Difference between revisions

Template page
Created page with "{{Documentation subpage}} {{High-use}} <!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see Wikipedia:Wikidata) --> The magic word <code><nowiki>{{REVISIONUSER}}</nowiki></code> gives poor formatting and fails in wikilinks if the username starts with an asterisk '*' or semicolon ';'. This template is a workaround. It is not needed if phab:T28781 is fixed. == Usage == Use <code><nowiki>{{REV..."
 
No edit summary
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{wikipedia|page name}}
{{Documentation subpage}}
{{Documentation subpage}}
{{High-use}}
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->


The [[Help:Magic words|magic word]] <code><nowiki>{{REVISIONUSER}}</nowiki></code> gives poor formatting and fails in wikilinks if the username starts with an asterisk '*' or semicolon ';'. This template is a workaround. It is not needed if [[phab:T28781]] is fixed.
The magic word <code><nowiki>{{REVISIONUSER}}</nowiki></code> gives poor formatting and fails in wikilinks if the username starts with an asterisk '*' or semicolon ';'. This template is a workaround. It is not needed if phab:T28781 is fixed.


== Usage ==
== Usage ==
Line 13: Line 13:


== Example ==
== Example ==
Suppose you want to link the last editor of [[User:*Casper/sandbox]].
Suppose you want to link the last editor of User:*Casper/sandbox.


<code><nowiki>[[User:{{REVISIONUSER2|User:*Casper/sandbox}}]]</nowiki></code> produces:
<code><nowiki>[[User:{{REVISIONUSER2|User:*Casper/sandbox}}]]</nowiki></code> produces:


[[User:{{REVISIONUSER2|User:*Casper/sandbox}}]]
User:{{REVISIONUSER2|User:*Casper/sandbox}}


For comparison, <code><nowiki>[[User:{{REVISIONUSER:User:*Casper/sandbox}}]]</nowiki></code> produces:
For comparison, <code><nowiki>[[User:{{REVISIONUSER:User:*Casper/sandbox}}]]</nowiki></code> produces:


[[User:{{REVISIONUSER:User:*Casper/sandbox}}]]
User:{{REVISIONUSER:User:*Casper/sandbox}}


The latter fails if the last editor is <code>*Casper</code> and [[phab:T28781]] is unfixed.
The latter fails if the last editor is <code>*Casper</code> and phab:T28781 is unfixed.


Usernames starting with * [https://en.wikipedia.org/w/index.php?title=Special%3AListUsers&username=*] or ; [https://en.wikipedia.org/w/index.php?title=Special%3AListUsers&username=;] are relatively rare. <code><nowiki>{{REVISIONUSER}}</nowiki></code> may work correctly if it is not in the output but only used in a test during processing.
Usernames starting with * [https://en.wikipedia.org/w/index.php?title=Special%3AListUsers&username=*] or ; [https://en.wikipedia.org/w/index.php?title=Special%3AListUsers&username=;] are relatively rare. <code><nowiki>{{REVISIONUSER}}</nowiki></code> may work correctly if it is not in the output but only used in a test during processing.

Latest revision as of 16:34, 9 April 2025

This page uses Creative Commons Licensed content from Wikipedia (view authors).

The magic word {{REVISIONUSER}} gives poor formatting and fails in wikilinks if the username starts with an asterisk '*' or semicolon ';'. This template is a workaround. It is not needed if phab:T28781 is fixed.

Usage

Use {{REVISIONUSER2}} instead of {{REVISIONUSER}}

Use {{REVISIONUSER2|pagename}} instead of {{REVISIONUSER:pagename}}

Note the pipe instead of a colon.

Example

Suppose you want to link the last editor of User:*Casper/sandbox.

[[User:{{REVISIONUSER2|User:*Casper/sandbox}}]] produces:

User:

For comparison, [[User:{{REVISIONUSER:User:*Casper/sandbox}}]] produces:

User:

The latter fails if the last editor is *Casper and phab:T28781 is unfixed.

Usernames starting with * [1] or ; [2] are relatively rare. {{REVISIONUSER}} may work correctly if it is not in the output but only used in a test during processing.

Alternative approach

Wrapping {{REVISIONUSER}} with {{#invoke:String2|nowiki|...}} so it looks like {{#invoke:String2|nowiki|{{REVISIONUSER}}}} also works.