Difference between revisions of "Template:BWF/doc"

From blackwiki
Jump to navigation Jump to search
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>[http://bwf.tournamentsoftware.com/profile/default.aspx?id=A8B4DEC1-972C-4517-9D80-4FBB300F91ED http://bwf.tournamentsoftware.com/profile/default.aspx?id={{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 }}
Line 32: Line 36:
 
=== Named parameters ===
 
=== Named parameters ===
 
''URL:''
 
''URL:''
: <kbd>[http://bwf.tournamentsoftware.com/profile/default.aspx?id=296B69A5-3C25-4E3D-964E-DDFA46A1333A http://bwf.tournamentsoftware.com/profile/default.aspx?id={{hilite|296B69A5-3C25-4E3D-964E-DDFA46A1333A}}]</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= 296B69A5-3C25-4E3D-964E-DDFA46A1333A |name= Lin Dan }}</code>
+
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} |id= 8DB65BF4-2593-4835-8ADF-36F6656B4217 |name= Lu Guangzu |archive= 20180720081247 }}</code>
 +
 
 
''Output:''
 
''Output:''
: {{{{BASEPAGENAME}} |id= 296B69A5-3C25-4E3D-964E-DDFA46A1333A |name= Lin Dan }}
+
: {{{{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 http://bwf.tournamentsoftware.com/profile/default.aspx?id=A8B4DEC1-972C-4517-9D80-4FBB300F91ED. 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 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 ==
* [http://bwf.tournamentsoftware.com/ Search page at BWF.tournamentsoftware.com]
+
* [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:Badminton 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

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 }}

Using Wikidata property P2729:

{{BWF}}
{{BWF | name= NAME }}
{{BWF | name= NAME | archive= 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:

Li Xuerui at BWF.tournamentsoftware.comScript error: No such module "EditAtWikidata". Template:WikidataCheck

Named parameters

URL:

https://bwf.tournamentsoftware.com/player-profile/8DB65BF4-2593-4835-8ADF-36F6656B4217

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

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

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