Difference between revisions of "Template:IBSF/doc"

From blackwiki
Jump to navigation Jump to search
imported>Zyxw
m (→‎Tracking categories: update category links using AWB)
imported>Jonesey95
m (Fix Linter errors using AutoEd)
 
(10 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
{{Documentation subpage}}
 
{{Documentation subpage}}
 +
<!-- Place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
 
{{Uses Wikidata|P2991}}
 
{{Uses Wikidata|P2991}}
 
{{Tracks Wikidata|P2991}}
 
{{Tracks Wikidata|P2991}}
{{Lua|Module:WikidataCheck}}
+
{{Lua|Module:EditAtWikidata|Module:WikidataCheck}}
<!-- Place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
 
  
 
'''{{NAMESPACE}}:{{BASEPAGENAME}}''' displays an external link to an athlete's profile at the website of the [[International Bobsleigh & Skeleton Federation]] (IBSF), the international [[sport governing body|governing body]] for the sports of [[bobsleigh]] and [[skeleton (sport)|skeleton]], formerly known as ''Fédération Internationale de Bobsleigh et de Tobogganing'' (FIBT). It is intended for use in the [[Wikipedia:External links|external links]] section of an article.
 
'''{{NAMESPACE}}:{{BASEPAGENAME}}''' displays an external link to an athlete's profile at the website of the [[International Bobsleigh & Skeleton Federation]] (IBSF), the international [[sport governing body|governing body]] for the sports of [[bobsleigh]] and [[skeleton (sport)|skeleton]], formerly known as ''Fédération Internationale de Bobsleigh et de Tobogganing'' (FIBT). It is intended for use in the [[Wikipedia:External links|external links]] section of an article.
Line 27: Line 27:
  
 
== TemplateData ==
 
== TemplateData ==
{{TemplateDataHeader}}
+
{{TemplateData header}}
 
<templatedata>
 
<templatedata>
 
{
 
{
Line 33: Line 33:
 
   "params": {
 
   "params": {
 
     "id": {
 
     "id": {
       "label": "ID",
+
       "label": "id",
 
       "aliases": ["1"],  
 
       "aliases": ["1"],  
       "description": "The \"id\" parameter (or unnamed parameter \"1\") should contain the ID portion the URL for the athlete's IBSF profile. Example: 100527 is the ID portion of http://www.ibsf.org/en/athletes/athlete/100527.  This parameter is optional if Wikidata property P2991 exists, but required if not.",
+
       "description": "The \"id\" parameter (or unnamed parameter \"1\") should contain the ID portion of the URL. Example: 100527 is the ID portion of http://www.ibsf.org/en/athletes/athlete/100527.  This parameter is optional if Wikidata property P2991 exists, but required if not.",
 
       "type": "number",
 
       "type": "number",
 
       "default": "Wikidata property P2991",
 
       "default": "Wikidata property P2991",
       "required": true
+
       "required": false
 
     },
 
     },
 
     "name": {
 
     "name": {
       "label": "Name",
+
       "label": "name",
 
       "aliases": ["2"],  
 
       "aliases": ["2"],  
 
       "description": "The \"name\" parameter (or unnamed parameter \"2\") may be used to specify the link text, which should be the name of the athlete. This parameter is optional; it defaults to the Wikipedia article name, without any disambiguation such as \"(bobsleigh)\" or \"(skeleton racer)\".",
 
       "description": "The \"name\" parameter (or unnamed parameter \"2\") may be used to specify the link text, which should be the name of the athlete. This parameter is optional; it defaults to the Wikipedia article name, without any disambiguation such as \"(bobsleigh)\" or \"(skeleton racer)\".",
Line 48: Line 48:
 
       "required": false
 
       "required": false
 
     }
 
     }
   }
+
   },
}</templatedata>
+
  "paramOrder": [
 +
    "id",
 +
    "name"
 +
  ]
 +
}
 +
</templatedata>
  
 
== Examples ==
 
== Examples ==
  
 
=== Unnamed parameters ===
 
=== Unnamed parameters ===
[[Steve Mesler]] (bobsledder)
 
 
 
''Usage:''
 
''Usage:''
 
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | 100527 | Steve Mesler }}</code>
 
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | 100527 | Steve Mesler }}</code>
Line 61: Line 64:
 
: {{{{BASEPAGENAME}} | 100527 | Steve Mesler }}
 
: {{{{BASEPAGENAME}} | 100527 | Steve Mesler }}
 
''URL:''
 
''URL:''
: <code>[http://www.ibsf.org/en/athletes/athlete/100527 <nowiki>http://</nowiki>www.ibsf.org/en/athletes/athlete/{{hilite|100527}}]</code>
+
: <code>[http://www.ibsf.org/en/athletes/athlete/100527 http://www.ibsf.org/en/athletes/athlete/{{hilite|100527}}]</code>
 
''Former URLs:''
 
''Former URLs:''
 
: <code><nowiki>http://</nowiki>www.ibsf.org/'''bobsleigh'''/athletes.html?athl_id={{hilite|100527}}</code>
 
: <code><nowiki>http://</nowiki>www.ibsf.org/'''bobsleigh'''/athletes.html?athl_id={{hilite|100527}}</code>
Line 67: Line 70:
  
 
=== Named parameters ===
 
=== Named parameters ===
[[Katie Uhlaender]] (skeleton racer)
 
 
 
''Usage:''
 
''Usage:''
 
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} |id= 100694 |name= Katie Uhlaender }}</code>
 
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} |id= 100694 |name= Katie Uhlaender }}</code>
Line 74: Line 75:
 
: {{{{BASEPAGENAME}} |id= 100694 |name= Katie Uhlaender }}
 
