Bản mẫu:REVISIONUSER2
NgocAnMaster
| Bản mẫu này được sử dụng ở rất nhiều trang, vì thế những thay đổi đến nó sẽ hiện ra rõ ràng. Vui lòng thử nghiệm các thay đổi ở trang con /sandbox, /testcases của bản mẫu, hoặc ở không gian người dùng của bạn. Cân nhắc thảo luận các thay đổi tại trang thảo luận trước khi áp dụng sửa đổi. |
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 Bản mẫu:REVISIONUSER2
Use {{REVISIONUSER2}} instead of {{REVISIONUSER}}
Use {{REVISIONUSER2|pagename}} instead of {{REVISIONUSER:pagename}}
Note the pipe instead of a colon.
Example Bản mẫu:REVISIONUSER2
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 * or ; are relatively rare. {{REVISIONUSER}} may work correctly if it is not in the output but only used in a test during processing.
Alternative approach Bản mẫu:REVISIONUSER2
Wrapping {{REVISIONUSER}} with {{#invoke:String2|nowiki|...}} so it looks like {{#invoke:String2|nowiki|{{REVISIONUSER}}}} also works.
- Bản mẫu từ thần chú Wikipedia