Difference between revisions of "Template:Eliteprospects/doc"

From blackwiki
Jump to navigation Jump to search
imported>Zyxw
m (→‎Tracking categories: update category links using AWB)
imported>Zyxw
m (→‎Tracking categories: remove unused category)
 
(14 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
{{Documentation subpage}}
 
{{Documentation subpage}}
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
+
<!-- Place categories where indicated at the bottom of this page and interwikis at Wikidata -->
 
{{Uses Wikidata|P2481}}
 
{{Uses Wikidata|P2481}}
 
{{Tracks Wikidata|P2481}}
 
{{Tracks Wikidata|P2481}}
 +
{{Lua|Module:WikidataCheck|Module:EditAtWikidata}}
  
'''{{NAMESPACE}}:{{BASEPAGENAME}}''' displays an external link to an [[ice hockey]] player's profile at [http://www.eliteprospects.com EliteProspects.com].
+
'''{{NAMESPACE}}:{{BASEPAGENAME}}''' displays an external link to an [[ice hockey]] player's profile at [http://www.eliteprospects.com EliteProspects.com]. It is intended for use in the [[Wikipedia:External links|external links]] section of an article.
  
 
== Usage ==
 
== Usage ==
;No parameters:
+
Unnamed parameters:
:(Uses ID from Wikidata, and page name)
+
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | ''ID'' }}</code>
 +
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | ''ID'' | ''NAME'' }}</code>
 +
 
 +
Named parameters:
 +
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | id= ''ID'' }}</code>
 +
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | id= ''ID'' | name= ''NAME'' }}</code>
 +
 
 +
Using [[Wikidata]] property {{Property|2481}}:
 
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>}}</nowiki></code>
 
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>}}</nowiki></code>
;Unnamed parameters:
+
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | name= ''NAME'' }}</code>
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}}|''ID''|''NAME''<nowiki>}}</nowiki></code>
 
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}}|''ID''<nowiki>}}</nowiki></code>
 
;Named parameters:
 
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}}|id=''ID''|name=''NAME''<nowiki>}}</nowiki></code>
 
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}}|id=''ID''<nowiki>}}</nowiki></code>
 
 
 
== TemplateData ==
 
{{TemplateDataHeader}}
 
<templatedata>{
 
"description": "This template displays an external link to an ice hockey player's profile at EliteProspects.com.",
 
"params": {
 
  "1": {
 
    "label": "ID",
 
    "aliases": ["id"],
 
    "description": "Player's ID number in the URL. Example: 2092 is the ID in http://www.eliteprospects.com/player.php?player=2092&lang=en",
 
    "type": "number",
 
    "default": "",
 
    "required": false
 
  },
 
  "2": {
 
    "label": "Name",
 
    "aliases": ["name","title"],
 
    "description": "Name of player. If not given it defaults to the Wikipedia article name, without any disambiguation such as (ice hockey).",
 
    "type": "string",
 
    "default": "{{PAGENAME}}",
 
    "required": false
 
  }
 
}}</templatedata>
 
  
 
== Examples ==
 
== Examples ==
  
 
=== Unnamed parameters ===
 
=== Unnamed parameters ===
 +
''URLs:''
 +
