Difference between revisions of "Template:FIG/doc"

From blackwiki
Jump to navigation Jump to search
imported>Zyxw
(update TemplateData)
imported>Zyxw
 
(14 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
{{Documentation subpage}}
 
{{Documentation subpage}}
 
<!-- Categories go at the bottom of this page and interwikis go in Wikidata. -->
 
<!-- Categories go at the bottom of this page and interwikis go in Wikidata. -->
{{Uses Wikidata|P2696}}
+
{{Uses Wikidata|P7440|P2696}}
{{Tracks Wikidata|P2696}}
+
{{Tracks Wikidata|P7440|P2696}}
{{Lua|Module:WikidataCheck}}
+
{{Lua|Module:EditAtWikidata|Module:WikidataCheck}}
  
'''{{NAMESPACE}}:{{BASEPAGENAME}}''' displays an external link to an gymnast's profile at [http://www.fig-gymnastics.com/ FIG-gymnastics.com], the official website of the [[International Federation of Gymnastics]] (FIG: ''Fédération Internationale de Gymnastique''). It is intended for use in the [[Wikipedia:External links|external links]] section of an article.
+
'''{{NAMESPACE}}:{{BASEPAGENAME}}''' displays an external link to a gymnast's profile at [https://www.gymnastics.sport/ Gymnastics.sport] (formerly [https://www.fig-gymnastics.com/ FIG-gymnastics.com]), the official website of the [[International Gymnastics Federation]] (FIG: ''Fédération Internationale de Gymnastique''). It is intended for use in the [[Wikipedia:External links|external links]] section of an article.
  
 
== Usage ==
 
== Usage ==
Unnamed parameters:
+
; Using "bio" parameter (biography number)
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | ''ID'' }}</code>
+
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | bio= ''ID'' }}</code>
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | ''ID'' | ''NAME'' }}</code>
+
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | bio= ''ID'' | name= ''NAME'' }}</code>
 +
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | bio= ''ID'' | brief= ''yes'' }}</code>
 +
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | bio= ''ID'' | name= ''NAME'' | brief= ''yes'' }}</code>
  
Named parameters:
+
; Using "lic" parameter (licence number)
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | id= ''ID'' }}</code>
+
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | lic= ''ID'' }}</code>
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | id= ''ID'' | name= ''NAME'' }}</code>
+
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | lic= ''ID'' | name= ''NAME'' }}</code>
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | id= ''ID'' | brief= ''yes'' }}</code>
+
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | lic= ''ID'' | brief= ''yes'' }}</code>
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | id= ''ID'' | name= ''NAME'' | brief= ''yes'' }}</code>
+
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | lic= ''ID'' | name= ''NAME'' | brief= ''yes'' }}</code>
  
Using [[Wikidata]] property [[d:Property:P2696|P2696]]:
+
; Using [[Wikidata]] property {{Property|P7440|id=only}} or {{Property|P2696|id=only}}
 
: <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}} | brief= ''yes'' }}</code>
 
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | brief= ''yes'' }}</code>
 
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | name= ''NAME'' | brief= ''yes'' }}</code>
 
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | name= ''NAME'' | brief= ''yes'' }}</code>
 +
 +
== Examples ==
 +
 +
=== Using "bio" parameter (biography number) ===
 +
; Usage
 +
: <code><nowiki>* {{</nowiki>{{BASEPAGENAME}} | bio= 29954 | name= Alexandra RAISMAN }}</code>
 +
: <code><nowiki>* {{</nowiki>{{BASEPAGENAME}} | bio= 29954 | name= Alexandra RAISMAN | brief= yes }}</code>
 +
 +
; Output
 +
:* {{{{BASEPAGENAME}} | bio= 29954 | name= Alexandra RAISMAN }}
 +
:* {{{{BASEPAGENAME}} | bio= 29954 | name= Alexandra RAISMAN | brief= yes }}
 +
 +
; Current URLs
 +
