Difference between revisions of "Template:Eliteprospects/doc"

From blackwiki
Jump to navigation Jump to search
imported>Zyxw
(update TemplateData and categories)
imported>Zyxw
(note use of modules, misc formatting)
Line 3: Line 3:
 
{{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]. It is intended for use in the [[Wikipedia:External links|external links]] section of an article.
 
'''{{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.
Line 18: Line 19:
 
: <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>
 
== 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",
 
      "default": "Wikidata property P2481",
 
      "required": false
 
    },
 
    "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",
 
      "default": "{{PAGENAMEBASE}}",
 
      "required": false
 
    }
 
  },
 
  "paramOrder": [
 
    "id",
 
    "name"
 
  ]
 
}
 
</templatedata>
 
  
 
== Examples ==
 
== Examples ==
  
 
=== Unnamed parameters ===
 
=== Unnamed parameters ===
 +
''URL:''
 +
: <tt>[http://www.eliteprospects.com/player.php?player=2092&lang=en http://www.eliteprospects.com/player.php?player={{hilite|2092}}&lang=en]</tt>
 
''Usage:''
 
''Usage:''
 
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | 2092 | Tomi Kallio }}</code>
 
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | 2092 | Tomi Kallio }}</code>
 
''Output:''
 
''Output:''
 
: {{{{BASEPAGENAME}} | 2092 | Tomi Kallio }}
 
: {{{{BASEPAGENAME}} | 2092 | Tomi Kallio }}
''URL:''
 
: <tt>[http://www.eliteprospects.com/player.php?player=2092&lang=en http://www.eliteprospects.com/player.php?player={{hilite|2092}}&lang=en]</tt>
 
  
 
=== Named parameters ===
 
=== Named parameters ===
 
; name
 
; name
 +
''URL:''
 +
: <tt>[http://www.eliteprospects.com/player.php?player=9678&lang=en http://www.eliteprospects.com/player.php?player={{hilite|9678}}&lang=en]</tt>
 
''Usage:''
 
''Usage:''
 
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | id= 9678 | name= Wayne Gretzky <nowiki>}}</nowiki></code>
 
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | id= 9678 | name= Wayne Gretzky <nowiki>}}</nowiki></code>
 
''Output:''
 
''Output:''
 
: {{{{BASEPAGENAME}} | id= 9678 | name= Wayne Gretzky }}
 
: {{{{BASEPAGENAME}} | id= 9678 | name= Wayne Gretzky }}
''URL:''
 
: <tt>[http://www.eliteprospects.com/player.php?player=9678&lang=en http://www.eliteprospects.com/player.php?player={{hilite|9678}}&lang=en]</tt>
 
  
 
; title
 
; title
 +
''URL:''
 +
: <tt>[http://www.eliteprospects.com/player.php?player=8627&lang=en http://www.eliteprospects.com/player.php?player={{hilite|8627}}&lang=en]</tt>
 
''Usage:''
 
''Usage:''
 
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | id= 8627 | title= Jaromír Jágr <nowiki>}}</nowiki></code>
 
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | id= 8627 | title= Jaromír Jágr <nowiki>}}</nowiki></code>
 
''Output:''
 
''Output:''
 
: {{{{BASEPAGENAME}} | id= 8627 | title= Jaromír Jágr }}
 
: {{{{BASEPAGENAME}} | id= 8627 | title= Jaromír Jágr }}
''URL:''
 
: <tt>[http://www.eliteprospects.com/player.php?player=8627&lang=en http://www.eliteprospects.com/player.php?player={{hilite|8627}}&lang=en]</tt>
 
  
 
=== No parameters and Wikidata property not defined ===
 
=== No parameters and Wikidata property not defined ===
Line 81: Line 52:
 
''Output:''
 
''Output:''
 
: {{ {{BASEPAGENAME}} }}
 
: {{ {{BASEPAGENAME}} }}
 +
 +
== 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 ==

Revision as of 10:28, 25 April 2017

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 P2481:

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

Examples

Unnamed parameters

URL:

http://www.eliteprospects.com/player.php?player=2092&lang=en

Usage:

{{Eliteprospects | 2092 | Tomi Kallio }}

Output:

Tomi Kallio career statistics at EliteProspects.comScript error: No such module "EditAtWikidata".Template:WikidataCheck

Named parameters

name

URL:

http://www.eliteprospects.com/player.php?player=9678&lang=en

Usage:

{{Eliteprospects | id= 9678 | name= Wayne Gretzky }}

Output:

Wayne Gretzky career statistics at EliteProspects.comScript error: No such module "EditAtWikidata".Template:WikidataCheck
title

URL:

http://www.eliteprospects.com/player.php?player=8627&lang=en

Usage:

{{Eliteprospects | id= 8627 | title= Jaromír Jágr }}

Output:

Jaromír Jágr career statistics at EliteProspects.comScript error: No such module "EditAtWikidata".Template:WikidataCheck

No parameters and Wikidata property not defined

Usage:

{{Eliteprospects}}

Output:

Template:PAGENAMEBASE career statistics at EliteProspects.comScript error: No such module "EditAtWikidata".Template:WikidataCheck

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

See also

Ice hockey player external link templates: