Difference between revisions of "Template:HockeyDB/doc"
imported>Zyxw (update categories) |
imported>Zyxw (update documentation, add TemplateData) |
||
| Line 1: | Line 1: | ||
| − | {{ | + | {{Documentation subpage}} |
| + | <!-- Categories go at the bottom of this page and interwikis go in Wikidata. --> | ||
| − | + | '''{{NAMESPACE}}:{{BASEPAGENAME}}''' displays an external link to [[ice hockey]] player's or team's statistics at [http://www.hockeydb.com HockeyDB.com]. | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | + | == Usage == | |
| − | + | === Player === | |
| − | + | Unnamed parameters: | |
| − | {{ | + | * <code><nowiki>{{</nowiki>{{BASEPAGENAME}}|''ID''<nowiki>}}</nowiki></code> |
| + | * <code><nowiki>{{</nowiki>{{BASEPAGENAME}}|''ID''|''NAME''<nowiki>}}</nowiki></code> | ||
| − | + | Named parameters: | |
| − | + | * <code><nowiki>{{</nowiki>{{BASEPAGENAME}}|id=''ID''<nowiki>}}</nowiki></code> | |
| − | + | * <code><nowiki>{{</nowiki>{{BASEPAGENAME}}|id=''ID''|name=''NAME''<nowiki>}}</nowiki></code> | |
| − | {{ | ||
| − | < | + | === Team === |
| − | + | Unnamed parameters: | |
| − | + | * <code><nowiki>{{</nowiki>{{BASEPAGENAME}}|''ID''|team=yes<nowiki>}}</nowiki></code> | |
| − | + | * <code><nowiki>{{</nowiki>{{BASEPAGENAME}}|''ID''|''NAME''|team=yes<nowiki>}}</nowiki></code> | |
| − | [[ | + | Named parameters: |
| − | [[ | + | * <code><nowiki>{{</nowiki>{{BASEPAGENAME}}|id=''ID''|team=yes<nowiki>}}</nowiki></code> |
| − | [[ | + | * <code><nowiki>{{</nowiki>{{BASEPAGENAME}}|id=''ID''|name=''NAME''|team=yes<nowiki>}}</nowiki></code> |
| − | </includeonly> | + | |
| + | == TemplateData == | ||
| + | {{TemplateDataHeader}} | ||
| + | <templatedata>{ | ||
| + | "description": "This template displays an external link to an ice hockey player's or team's statistics at HockeyDB.com.", | ||
| + | "params": { | ||
| + | "1": { | ||
| + | "label": "ID", | ||
| + | "aliases": ["id"], | ||
| + | "description": "Player's or team's ID number in the URL. Player: 73288 is the ID in http://www.hockeydb.com/ihdb/stats/pdisplay.php?pid=73288. Team: 690 is the ID in http://www.hockeydb.com/ihdb/stats/teamseasons.php?tid=690.", | ||
| + | "type": "number", | ||
| + | "default": "", | ||
| + | "required": true | ||
| + | }, | ||
| + | "2": { | ||
| + | "label": "Name", | ||
| + | "aliases": ["name","title"], | ||
| + | "description": "Name of player or team. If not given it defaults to the Wikipedia article name, without any disambiguation such as (ice hockey).", | ||
| + | "type": "string", | ||
| + | "default": "{{PAGENAME}}", | ||
| + | "required": false | ||
| + | }, | ||
| + | "team": { | ||
| + | "label": "Team", | ||
| + | "description": "If team=yes, the template will display team statistics instead of individual player statistics.", | ||
| + | "type": "string", | ||
| + | "default": "", | ||
| + | "required": false | ||
| + | } | ||
| + | }}</templatedata> | ||
| + | |||
| + | == Examples == | ||
| + | |||
| + | === Player === | ||
| + | ''Usage:'' <code><nowiki>{{</nowiki>Hockeydb | 73288 | Sidney Crosby }}</code> | ||
| + | * ''Output:'' {{Hockeydb | 73288 | Sidney Crosby }} | ||
| + | * ''URL:'' http://www.hockeydb.com/ihdb/stats/pdisplay.php?pid=73288 | ||
| + | |||
| + | ''Usage:'' <code><nowiki>{{</nowiki>Hockeydb |id= 73288 |name= Sidney Crosby }}</code> | ||
| + | * ''Output:'' {{Hockeydb |id= 73288 |name= Sidney Crosby }} | ||
| + | * ''URL:'' http://www.hockeydb.com/ihdb/stats/pdisplay.php?pid=73288 | ||
| + | |||
| + | ''Usage:'' <code><nowiki>{{</nowiki>Hockeydb |id= 73288 |title= Sidney Crosby }}</code> | ||
| + | * ''Output:'' {{Hockeydb |id= 73288 |title= Sidney Crosby }} | ||
| + | * ''URL:'' http://www.hockeydb.com/ihdb/stats/pdisplay.php?pid=73288 | ||
| + | |||
| + | === Team === | ||
| + | ''Usage:'' <code><nowiki>{{</nowiki>Hockeydb | 690 | Colorado Avalanche |team= yes }}</code> | ||
| + | * ''Output:'' {{Hockeydb | 690 | Colorado Avalanche |team= yes }} | ||
| + | * ''URL:'' http://www.hockeydb.com/ihdb/stats/teamseasons.php?tid=690 | ||
| + | |||
| + | ''Usage:'' <code><nowiki>{{</nowiki>Hockeydb |id= 690 |name= Colorado Avalanche |team= yes }}</code> | ||
| + | * ''Output:'' {{Hockeydb |id= 690 |name= Colorado Avalanche |team= yes }} | ||
| + | * ''URL:'' http://www.hockeydb.com/ihdb/stats/teamseasons.php?tid=690 | ||
| + | |||
| + | ''Usage:'' <code><nowiki>{{</nowiki>Hockeydb |id= 690 |title= Colorado Avalanche |team= yes }}</code> | ||
| + | * ''Output:'' {{Hockeydb |id= 690 |title= Colorado Avalanche |team= yes }} | ||
| + | * ''URL:'' http://www.hockeydb.com/ihdb/stats/teamseasons.php?tid=690 | ||
| + | |||
| + | == See also == | ||
| + | Ice hockey player external link templates: | ||
| + | * Official league websites: | ||
| + | ** {{tl|AHL profile}} | ||
| + | ** {{tl|ECHL profile}} | ||
| + | ** {{tl|EIHL profile}} | ||
| + | ** {{tl|NHL profile}} | ||
| + | ** {{tl|KHL profile}} | ||
| + | * Other websites: | ||
| + | ** {{tl|Eliteprospects}} | ||
| + | ** {{tl|Eurohockey}} | ||
| + | ** {{tl|Hockey-reference}} | ||
| + | ** {{tl|Legendsmember}} | ||
| + | ** {{tl|Legendsofhockey}} | ||
| + | ** {{tl|TSN-NHL profile}} | ||
| + | <includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox|| | ||
| + | <!-- Categories go here and interwikis go in Wikidata. --> | ||
| + | [[Category:Ice hockey external link templates]] | ||
| + | [[Category:WikiProject Ice Hockey templates]] | ||
| + | [[Category:People and person external link templates]] | ||
| + | }}</includeonly> | ||
Revision as of 14:24, 3 May 2014
| This is a documentation subpage for Template:HockeyDB. It contains usage information, categories and other content that is not part of the original template page. |
Template:HockeyDB displays an external link to ice hockey player's or team's statistics at HockeyDB.com.
Usage
Player
Unnamed parameters:
{{HockeyDB|ID}}{{HockeyDB|ID|NAME}}
Named parameters:
{{HockeyDB|id=ID}}{{HockeyDB|id=ID|name=NAME}}
Team
Unnamed parameters:
{{HockeyDB|ID|team=yes}}{{HockeyDB|ID|NAME|team=yes}}
Named parameters:
{{HockeyDB|id=ID|team=yes}}{{HockeyDB|id=ID|name=NAME|team=yes}}
TemplateData
TemplateData for HockeyDB
This template displays an external link to an ice hockey player's or team's statistics at HockeyDB.com.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| ID | 1 id | Player's or team's ID number in the URL. Player: 73288 is the ID in http://www.hockeydb.com/ihdb/stats/pdisplay.php?pid=73288. Team: 690 is the ID in http://www.hockeydb.com/ihdb/stats/teamseasons.php?tid=690.
| Number | required |
| Name | 2 name title | Name of player or team. If not given it defaults to the Wikipedia article name, without any disambiguation such as (ice hockey).
| String | optional |
| Team | team | If team=yes, the template will display team statistics instead of individual player statistics.
| String | optional |
Examples
Player
Usage: {{Hockeydb | 73288 | Sidney Crosby }}
- Output: Sidney Crosby career statistics at The Internet Hockey DatabaseScript error: No such module "EditAtWikidata".
- URL: http://www.hockeydb.com/ihdb/stats/pdisplay.php?pid=73288
Usage: {{Hockeydb |id= 73288 |name= Sidney Crosby }}
- Output: Sidney Crosby career statistics at The Internet Hockey DatabaseScript error: No such module "EditAtWikidata".
- URL: http://www.hockeydb.com/ihdb/stats/pdisplay.php?pid=73288
Usage: {{Hockeydb |id= 73288 |title= Sidney Crosby }}
- Output: Template:PAGENAMEBASE career statistics at The Internet Hockey DatabaseScript error: No such module "EditAtWikidata".
- URL: http://www.hockeydb.com/ihdb/stats/pdisplay.php?pid=73288
Team
Usage: {{Hockeydb | 690 | Colorado Avalanche |team= yes }}
- Output: Colorado Avalanche career statistics at The Internet Hockey DatabaseScript error: No such module "EditAtWikidata".
- URL: http://www.hockeydb.com/ihdb/stats/teamseasons.php?tid=690
Usage: {{Hockeydb |id= 690 |name= Colorado Avalanche |team= yes }}
- Output: Colorado Avalanche career statistics at The Internet Hockey DatabaseScript error: No such module "EditAtWikidata".
- URL: http://www.hockeydb.com/ihdb/stats/teamseasons.php?tid=690
Usage: {{Hockeydb |id= 690 |title= Colorado Avalanche |team= yes }}
- Output: Template:PAGENAMEBASE career statistics at The Internet Hockey DatabaseScript error: No such module "EditAtWikidata".
- URL: http://www.hockeydb.com/ihdb/stats/teamseasons.php?tid=690
See also
Ice hockey player external link templates:
- Official league websites:
- {{AHL profile}}
- {{ECHL profile}}
- {{EIHL profile}}
- {{NHL profile}}
- {{KHL profile}}
- Other websites:
- {{Eliteprospects}}
- {{Eurohockey}}
- {{Hockey-reference}}
- {{Legendsmember}}
- {{Legendsofhockey}}
- {{TSN-NHL profile}}