User:Vanisaac/Cross-wiki user/doc
This is a documentation subpage for User:Vanisaac/Cross-wiki user. It may contain usage information, categories and other content that is not part of the original user template page. |
Usage
[edit]This template provides links to user pages in other wikimedia projects: user page, talk page, contributions and watchlist. The watchlist will always be your personal watchlist at that project, regardless of the username specified for the other links.
Parameters:
1 =
language code-project name. The hyphen "-" is necessary if both language and project are specified. Acceptable Wikimedia project names include all standard abbreviations, and language codes are not required. E.g. "en-wiktionary", "jp-wp", "commons". Language codes are not sanitized and will link to non-existent language versions, while ineligible project codes will default to Wikimedia.
2 =
username. Defaults to the last person to edit the page. Should always be specified unless being used on personal user pages that are not edited by other users.
position =
allows you to specify the position of the side box. Defaults to right.
Usage
[edit]Code | Output | Notes |
---|---|---|
{{User:Vanisaac/Cross-wiki user|Jimbo Wales}} |
Wikimedia - Jimbo Wales
|
Wikimedia default |
{{User:Vanisaac/Cross-wiki user|commons}} |
Commons - vanisaac
|
Last editor default |
{{User:Vanisaac/Cross-wiki user|wikipedia|Jimbo Wales}} |
Wikipedia - Jimbo Wales
|
Default language |
{{User:Vanisaac/Cross-wiki user|de-wikipedia|Jimbo Wales}} |
de.Wikipedia - Jimbo Wales
|
Other language Wikipedia |
{{User:Vanisaac/Cross-wiki user|jp-wikipedia|Jimbo Wales}} |
jp.Wikipedia - Jimbo Wales
|
Alternate language code (Note the actual links are to ja.wiktionary.org) |
{{User:Vanisaac/Cross-wiki user|tlh-wikipedia|Jimbo Wales}} |
tlh.Wikipedia - Jimbo Wales
|
Non-existent Wikipedia language gives red links |
{{User:Vanisaac/Cross-wiki user|wikifonts|Jimbo Wales}} |
Wikimedia - Jimbo Wales
|
Non-existent project defaults back to Wikimedia |
See also
[edit]Technical
[edit]This template uses a subpage {{User:Vanisaac/Cross-wiki user/main}} to handle the building of the side box. The root template {{User:Vanisaac/Cross-wiki user}} is used to sanitize the input for the subpage.
This template uses the {{#invoke:String}}
module and the magic words {{ucfirst:}} and {{REVISIONUSER}}, as well as the {{#if:}}, {{#switch:}} and {{#expr:}} parser functions.