: <kbd>[http://www.eliteprospects.com/player.php?player=2092&lang=en http://www.eliteprospects.com/player.php?player={{hilite|2092}}&lang=en]</kbd>
 +
: <kbd>[https://www.eliteprospects.com/player/2092/tomi-kallio https://www.eliteprospects.com/player/{{hilite|2092}}/tomi-kallio]</kbd>
 +
 
''Usage:''
 
''Usage:''
* <code><nowiki>{{</nowiki>Eliteprospects | 2092 | Tomi Kallio }}</code>
+
: <code><nowiki>* {{</nowiki>{{BASEPAGENAME}} | 2092 | Tomi Kallio }}</code>
 +
 
 
''Output:''
 
''Output:''
* {{Eliteprospects | 2092 | Tomi Kallio }}
+
:* {{{{BASEPAGENAME}} | 2092 | Tomi Kallio }}
''URL:''
 
* http://www.eliteprospects.com/player.php?player=2092&lang=en
 
  
 
=== Named parameters ===
 
=== Named parameters ===
; name
+
''URLs:''
 +
: <kbd>[http://www.eliteprospects.com/player.php?player=13346&lang=en http://www.eliteprospects.com/player.php?player={{hilite|13346}}&lang=en]</kbd>
 +
: <kbd>[https://www.eliteprospects.com/player/13346/hayley-wickenheiser https://www.eliteprospects.com/player/{{hilite|13346}}/hayley-wickenheiser]</kbd>
 +
 
 
''Usage:''
 
''Usage:''
* <code><nowiki>{{</nowiki>Eliteprospects |id= 9678 |name= Wayne Gretzky }}</code>
+
: <code><nowiki>* {{</nowiki>{{BASEPAGENAME}} | id= 13346 | name= Hayley Wickenheiser <nowiki>}}</nowiki></code>
 +
 
 
''Output:''
 
''Output:''
* {{Eliteprospects |id= 9678 |name= Wayne Gretzky }}
+
:* {{{{BASEPAGENAME}} | id= 13346 | name= Hayley Wickenheiser  }}
''URL:''
 
* http://www.eliteprospects.com/player.php?player=9678&lang=en
 
  
; title
+
=== No parameters and Wikidata property not defined ===
 
''Usage:''
 
''Usage:''
* <code><nowiki>{{</nowiki>Eliteprospects |id= 8627 |title= Jaromír Jágr }}</code>
+
: <code><nowiki>* {{</nowiki>{{BASEPAGENAME}}<nowiki>}}</nowiki></code>
 +
 
 
''Output:''
 
''Output:''
* {{Eliteprospects |id= 8627 |title= Jaromír Jágr }}
+
:* {{ {{BASEPAGENAME}} }}
''URL:''
+
 
* http://www.eliteprospects.com/player.php?player=8627&lang=en
+
== TemplateData ==
 +
{{TemplateData header}}
 +
<templatedata>
 +
{
 +
  "description": "This template displays an external link to an ice hockey player's profile at EliteProspects.com. It is intended for use in the external links section of an article.",
 +
  "params": {
 +
    "id": {
 +
      "label": "EliteProspects player ID",
 +
      "aliases": ["1"],
 +
      "description": "The \"id\" parameter (or unnamed parameter \"1\") should contain the ID portion of the URL. Example: 2092 is the ID portion of http://www.eliteprospects.com/player.php?player=2092&lang=en. This parameter is optional if Wikidata property P2481 exists, but required if not.",
 +
      "type": "number",
 +
      "required": false,
 +
      "default": "Wikidata property P2481"
 +
    },
 +
    "name": {
 +
      "label": "Player's name",
 +
      "aliases": ["title","2"],
 +
      "description": "The \"name\" parameter (or \"title\" or unnamed parameter \"2\") may be used to specify the link text, which should be the name of the player. This parameter is optional; it defaults to the Wikipedia article name, without any disambiguation such as \"(ice hockey)\".",
 +
      "type": "string",
 +
      "required": false,
 +
      "default": "{{PAGENAMEBASE}}"
 +
    }
 +
  },
 +
  "paramOrder": [
 +
    "id",
 +
    "name"
 +
  ]
 +
}
 +
</templatedata>
  
==Tracking categories==
+
== Tracking categories ==
 +
; "id" parameter exists
 +
* {{clc|Elite Prospects player ID different from Wikidata}}
 
* {{clc|Elite Prospects player ID not in Wikidata}}
 
* {{clc|Elite Prospects player ID not in Wikidata}}
* {{clc|Elite Prospects player ID different from Wikidata}}
+
; "id" parameter does not exist
* {{clc|Elite Prospects player ID same as Wikidata}}
+
* {{clc|Eliteprospects template missing ID and not in Wikidata}}
* {{cl|Eliteprospects template with no id set}} (exists in template, not created)
 
  
 
== 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 84: Line 100:
 
* Other websites:
 
* Other websites:
 
** {{tl|Eurohockey}}
 
** {{tl|Eurohockey}}
** {{tl|Hockeydb}}
+
** {{tl|HockeyDB}}
 
** {{tl|Hockey-reference}}
 
** {{tl|Hockey-reference}}
 
** {{tl|Legendsmember}}
 
** {{tl|Legendsmember}}
Line 91: Line 107:
  
 
<includeonly>{{sandbox other||
 
<includeonly>{{sandbox other||
<!-- Categories below this line, please; interwikis at Wikidata -->
+
<!-- Categories below this line; interwikis at Wikidata -->
 
[[Category:Ice hockey external link templates]]
 
[[Category:Ice hockey external link templates]]
 
[[Category:WikiProject Ice Hockey templates]]
 
[[Category:WikiProject Ice Hockey templates]]
 
[[Category:People and person external link templates]]
 
[[Category:People and person external link templates]]
 +
[[Category:External link templates using Wikidata]]
 
[[Category:Templates that add a tracking category]]
 
[[Category:Templates that add a tracking category]]
 
 
}}</includeonly>
 
}}</includeonly>

Latest revision as of 17:43, 10 May 2020

Template:Uses Wikidata Template:Tracks Wikidata

Template:Eliteprospects displays an external link to an ice hockey player's profile at EliteProspects.com. It is intended for use in the external links section of an article.

Usage

Unnamed parameters:

{{Eliteprospects | ID }}
{{Eliteprospects | ID | NAME }}

Named parameters:

{{Eliteprospects | id= ID }}
{{Eliteprospects | id= ID | name= NAME }}

Using Wikidata property Template:Property:

{{Eliteprospects}}
{{Eliteprospects | name= NAME }}

Examples

Unnamed parameters

URLs:

http://www.eliteprospects.com/player.php?player=2092&lang=en
https://www.eliteprospects.com/player/2092/tomi-kallio

Usage:

* {{Eliteprospects | 2092 | Tomi Kallio }}

Output:

Named parameters

URLs:

http://www.eliteprospects.com/player.php?player=13346&lang=en
https://www.eliteprospects.com/player/13346/hayley-wickenheiser

Usage:

* {{Eliteprospects | id= 13346 | name= Hayley Wickenheiser }}

Output:

No parameters and Wikidata property not defined

Usage:

* {{Eliteprospects}}

Output:

TemplateData

This is the TemplateData documentation for this template used by VisualEditor and other tools; see the monthly parameter usage report for this template.

TemplateData for Eliteprospects

This template displays an external link to an ice hockey player's profile at EliteProspects.com. It is intended for use in the external links section of an article.

Template parameters

ParameterDescriptionTypeStatus
EliteProspects player IDid 1

The "id" parameter (or unnamed parameter "1") should contain the ID portion of the URL. Example: 2092 is the ID portion of http://www.eliteprospects.com/player.php?player=2092&lang=en. This parameter is optional if Wikidata property P2481 exists, but required if not.

Default
Wikidata property P2481
Numberoptional
Player's namename title 2

The "name" parameter (or "title" or unnamed parameter "2") may be used to specify the link text, which should be the name of the player. This parameter is optional; it defaults to the Wikipedia article name, without any disambiguation such as "(ice hockey)".

Default
{{PAGENAMEBASE}}
Stringoptional

Tracking categories

"id" parameter exists
"id" parameter does not exist

See also

Ice hockey player external link templates: