Difference between revisions of "Template:BWF/doc"
imported>Zyxw m (Since <tt> is obsolete in HTML5, replace it with <kbd> – see HTML element#tt, Wikipedia:HTML5, and mw:Help:Extension:Linter/obsolete-tag. using AWB) |
imported>Zyxw (update URLs, document "archive", add category) |
||
| Line 15: | Line 15: | ||
: <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> | ||
Using [[Wikidata]] property [[d:Property:P2729|P2729]]: | Using [[Wikidata]] property [[d:Property:P2729|P2729]]: | ||
: <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> | ||
== Examples == | == Examples == | ||
| Line 24: | Line 26: | ||
=== Unnamed parameters === | === Unnamed parameters === | ||
''URL:'' | ''URL:'' | ||
| − | : <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 }} | ||
| Line 32: | Line 36: | ||
=== Named parameters === | === Named parameters === | ||
''URL:'' | ''URL:'' | ||
| − | : <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> |
| + | |||
''Usage:'' | ''Usage:'' | ||
| − | : <code><nowiki>{{</nowiki>{{BASEPAGENAME}} |id= | + | : <code><nowiki>{{</nowiki>{{BASEPAGENAME}} |id= 8DB65BF4-2593-4835-8ADF-36F6656B4217 |name= Lu Guangzu |archive= 20180720081247 }}</code> |
| + | |||
''Output:'' | ''Output:'' | ||
| − | : {{{{BASEPAGENAME}} |id= | + | : {{{{BASEPAGENAME}} |id= 8DB65BF4-2593-4835-8ADF-36F6656B4217 |name= Lu Guangzu |archive= 20180720081247 }} |
=== 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}} }} | ||
| Line 53: | Line 60: | ||
"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 | + | "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 65: | Line 72: | ||
"required": false, | "required": false, | ||
"default": "{{PAGENAMEBASE}}" | "default": "{{PAGENAMEBASE}}" | ||
| + | }, | ||
| + | "archive": { | ||
| + | "label": "archive", | ||
| + | "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 | ||
} | } | ||
}, | }, | ||
"paramOrder": [ | "paramOrder": [ | ||
"id", | "id", | ||
| − | "name" | + | "name", |
| + | "archive" | ||
] | ] | ||
} | } | ||
| Line 87: | Line 101: | ||
== External links == | == External links == | ||
| − | * [ | + | * [https://bwf.tournamentsoftware.com/ Search page at BWF.tournamentsoftware.com] |
<includeonly>{{sandbox other|| | <includeonly>{{sandbox other|| | ||
<!-- Categories below this line; interwikis at Wikidata --> | <!-- Categories below this line; interwikis at Wikidata --> | ||
| + | [[Category:Badminton templates]] | ||
[[Category:People and person external link templates]] | [[Category:People and person external link templates]] | ||
[[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: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 08:18, 27 October 2018
| This is a documentation subpage for Template:BWF. It contains usage information, categories and other content that is not part of the original template page. |
Template:Uses Wikidata Template:Tracks Wikidata
| This template uses Lua: |
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.
Contents
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 }}
Using Wikidata property P2729:
{{BWF}}{{BWF | name= NAME }}{{BWF | name= NAME | archive= NUMBER }}
Examples
Unnamed parameters
URL:
Usage:
{{BWF | A8B4DEC1-972C-4517-9D80-4FBB300F91ED | Li Xuerui }}
Output:
- Li Xuerui at BWF.tournamentsoftware.comScript error: No such module "EditAtWikidata". Template:WikidataCheck
Named parameters
URL:
Usage:
{{BWF |id= 8DB65BF4-2593-4835-8ADF-36F6656B4217 |name= Lu Guangzu |archive= 20180720081247 }}
Output:
- Lu Guangzu at BWF.tournamentsoftware.comScript error: No such module "EditAtWikidata". (archive)Template:WikidataCheck
No parameters and Wikidata property not defined
Usage:
{{BWF}}
Output:
- Template:PAGENAMEBASE at BWF.tournamentsoftware.comScript error: No such module "EditAtWikidata". Template:WikidataCheck
TemplateData
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.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| id | id 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.
| String | optional |
| name | name 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)".
| String | optional |
| archive | archive | 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. | Number | optional |
Tracking categories
- "id" parameter exists
- Category:BWF template with ID same as Wikidata (0)
- Category:BWF template with ID different from Wikidata (0)
- Category:BWF template with ID not in Wikidata (0)
- "id" parameter does not exist
See also
- {{BWF2}} – generates an external link to a player's profile at BWFbadminton.com
External links