Difference between revisions of "Template:BWF/doc"

From blackwiki
Jump to navigation Jump to search
imported>Zyxw
(revert to http: for links since this website frequently will not display links using https:)
imported>Zyxw
(use https, document optional "member_id" parameter, misc formatting)
Line 8: Line 8:
  
 
== Usage ==
 
== Usage ==
Unnamed parameters:
+
; Unnamed parameters
 
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | ''ID'' }}</code>
 
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | ''ID'' }}</code>
 
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | ''ID'' | ''NAME'' }}</code>
 
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | ''ID'' | ''NAME'' }}</code>
  
Named parameters:
+
; Named parameters
 
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | id= ''ID'' }}</code>
 
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | id= ''ID'' }}</code>
 
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | id= ''ID'' | name= ''NAME'' }}</code>
 
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | id= ''ID'' | name= ''NAME'' }}</code>
 
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | id= ''ID'' | name= ''NAME'' | archive= ''NUMBER'' }}</code>
 
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | id= ''ID'' | name= ''NAME'' | archive= ''NUMBER'' }}</code>
 +
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | id= ''ID'' | name= ''NAME'' | member_id= ''NUMBER'' }}</code>
 +
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | id= ''ID'' | name= ''NAME'' | archive= ''NUMBER'' | member_id= ''NUMBER'' }}</code>
  
Using [[Wikidata]] property [[d:Property:P2729|P2729]]:
+
; Using [[Wikidata]] property {{Property|P2729|id=first}}
 
: <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>
 
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | name= ''NAME'' | archive= ''NUMBER'' }}</code>
 
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | name= ''NAME'' | archive= ''NUMBER'' }}</code>
 +
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | name= ''NAME'' | member_id= ''NUMBER'' }}</code>
 +
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | name= ''NAME'' | archive= ''NUMBER'' | member_id= ''NUMBER'' }}</code>
  
 
== Examples ==
 
== Examples ==
  
 
=== Unnamed parameters ===
 
=== Unnamed parameters ===
''URL:''
+
; URL
: <kbd>[http://bwf.tournamentsoftware.com/player-profile/A8B4DEC1-972C-4517-9D80-4FBB300F91ED http://bwf.tournamentsoftware.com/player-profile/{{hilite|A8B4DEC1-972C-4517-9D80-4FBB300F91ED}}]</kbd>
+
: <kbd>[https://bwf.tournamentsoftware.com/player-profile/A8B4DEC1-972C-4517-9D80-4FBB300F91ED https://bwf.tournamentsoftware.com/player-profile/{{hilite|A8B4DEC1-972C-4517-9D80-4FBB300F91ED}}]</kbd>
  
''Usage:''
+
; Usage
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | A8B4DEC1-972C-4517-9D80-4FBB300F91ED | Li Xuerui }}</code>
+
: <code><nowiki>* {{</nowiki>{{BASEPAGENAME}} | A8B4DEC1-972C-4517-9D80-4FBB300F91ED | Li Xuerui }}</code>
  
''Output:''
+
; Output
: {{{{BASEPAGENAME}} | A8B4DEC1-972C-4517-9D80-4FBB300F91ED | Li Xuerui }}
+
:* {{{{BASEPAGENAME}} | A8B4DEC1-972C-4517-9D80-4FBB300F91ED | Li Xuerui }}
  
 
=== Named parameters ===
 
=== Named parameters ===
''URL:''
+
; URLs
: <kbd>[http://bwf.tournamentsoftware.com/player-profile/8DB65BF4-2593-4835-8ADF-36F6656B4217 http://bwf.tournamentsoftware.com/player-profile/{{hilite|8DB65BF4-2593-4835-8ADF-36F6656B4217}}]</kbd>
+
: <kbd>[https://bwf.tournamentsoftware.com/player-profile/8DB65BF4-2593-4835-8ADF-36F6656B4217 https://bwf.tournamentsoftware.com/player-profile/{{hilite|8DB65BF4-2593-4835-8ADF-36F6656B4217}}]</kbd>
 +
: <kbd>[https://bwf.tournamentsoftware.com/find.aspx?a=8&oid=209B123F-AA87-41A2-BC3E-CB57133E64CC&q=77427 https://bwf.tournamentsoftware.com/find.aspx?a=8&oid=209B123F-AA87-41A2-BC3E-CB57133E64CC&q={{hilite|77427|lightgreen}}]</kbd>
  
''Usage:''
+
; Usage
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} |id= 8DB65BF4-2593-4835-8ADF-36F6656B4217 |name= Lu Guangzu |archive= 20180720081247 }}</code>
+
: <code><nowiki>* {{</nowiki>{{BASEPAGENAME}} |id= 8DB65BF4-2593-4835-8ADF-36F6656B4217 |name= Lu Guangzu }}</code>
 +