: [https://gymnastics.sport/site/athletes/bio_detail.php?id=29954 https://gymnastics.sport/site/athletes/bio_detail.php?id={{hilite|29954}}]
 +
: [https://fig-gymnastics.com/site/athletes/bio_detail.php?id=29954 https://fig-gymnastics.com/site/athletes/bio_detail.php?id={{hilite|29954}}]
 +
 +
; Former URLs
 +
: https://<nowiki/>fig-gymnastics.com/publicdir/athletes/bio_detail.php?id={{hilite|29954}}
 +
: https://<nowiki/>database.fig-gymnastics.com/public/gymnasts/biography/{{hilite|29954}}/false?backUrl=
 +
 +
=== Using "lic" parameter (licence number) ===
 +
; Usage
 +
: <code><nowiki>* {{</nowiki>{{BASEPAGENAME}} | lic= 13822 | name= Alexandra RAISMAN }}</code>
 +
: <code><nowiki>* {{</nowiki>{{BASEPAGENAME}} | lic= 13822 | name= Alexandra RAISMAN | brief= yes }}</code>
 +
 +
; Output
 +
:* {{{{BASEPAGENAME}} | lic= 13822 | name= Alexandra RAISMAN }}
 +
:* {{{{BASEPAGENAME}} | lic= 13822 | name= Alexandra RAISMAN | brief= yes }}
 +
 +
; Current URLs
 +
: [https://gymnastics.sport/site/athletes/bio_detail.php?id=13822&type=licence https://gymnastics.sport/site/athletes/bio_detail.php?id={{hilite|13822}}&type=licence]
 +
: [https://fig-gymnastics.com/site/athletes/bio_detail.php?id=13822&type=licence https://fig-gymnastics.com/site/athletes/bio_detail.php?id={{hilite|13822}}&type=licence]
 +
 +
; Former URLs
 +
: https://<nowiki/>fig-gymnastics.com/publicdir/athletes/bio_detail.php?id={{hilite|13822}}&type=licence
 +
: https://<nowiki/>database.fig-gymnastics.com/public/gymnasts/biography/{{hilite|13822}}/true?backUrl=
 +
 +
=== No parameters and Wikidata property not defined ===
 +
; Usage
 +
: <code><nowiki>* {{</nowiki>{{BASEPAGENAME}}<nowiki>}}</nowiki></code>
 +
 +
; Output
 +
:* {{ {{BASEPAGENAME}} }}
  
 
== TemplateData ==
 
== TemplateData ==
Line 28: Line 73:
 
<templatedata>
 
<templatedata>
 
{
 
{
   "description": "This template displays an external link to an gymnast's profile at FIG-gymnastics.com, the official website of the International Federation of Gymnastics (FIG: Fédération Internationale de Gymnastique). It is intended for use in the external links section of an article.",
+
   "description": "This template displays an external link to a gymnast's profile at Gymnastics.sport (formerly FIG-gymnastics.com), the official website of the International Gymnastics Federation (FIG: Fédération Internationale de Gymnastique). It is intended for use in the external links section of an article.",
 
   "params": {
 
   "params": {
     "id": {
+
     "bio": {
       "label": "id",
+
      "label": "Biography number",
       "aliases": ["1"],  
+
      "description": "The \"bio\" parameter should contain the gymnast's FIG biography number used in the URL. Example: 29954 is the biography number in https://gymnastics.sport/site/athletes/bio_detail.php?id=29954. This parameter is optional if the template uses the \"lic\" parameter or if Wikidata properties P7440 or P2696 exist.",
       "description": "The \"id\" parameter (or unnamed parameter \"1\") should contain the ID portion of the URL. Example: 13822 is the ID portion of https://database.fig-gymnastics.com/public/gymnasts/biography/13822/true?backUrl=. This parameter is optional if Wikidata property P2696 exists, but required if not.",
+
      "type": "number",
 +
      "default": "Wikidata property P7440",
 +
      "required": false
 +
    },
 +
    "lic": {
 +
       "label": "Licence number",
 +
       "aliases": ["1", "id"],  
 +
       "description": "The \"lic\" parameter may contain the gymnast's FIG licence number used in the URL. Example: 13822 is the licence number in https://gymnastics.sport/site/athletes/bio_detail.php?id=13822&type=licence. This parameter is optional if the template uses the \"bio\" parameter or if Wikidata properties P7440 or P2696 exist.",
 
       "type": "number",
 
       "type": "number",
 
       "default": "Wikidata property P2696",
 
       "default": "Wikidata property P2696",
Line 39: Line 91:
 
     },
 
     },
 
     "name": {
 
     "name": {
       "label": "name",
+
       "label": "Gymnast's 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 gymnast. This parameter is optional; it defaults to the Wikipedia article name, without any disambiguation such as \"(gymnast)\".",
 
       "description": "The \"name\" parameter (or unnamed parameter \"2\") may be used to specify the link text, which should be the name of the gymnast. This parameter is optional; it defaults to the Wikipedia article name, without any disambiguation such as \"(gymnast)\".",
Line 54: Line 106:
 
   },
 
   },
 
   "paramOrder": [
 
   "paramOrder": [
     "id",
+
     "bio",
 +
    "lic",
 
     "name",
 
     "name",
 
     "brief"
 
     "brief"
Line 61: Line 114:
 
</templatedata>
 
</templatedata>
  
== Examples ==
+
== Tracking categories ==
=== Unnamed parameters ===
+
; template with "bio" parameter
''URL:''
+
* {{clc|FIG template with biography number same as Wikidata}}
: <tt>[https://database.fig-gymnastics.com/public/gymnasts/biography/13822/true?backUrl= https://database.fig-gymnastics.com/public/gymnasts/biography/{{hilite|13822}}/true?backUrl=]</tt>
+
* {{clc|FIG template with biography number different from Wikidata}}
''Usage:''
+
* {{clc|FIG template with biography number not in Wikidata}}
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | 13822 | Alexandra Raisman }}</code>
 
''Output:''
 
: {{{{BASEPAGENAME}} | 13822 | Alexandra Raisman }}
 
  
=== Named parameters ===
+
; template with "lic" parameter
''URL:''
+
* {{clc|FIG template with licence number same as Wikidata}}
: <tt>[https://database.fig-gymnastics.com/public/gymnasts/biography/597/true?backUrl= https://database.fig-gymnastics.com/public/gymnasts/biography/{{hilite|597}}/true?backUrl=]</tt>
+
* {{clc|FIG template with licence number different from Wikidata}}
''Usage:''
+
* {{clc|FIG template with licence number not in Wikidata}}
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} |id= 597 |name= Marco Torres }}</code>
 
''Output:''
 
: {{{{BASEPAGENAME}} |id= 597 |name= Marco Torres }}
 
''Usage:''
 
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} |id= 597 |name= Marco Torres |brief= yes }}</code>
 
''Output:''
 
: {{{{BASEPAGENAME}} |id= 597 |name= Marco Torres |brief= yes }}
 
  
=== No parameters and Wikidata property not defined ===
+
; template using Wikidata
''Usage:''
+
* {{clc|Category:FIG template using Wikidata property P7440}}
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>}}</nowiki></code>
+
* {{clc|Category:FIG template using Wikidata property P2696}}
''Output:''
 
: {{ {{BASEPAGENAME}} }}
 
  
== Tracking categories ==
+
; template with missing or incorrect value
; "id" parameter exists
+
* {{clc|FIG template missing ID and not in Wikidata}}
* {{clc|FIG gymnast ID not in Wikidata}}
+
* {{clc|FIG template with same value in bio and lic parameters}}
* {{clc|FIG gymnast ID different from Wikidata}}
 
* {{clc|FIG gymnast ID same as Wikidata}}
 
; "id" parameter does not exist
 
* {{clc|FIG template using Wikidata}}
 
* {{clc|FIG template missing ID}}
 
  
 
== See also ==
 
== See also ==
* {{tl|USA Gymnastics name}}
+
* {{tl|USA Gymnastics}}
 +
 
 +
== External links ==
 +
* [https://gymnastics.sport/site/athletes/bio_view.php FIG athlete biographies search]
 +
* [https://gymnastics.sport/site/athletes/lic_view.php FIG athlete licences search]
  
 
<includeonly>{{sandbox other||
 
<includeonly>{{sandbox other||

Latest revision as of 02:05, 16 October 2020

Template:Uses Wikidata Template:Tracks Wikidata

Template:FIG displays an external link to a gymnast's profile at Gymnastics.sport (formerly FIG-gymnastics.com), the official website of the International Gymnastics Federation (FIG: Fédération Internationale de Gymnastique). It is intended for use in the external links section of an article.

Usage

Using "bio" parameter (biography number)
{{FIG | bio= ID }}
{{FIG | bio= ID | name= NAME }}
{{FIG | bio= ID | brief= yes }}
{{FIG | bio= ID | name= NAME | brief= yes }}
Using "lic" parameter (licence number)
{{FIG | lic= ID }}
{{FIG | lic= ID | name= NAME }}
{{FIG | lic= ID | brief= yes }}
{{FIG | lic= ID | name= NAME | brief= yes }}
Using Wikidata property Template:Property or Template:Property
{{FIG}}
{{FIG | name= NAME }}
{{FIG | brief= yes }}
{{FIG | name= NAME | brief= yes }}

Examples

Using "bio" parameter (biography number)

Usage
* {{FIG | bio= 29954 | name= Alexandra RAISMAN }}
* {{FIG | bio= 29954 | name= Alexandra RAISMAN | brief= yes }}
Output
Current URLs
https://gymnastics.sport/site/athletes/bio_detail.php?id=29954
https://fig-gymnastics.com/site/athletes/bio_detail.php?id=29954
Former URLs
https://fig-gymnastics.com/publicdir/athletes/bio_detail.php?id=29954
https://database.fig-gymnastics.com/public/gymnasts/biography/29954/false?backUrl=

Using "lic" parameter (licence number)

Usage
* {{FIG | lic= 13822 | name= Alexandra RAISMAN }}
* {{FIG | lic= 13822 | name= Alexandra RAISMAN | brief= yes }}
Output
Current URLs
https://gymnastics.sport/site/athletes/bio_detail.php?id=13822&type=licence
https://fig-gymnastics.com/site/athletes/bio_detail.php?id=13822&type=licence
Former URLs
https://fig-gymnastics.com/publicdir/athletes/bio_detail.php?id=13822&type=licence
https://database.fig-gymnastics.com/public/gymnasts/biography/13822/true?backUrl=

No parameters and Wikidata property not defined

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

This template displays an external link to a gymnast's profile at Gymnastics.sport (formerly FIG-gymnastics.com), the official website of the International Gymnastics Federation (FIG: Fédération Internationale de Gymnastique). It is intended for use in the external links section of an article.

Template parameters

ParameterDescriptionTypeStatus
Biography numberbio

The "bio" parameter should contain the gymnast's FIG biography number used in the URL. Example: 29954 is the biography number in https://gymnastics.sport/site/athletes/bio_detail.php?id=29954. This parameter is optional if the template uses the "lic" parameter or if Wikidata properties P7440 or P2696 exist.

Default
Wikidata property P7440
Numberoptional
Licence numberlic 1 id

The "lic" parameter may contain the gymnast's FIG licence number used in the URL. Example: 13822 is the licence number in https://gymnastics.sport/site/athletes/bio_detail.php?id=13822&type=licence. This parameter is optional if the template uses the "bio" parameter or if Wikidata properties P7440 or P2696 exist.

Default
Wikidata property P2696
Numberoptional
Gymnast's namename 2

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

Default
{{PAGENAMEBASE}}
Stringoptional
briefbrief

The "brief" parameter may be used to display the external link without the appended description. The value can be "yes", "true", or any text. This parameter is optional.

Stringoptional

Tracking categories

template with "bio" parameter
template with "lic" parameter
template using Wikidata
template with missing or incorrect value

See also

External links