: {{{{BASEPAGENAME}} |id= 100694 |name= Katie Uhlaender }}
 
''URL:''
 
''URL:''
: <code>[http://www.ibsf.org/en/athletes/athlete/100694 <nowiki>http://</nowiki>www.ibsf.org/en/athletes/athlete/{{hilite|100694}}]</code>
+
: <code>[http://www.ibsf.org/en/athletes/athlete/100694 http://www.ibsf.org/en/athletes/athlete/{{hilite|100694}}]</code>
 
''Former URLs:''
 
''Former URLs:''
 
: <code><nowiki>http://</nowiki>www.ibsf.org/'''skeleton'''/athletes.html?athl_id={{hilite|100694}}</code>
 
: <code><nowiki>http://</nowiki>www.ibsf.org/'''skeleton'''/athletes.html?athl_id={{hilite|100694}}</code>
 
: <code><nowiki>http://</nowiki>www.fibt.com/'''skeleton'''/athletes.html?athl_id={{hilite|100694}}</code>
 
: <code><nowiki>http://</nowiki>www.fibt.com/'''skeleton'''/athletes.html?athl_id={{hilite|100694}}</code>
 +
 +
=== No parameters and Wikidata property not defined ===
 +
''Usage:''
 +
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>}}</nowiki></code>
 +
''Output:''
 +
: {{ {{BASEPAGENAME}} }}
  
 
== Tracking categories ==
 
== Tracking categories ==
; "id" parameter exists
+
; ID parameter exists
* {{clc|IBSF ID not in Wikidata}}
+
* {{clc|IBSF template with ID different from Wikidata}}
* {{clc|IBSF ID different from Wikidata}}
+
* {{clc|IBSF template with ID not in Wikidata}}
* {{clc|IBSF ID same as Wikidata}}
+
; ID parameter does not exist
; "id" parameter does not exist
+
* {{clc|IBSF template missing ID and not in Wikidata}}
* {{clc|IBSF template using Wikidata}}
 
* {{clc|IBSF template missing ID}}
 
; "sport" or "3" parameter exists
 
* {{clc|IBSF template using deprecated parameter}}
 
  
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox||
+
<includeonly>{{Sandbox other||
 
<!-- Categories go here, and interwikis go in Wikidata -->
 
<!-- Categories go here, and interwikis go in Wikidata -->
 +
[[Category:Bobsleigh 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:Bobsleigh templates]]
 
 
[[Category:Templates that add a tracking category]]
 
[[Category:Templates that add a tracking category]]
 
+
[[Category:External link templates using Wikidata]]
 +
[[Category:External link templates with archive parameter]]
 
}}</includeonly>
 
}}</includeonly>

Latest revision as of 17:03, 24 May 2020

Template:Uses Wikidata Template:Tracks Wikidata

Template:IBSF displays an external link to an athlete's profile at the website of the International Bobsleigh & Skeleton Federation (IBSF), the international governing body for the sports of bobsleigh and skeleton, formerly known as Fédération Internationale de Bobsleigh et de Tobogganing (FIBT). It is intended for use in the external links section of an article.

Usage

Unnamed parameters:

{{IBSF | ID }}
{{IBSF | ID | NAME }}

Named parameters:

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

Using Wikidata property P2991:

{{IBSF}}
{{IBSF | name= NAME }}

Note: Usage of the third unnamed parameter or the "sport" parameter is no longer required. This was used for the former URL format:

http://www.ibsf.org/bobsleigh/athletes.html?athl_id={{{id}}}
http://www.ibsf.org/skeleton/athletes.html?athl_id={{{id}}}
http://www.fibt.com/bobsleigh/athletes.html?athl_id={{{id}}}
http://www.fibt.com/skeleton/athletes.html?athl_id={{{id}}}

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 IBSF

This template displays an external link to an athlete's profile at the website of the International Bobsleigh & Skeleton Federation (IBSF), the international governing body for the sports of bobsleigh and skeleton, formerly known as Fédération Internationale de Bobsleigh et de Tobogganing (FIBT). 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: 100527 is the ID portion of http://www.ibsf.org/en/athletes/athlete/100527. This parameter is optional if Wikidata property P2991 exists, but required if not.

Default
Wikidata property P2991
Numberoptional
namename 2

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

Default
{{PAGENAMEBASE}}
Stringoptional

Examples

Unnamed parameters

Usage:

{{IBSF | 100527 | Steve Mesler }}

Output:

Steve Mesler at the International Bobsleigh & Skeleton FederationScript error: No such module "EditAtWikidata". Template:WikidataCheck

URL:

http://www.ibsf.org/en/athletes/athlete/100527

Former URLs:

http://www.ibsf.org/bobsleigh/athletes.html?athl_id=100527
http://www.fibt.com/bobsleigh/athletes.html?athl_id=100527

Named parameters

Usage:

{{IBSF |id= 100694 |name= Katie Uhlaender }}

Output:

Katie Uhlaender at the International Bobsleigh & Skeleton FederationScript error: No such module "EditAtWikidata". Template:WikidataCheck

URL:

http://www.ibsf.org/en/athletes/athlete/100694

Former URLs:

http://www.ibsf.org/skeleton/athletes.html?athl_id=100694
http://www.fibt.com/skeleton/athletes.html?athl_id=100694

No parameters and Wikidata property not defined

Usage:

{{IBSF}}

Output:

Template:PAGENAMEBASE at the International Bobsleigh & Skeleton FederationScript error: No such module "EditAtWikidata". Template:WikidataCheck

Tracking categories

ID parameter exists
ID parameter does not exist