: <code><nowiki>* {{</nowiki>{{BASEPAGENAME}} |id= 8DB65BF4-2593-4835-8ADF-36F6656B4217 |name= Lu Guangzu |archive= 20180720081247 }}</code>
 +
: <code><nowiki>* {{</nowiki>{{BASEPAGENAME}} |id= 8DB65BF4-2593-4835-8ADF-36F6656B4217 |name= Lu Guangzu |member_id= 77427 }}</code>
 +
: <code><nowiki>* {{</nowiki>{{BASEPAGENAME}} |id= 8DB65BF4-2593-4835-8ADF-36F6656B4217 |name= Lu Guangzu |archive= 20180720081247 |member_id= 77427 }}</code>
  
''Output:''
+
; Output
: {{{{BASEPAGENAME}} |id= 8DB65BF4-2593-4835-8ADF-36F6656B4217 |name= Lu Guangzu |archive= 20180720081247 }}
+
:* {{{{BASEPAGENAME}} |id= 8DB65BF4-2593-4835-8ADF-36F6656B4217 |name= Lu Guangzu }}
 +
:* {{{{BASEPAGENAME}} |id= 8DB65BF4-2593-4835-8ADF-36F6656B4217 |name= Lu Guangzu |archive= 20180720081247 }}
 +
:* {{{{BASEPAGENAME}} |id= 8DB65BF4-2593-4835-8ADF-36F6656B4217 |name= Lu Guangzu |member_id= 77427 }}
 +
:* {{{{BASEPAGENAME}} |id= 8DB65BF4-2593-4835-8ADF-36F6656B4217 |name= Lu Guangzu |archive= 20180720081247 |member_id= 77427 }}
  
 
=== No parameters and Wikidata property not defined ===
 
=== No parameters and Wikidata property not defined ===
''Usage:''
+
; Usage
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>}}</nowiki></code>
+
: <code><nowiki>* {{</nowiki>{{BASEPAGENAME}}<nowiki>}}</nowiki></code>
  
''Output:''
+
; Output
: {{ {{BASEPAGENAME}} }}
+
:* {{ {{BASEPAGENAME}} }}
  
 
== TemplateData ==
 
== TemplateData ==
Line 60: Line 71:
 
       "label": "id",
 
       "label": "id",
 
       "aliases": ["1"],
 
       "aliases": ["1"],
       "description": "The \"id\" parameter (or unnamed parameter \"1\") should contain the ID portion of the URL. Example: A8B4DEC1-972C-4517-9D80-4FBB300F91ED is the ID portion of http://bwf.tournamentsoftware.com/player-profile/8DB65BF4-2593-4835-8ADF-36F6656B4217. This parameter is optional if Wikidata property P2729 exists, but required if not.",
+
       "description": "The \"id\" parameter (or unnamed parameter \"1\") should contain the ID portion of the URL. Example: A8B4DEC1-972C-4517-9D80-4FBB300F91ED is the ID portion of https://bwf.tournamentsoftware.com/player-profile/8DB65BF4-2593-4835-8ADF-36F6656B4217. This parameter is optional if Wikidata property P2729 exists, but required if not.",
 
       "type": "string",
 
       "type": "string",
 
       "required": false,
 
       "required": false,
Line 75: Line 86:
 
     "archive": {
 
     "archive": {
 
       "label": "archive",
 
       "label": "archive",
       "description": "Number representing the date/time in an Internet Archive URL, such as 20180720081247 in https://web.archive.org/web/20180720081247/http://bwf.tournamentsoftware.com/player-profile/8DB65BF4-2593-4835-8ADF-36F6656B4217.",
+
       "description": "Number representing the date/time in an Internet Archive URL, such as 20180720081247 in https://web.archive.org/web/20180720081247/https://bwf.tournamentsoftware.com/player-profile/8DB65BF4-2593-4835-8ADF-36F6656B4217.",
 +
      "type": "number",
 +
      "required": false
 +
    },
 +
    "member_id": {
 +
      "label": "member_id",
 +
      "description": "The \"member_id\" parameter may be used to display an alternative link for the same badminton player. When viewing the main link, this number will be displayed within parentheses next to the player's name, such as \"LU Guangzu (77427)\". Example: \"member_id=77427\" will add an alternative link to https://bwf.tournamentsoftware.com/find.aspx?a=8&oid=209B123F-AA87-41A2-BC3E-CB57133E64CC&q=77427.",
 
       "type": "number",
 
       "type": "number",
 
       "required": false
 
       "required": false
Line 83: Line 100:
 
     "id",
 
     "id",
 
     "name",
 
     "name",
     "archive"
+
     "archive",
 +
    "member_id"
 
   ]
 
   ]
 
}
 
}
Line 109: Line 127:
 
