<insert name here>
|type = website |description = Template:USERNAME is a template page used on the TCG Card Shop Simulator Wiki. Templates are pages that are embedded (transcluded) into other pages to allow for the repetition of information. |site_name = TCG Card Shop Simulator Wiki |locale = en }}
{{USERNAME}}
displays the username of the user viewing the page. It relies on MediaWiki:Gadget-Username.js.
If the user is not logged in, then the template will display <insert name here>. You can control the text by adding a parameter to the template with a value of the default text. For example, {{USERNAME|shahadat}}
outputs "shahadat" if the user viewing it is not logged in.
Usage
{{USERNAME|fallback (optional)|type=(optional)}}
The type
parameter is optional. If left blank, the placeholder text will be replaced with the viewer's wiki username (if logged in). If filled in with type=insertrsn
, the placeholder text will be replaced with the viewer's in-game username, which is retrieved from localStorage (assuming the viewer has entered it into one of our calculators before).
Examples
Code | Gives |
---|---|
{{USERNAME}}
|
<insert name here> |
{{USERNAME|Shahadat}}
|
Shahadat |
{{USERNAME|type=insertrsn}}
|
<insert name here> |
{{USERNAME|Shahadat|type=insertrsn}}
|
Shahadat |