Difference between revisions of "Template:Steamid"

From Team Fortress Wiki
Jump to: navigation, search
(I noticed that {{Bpitem}} template used https, so I changed this template so that it also uses httpS protocol instead of http.)
m (Add support for deleted accounts and fallback for missing ids.)
Line 1: Line 1:
<includeonly>{{#switch:{{{1|}}}
+
<includeonly>{{#if: {{{deleted|}}}
  | id = [https://steamcommunity.com/id/{{{2|}}} {{{3|{{steam name|{{{2|special:error}}}}}}}}]
+
  | {{tooltip|{{{1}}}|{{lang|
  | #default = [https://steamcommunity.com/profiles/{{{1|}}} {{{3|{{{2|{{steam name|{{{1|special:error}}}}}}}}}}}]
+
    | en = This user has deleted their Steam account.
 +
    | pt-br = A conta Steam deste usuário foi excluída.
 +
    }}
 +
  }}
 +
  | {{#switch:{{{1|}}}
 +
    | id = [https://steamcommunity.com/id/{{{2}}} {{{3|{{{2}}}}}}]
 +
    | #default = {{#ifexist: Template:Dictionary/steam ids/{{{1}}} | [https://steamcommunity.com/id/{{{1}}} {{{2|{{steam name|{{{1}}}}}}}}] | [https://steamcommunity.com/id/{{{1}}} {{{2|{{{1}}}}}}]{{lang|
 +
    | en = &nbsp;(Steam account not in [[Template:Dictionary/steam_ids/list|dictionary]])
 +
    | pt-br =
 +
    }}
 +
  }}
 +
}}
 
}}</includeonly><noinclude>
 
}}</includeonly><noinclude>
 +
{{ts|en, pt-br}}
 
{{doc begin}}
 
{{doc begin}}
* {{tlx|steamid|id|robinwalker|Robin Walker on Steam}} generates {{steamid|id|robinwalker|Robin Walker on Steam}}.
+
* {{tlx|steamid|id|robinwalker}} generates {{Steamid|id|robinwalker}}.
* {{tlx|steamid|76561198003843032|Steam user}} generates {{steamid|76561198003843032|Steam user}}.
+
* {{tlx|steamid|id|robinwalker|Robin Walker on Steam}} generates {{Steamid|id|robinwalker|Robin Walker on Steam}}.
 +
* {{tlx|steamid|76561197960435530}} generates {{Steamid|76561197960435530}}.
 +
* {{tlx|steamid|76561197960435530|Steam user}} generates {{Steamid|76561197960435530|Steam user}}.
 +
* {{tlx|steamid|76561197960435530|3=deleted=yes}} generates {{Steamid|76561197960435530|deleted=yes}}.
 +
* {{tlx|steamid|00000000000000000}} generates {{Steamid|00000000000000000}}.
 +
* {{tlx|steamid|00000000000000000|Steam user}} generates {{Steamid|00000000000000000|Steam user}}.
  
 
[[Category:Formatting templates|Steamid]]
 
[[Category:Formatting templates|Steamid]]
 
[[Category:Link insertion templates|Steamid]]
 
[[Category:Link insertion templates|Steamid]]
 
</noinclude>
 
</noinclude>

Revision as of 12:32, 27 June 2021

Documentation for Steamid