[[Category:Sports governing body external link templates]]
 
[[Category:Sports governing body external link templates]]
 
[[Category:External link templates using Wikidata]]
 
[[Category:External link templates using Wikidata]]
 +
[[Category:External link templates with archive parameter]]
 +
[[Category:Templates containing multiple external links‎]]
 
[[Category:Templates that add a tracking category]]
 
[[Category:Templates that add a tracking category]]
[[Category:External link templates with archive parameter]]
 
 
}}</includeonly>
 
}}</includeonly>

Revision as of 05:55, 27 December 2018

Template:Uses Wikidata Template:Tracks Wikidata

Template:BWF displays an external link to a badminton player's profile at BWFbadminton.org, an official website of the Badminton World Federation (BWF). The actual URL links to the BWF.tournamentsoftware.com website. It is intended for use in the external links section of an article.

Usage

Unnamed parameters
{{BWF | ID }}
{{BWF | ID | NAME }}
Named parameters
{{BWF | id= ID }}
{{BWF | id= ID | name= NAME }}
{{BWF | id= ID | name= NAME | archive= NUMBER }}
{{BWF | id= ID | name= NAME | member_id= NUMBER }}
{{BWF | id= ID | name= NAME | archive= NUMBER | member_id= NUMBER }}
Using Wikidata property Template:Property
{{BWF}}
{{BWF | name= NAME }}
{{BWF | name= NAME | archive= NUMBER }}
{{BWF | name= NAME | member_id= NUMBER }}
{{BWF | name= NAME | archive= NUMBER | member_id= NUMBER }}

Examples

Unnamed parameters

URL
https://bwf.tournamentsoftware.com/player-profile/A8B4DEC1-972C-4517-9D80-4FBB300F91ED
Usage
* {{BWF | A8B4DEC1-972C-4517-9D80-4FBB300F91ED | Li Xuerui }}
Output

Named parameters

URLs
https://bwf.tournamentsoftware.com/player-profile/8DB65BF4-2593-4835-8ADF-36F6656B4217
https://bwf.tournamentsoftware.com/find.aspx?a=8&oid=209B123F-AA87-41A2-BC3E-CB57133E64CC&q=77427
Usage
* {{BWF |id= 8DB65BF4-2593-4835-8ADF-36F6656B4217 |name= Lu Guangzu }}
* {{BWF |id= 8DB65BF4-2593-4835-8ADF-36F6656B4217 |name= Lu Guangzu |archive= 20180720081247 }}
* {{BWF |id= 8DB65BF4-2593-4835-8ADF-36F6656B4217 |name= Lu Guangzu |member_id= 77427 }}
* {{BWF |id= 8DB65BF4-2593-4835-8ADF-36F6656B4217 |name= Lu Guangzu |archive= 20180720081247 |member_id= 77427 }}
Output

No parameters and Wikidata property not defined

Usage
* {{BWF}}
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 BWF

This template displays an external link to a badminton player's profile at BWFbadminton.org, an official website of the Badminton World Federation (BWF). The actual URL links to the BWF.tournamentsoftware.com website. It is intended for use in the external links section of an article.

Template parameters

ParameterDescriptionTypeStatus
idid 1

The "id" parameter (or unnamed parameter "1") should contain the ID portion of the URL. Example: A8B4DEC1-972C-4517-9D80-4FBB300F91ED is the ID portion of https://bwf.tournamentsoftware.com/player-profile/8DB65BF4-2593-4835-8ADF-36F6656B4217. This parameter is optional if Wikidata property P2729 exists, but required if not.

Default
Wikidata property P2729
Stringoptional
namename 2

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

Default
{{PAGENAMEBASE}}
Stringoptional
archivearchive

Number representing the date/time in an Internet Archive URL, such as 20180720081247 in https://web.archive.org/web/20180720081247/https://bwf.tournamentsoftware.com/player-profile/8DB65BF4-2593-4835-8ADF-36F6656B4217.

Numberoptional
member_idmember_id

The "member_id" parameter may be used to display an alternative link for the same badminton player. When viewing the main link, this number will be displayed within parentheses next to the player's name, such as "LU Guangzu (77427)". Example: "member_id=77427" will add an alternative link to https://bwf.tournamentsoftware.com/find.aspx?a=8&oid=209B123F-AA87-41A2-BC3E-CB57133E64CC&q=77427.

Numberoptional

Tracking categories

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

See also

  • {{BWF2}} – generates an external link to a player's profile at BWFbadminton.com

External links