Difference between revisions of "Template:Player/doc"

From QWiki
m (Rework of doc including new abbr)
m (Further polishing the turd)
 
Line 1: Line 1:
 
Used for players and teams.  
 
Used for players and teams.  
 
==Usage==
 
 
The variables are:
 
;|
 
:the name of the player
 
;|flag=
 
:name country of which the player comes from and this returns with the flag of said country in front of the name. Leave empty for {{Flag/tbd}}.
 
;|link=
 
:There's three options:
 
:;link=true or empty
 
::Links the player name to the QWiki page with that name.
 
::''Note: This is the default.  '''link=true''' behaves the same as simply not specifying a '''link=''' parameter.''
 
:;link=false
 
::Player's name is not linked.
 
:;link=abbr
 
::Player gets a dashed underline you can hover to read explanation. Requires |abbr= to be none-empty.
 
:;link=anything
 
::Links the player's name to [[anything]].
 
;|abbr=
 
:Abbreviation text that will display on hover, could be an array of players the team consist of. Requires |link=abbr to be set.
 
 
 
 
==Example==
 
==Example==
 
This code:
 
This code:
Line 37: Line 14:
 
:{{player|Team Brazil|flag=br|link=abbr|abbr=GT, mur & lit}} <small>''- no link but abbreviation (abbr)''</small>
 
:{{player|Team Brazil|flag=br|link=abbr|abbr=GT, mur & lit}} <small>''- no link but abbreviation (abbr)''</small>
 
:{{player|Ihasnowikipage|flag=us|link=false}} <small>''- link=false''</small>
 
:{{player|Ihasnowikipage|flag=us|link=false}} <small>''- link=false''</small>
 +
==Usage==
 +
;|
 +
:Name of the player.
 +
;|flag=
 +
:Country flag using two letter ISO code. Leave empty for {{Flag/tbd}}.
 +
;|link=
 +
:Put a link to another page (not equal to the name), or:
 +
:;false
 +
::Player's name is not linked.
 +
:;abbr
 +
::Player's name gets a {{abbr|dashed underline|Just like this}}, hover to read content. Requires <code>|abbr=</code> to be none-empty.
 +
;|abbr=
 +
:Abbreviation text that will display on hover, could be an array of players that a team consist of. Requires <code>|link=abbr</code> to be set.

Latest revision as of 15:14, 10 November 2020

Used for players and teams.

Example

This code:

{{player|Hib|flag=fi}}
{{player|}}
{{player|Kylo Ren|flag=se|link=shaka}}
{{player|Team Brazil|flag=br|link=abbr|abbr=GT, mur & lit}}
{{player|Ihasnowikipage|flag=us|link=false}}

Returns this:

Finland Hib - default (name as link)
TBD TBD - empty player with abbr To Be Decided.
Sweden Kylo Ren - custom link
Brazil Team Brazil - no link but abbreviation (abbr)
United States Ihasnowikipage - link=false

Usage

|
Name of the player.
|flag=
Country flag using two letter ISO code. Leave empty for TBD.
|link=
Put a link to another page (not equal to the name), or:
false
Player's name is not linked.
abbr
Player's name gets a dashed underline, hover to read content. Requires |abbr= to be none-empty.
|abbr=
Abbreviation text that will display on hover, could be an array of players that a team consist of. Requires |link=abbr to be set.