Difference between revisions of "Template:HockeyDB/doc"
imported>Djsasso |
imported>Vanisaac m (→See also: clean up per WP:CAT#T and WP:AWBREQ add template:Sandbox other) |
||
| (6 intermediate revisions by 3 users not shown) | |||
| Line 4: | Line 4: | ||
{{Lua|Module:EditAtWikidata}} | {{Lua|Module:EditAtWikidata}} | ||
| − | '''{{NAMESPACE}}:{{BASEPAGENAME}}''' displays an external link to [[ice hockey]] player | + | '''{{NAMESPACE}}:{{BASEPAGENAME}}''' displays an external link to [[ice hockey]] player's statistics at [http://www.hockeydb.com HockeyDB.com]. It is intended for use in the [[Wikipedia:External links|external links]] section of an article. |
== Usage == | == Usage == | ||
| − | |||
Unnamed parameters: | Unnamed parameters: | ||
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | ''ID'' }}</code> | : <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | ''ID'' }}</code> | ||
| Line 17: | Line 16: | ||
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | id= ''ID'' | name= ''NAME'' }}</code> | : <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | id= ''ID'' | name= ''NAME'' }}</code> | ||
| − | Using [[Wikidata]] property | + | Using [[Wikidata]] property {{Property|2602}}: |
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>}}</nowiki></code> | : <code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>}}</nowiki></code> | ||
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | name= ''NAME'' }}</code> | : <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | name= ''NAME'' }}</code> | ||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
== Examples == | == Examples == | ||
| − | === | + | === Unnamed parameters === |
| − | http://www.hockeydb.com/ihdb/stats/pdisplay.php?pid=73288 | + | ''URL:'' |
| − | + | : <kbd>[http://www.hockeydb.com/ihdb/stats/pdisplay.php?pid=73288 http://www.hockeydb.com/ihdb/stats/pdisplay.php?pid={{hilite|73288}}]</kbd> | |
| − | |||
| − | : | ||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | + | ''Usage:'' | |
| − | : <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | | + | : <code><nowiki>* {{</nowiki>{{BASEPAGENAME}} | 73288 | Sidney Crosby }}</code> |
| − | |||
| − | + | ''Output:'' | |
| − | : | + | :* {{{{BASEPAGENAME}} | 73288 | Sidney Crosby }} |
| − | : {{{{BASEPAGENAME}} | ||
| − | === | + | === Named parameters === |
| − | http://www.hockeydb.com/ihdb/stats/ | + | ''URL:'' |
| + | : <kbd>[http://www.hockeydb.com/ihdb/stats/pdisplay.php?pid=203186 http://www.hockeydb.com/ihdb/stats/pdisplay.php?pid={{hilite|203186}}]</kbd> | ||
| − | + | ''Usage:'' | |
| − | : <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | | + | : <code><nowiki>* {{</nowiki>{{BASEPAGENAME}} | id= 203186 | name= Amanda Leveille }}</code> |
| − | |||
| − | + | ''Output:'' | |
| − | : | + | :* {{{{BASEPAGENAME}} | id= 203186 | name= Amanda Leveille }} |
| − | : {{{{BASEPAGENAME}} | ||
| − | + | === No parameters and Wikidata property not defined === | |
| − | : <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | + | ''Usage:'' |
| − | + | : <code><nowiki>* {{</nowiki>{{BASEPAGENAME}}<nowiki>}}</nowiki></code> | |
| − | + | ''Output:'' | |
| − | : | + | :* {{ {{BASEPAGENAME}} }} |
| − | : {{{{BASEPAGENAME}} | ||
== TemplateData == | == TemplateData == | ||
| Line 74: | Line 53: | ||
<templatedata> | <templatedata> | ||
{ | { | ||
| − | "description": "This template displays an external link to ice hockey player | + | "description": "This template displays an external link to ice hockey player's statistics at HockeyDB.com. It is intended for use in the external links section of an article.", |
"params": { | "params": { | ||
"id": { | "id": { | ||
"label": "id", | "label": "id", | ||
"aliases": ["1"], | "aliases": ["1"], | ||
| − | "description": "Player | + | "description": "Player's ID number in the URL. Example: 73288 is the ID in http://www.hockeydb.com/ihdb/stats/pdisplay.php?pid=73288. This parameter is optional if Wikidata property P2602 exists, but required if not.", |
"type": "number", | "type": "number", | ||
"required": false, | "required": false, | ||
| − | "default": "Wikidata property P2602 | + | "default": "Wikidata property P2602" |
}, | }, | ||
"name": { | "name": { | ||
"label": "name", | "label": "name", | ||
| − | "aliases": [ | + | "aliases": ["2"], |
| − | "description": "Name of player | + | "description": "Name of player. If not given it defaults to the Wikipedia article name, without any disambiguation such as (ice hockey).", |
"type": "string", | "type": "string", | ||
"required": false, | "required": false, | ||
"default": "{{PAGENAMEBASE}}" | "default": "{{PAGENAMEBASE}}" | ||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
} | } | ||
}, | }, | ||
"paramOrder": [ | "paramOrder": [ | ||
"id", | "id", | ||
| − | "name | + | "name" |
| − | |||
] | ] | ||
} | } | ||
| Line 109: | Line 81: | ||
== See also == | == See also == | ||
Ice hockey player external link templates: | Ice hockey player external link templates: | ||
| + | * {{tl|Ice hockey stats}} | ||
* Official league websites: | * Official league websites: | ||
** {{tl|AHL profile}} | ** {{tl|AHL profile}} | ||
| Line 122: | Line 95: | ||
** {{tl|Legendsofhockey}} | ** {{tl|Legendsofhockey}} | ||
** {{tl|TSN-NHL profile}} | ** {{tl|TSN-NHL profile}} | ||
| − | <includeonly>{{ | + | |
| + | <includeonly>{{Sandbox other|| | ||
<!-- Categories go here and interwikis go in Wikidata. --> | <!-- Categories go here and interwikis go in Wikidata. --> | ||
[[Category:Ice hockey external link templates]] | [[Category:Ice hockey external link templates]] | ||
Latest revision as of 16:56, 25 April 2020
| 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. |
| This template uses Lua: |
Template:HockeyDB displays an external link to ice hockey player's statistics at HockeyDB.com. It is intended for use in the external links section of an article.
Contents
Usage
Unnamed parameters:
{{HockeyDB | ID }}{{HockeyDB | ID | NAME }}
Named parameters:
{{HockeyDB | id= ID }}{{HockeyDB | id= ID | name= NAME }}
Using Wikidata property Template:Property:
{{HockeyDB}}{{HockeyDB | name= NAME }}
Examples
Unnamed parameters
URL:
Usage:
* {{HockeyDB | 73288 | Sidney Crosby }}
Output:
- Sidney Crosby career statistics at The Internet Hockey DatabaseScript error: No such module "EditAtWikidata".
Named parameters
URL:
Usage:
* {{HockeyDB | id= 203186 | name= Amanda Leveille }}
Output:
- Amanda Leveille career statistics at The Internet Hockey DatabaseScript error: No such module "EditAtWikidata".
No parameters and Wikidata property not defined
Usage:
* {{HockeyDB}}
Output:
- Template:PAGENAMEBASE career statistics at The Internet Hockey DatabaseScript error: No such module "EditAtWikidata".
TemplateData
TemplateData for HockeyDB
This template displays an external link to ice hockey player's statistics at HockeyDB.com. It is intended for use in the external links section of an article.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| id | id 1 | Player's ID number in the URL. Example: 73288 is the ID in http://www.hockeydb.com/ihdb/stats/pdisplay.php?pid=73288. This parameter is optional if Wikidata property P2602 exists, but required if not.
| Number | optional |
| name | name 2 | Name of player. If not given it defaults to the Wikipedia article name, without any disambiguation such as (ice hockey).
| String | optional |
See also
Ice hockey player external link templates:
- {{Ice hockey stats}}
- Official league websites:
- {{AHL profile}}
- {{ECHL profile}}
- {{EIHL profile}}
- {{NHL profile}}
- {{KHL profile}}
- Other websites:
- {{Eliteprospects}}
- {{Eurohockey}}
- {{Hockey-reference}}
- {{Legendsmember}}
- {{Legendsofhockey}}
- {{TSN-NHL profile}}