Difference between revisions of "Template:FIG/doc"

From blackwiki
Jump to navigation Jump to search
imported>Zyxw
(add new URL, misc formatting)
imported>Zyxw
(update to show different URLs using "lic" or "bio" parameters)
Line 8: Line 8:
  
 
== 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 {{WPL|id=o|P2696}}
 
; Using [[Wikidata]] property {{WPL|id=o|P2696}}
Line 25: Line 27:
  
 
== Examples ==
 
== Examples ==
=== Unnamed parameters ===
+
 
 +
=== Using "bio" parameter (biography number) ===
 
; URLs
 
; URLs
: <kbd>[https://database.fig-gymnastics.com/public/gymnasts/biography/13822/true?backUrl= https://database.fig-gymnastics.com/public/gymnasts/biography/{{hilite|13822}}/true?backUrl=]</kbd>
+
: <kbd>[http://fig-gymnastics.com/publicdir/athletes/bio_detail.php?id=29954 http://fig-gymnastics.com/publicdir/athletes/bio_detail.php?id={{hilite|29954}}]</kbd>
: <kbd>[http://fig-gymnastics.com/publicdir/athletes/bio_detail.php?id=13822&type=licence http://fig-gymnastics.com/publicdir/athletes/bio_detail.php?id={{hilite|13822}}&type=licence]</kbd>
+
: <kbd>[https://database.fig-gymnastics.com/public/gymnasts/biography/29954/false?backUrl= https://database.fig-gymnastics.com/public/gymnasts/biography/{{hilite|29954}}/false?backUrl=]</kbd>
  
 
; Usage
 
; Usage
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | 13822 | Alexandra Raisman }}</code>
+
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | bio= 29954 | name= Alexandra RAISMAN }}</code>
 +
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | bio= 29954 | name= Alexandra RAISMAN | brief= yes }}</code>
  
 
; Output
 
; Output
: {{{{BASEPAGENAME}} | 13822 | Alexandra Raisman }}
+
: {{{{BASEPAGENAME}} | bio= 29954 | name= Alexandra RAISMAN }}
 +
: {{{{BASEPAGENAME}} | bio= 29954 | name= Alexandra RAISMAN | brief= yes }}
  
=== Named parameters ===
+
=== Using "lic" parameter (licence number) ===
 
; URLs
 
; URLs
: <kbd>[https://database.fig-gymnastics.com/public/gymnasts/biography/597/true?backUrl= https://database.fig-gymnastics.com/public/gymnasts/biography/{{hilite|597}}/true?backUrl=]</kbd>
+
: <kbd>[http://fig-gymnastics.com/publicdir/athletes/bio_detail.php?id=13822&type=licence http://fig-gymnastics.com/publicdir/athletes/bio_detail.php?id={{hilite|13822}}&type=licence]</kbd>
: <kbd>[http://fig-gymnastics.com/publicdir/athletes/bio_detail.php?id=597&type=licence http://fig-gymnastics.com/publicdir/athletes/bio_detail.php?id={{hilite|597}}&type=licence]</kbd>
+
: <kbd>[https://database.fig-gymnastics.com/public/gymnasts/biography/13822/true?backUrl= https://database.fig-gymnastics.com/public/gymnasts/biography/{{hilite|13822}}/true?backUrl=]</kbd>
  
 
; Usage
 
; Usage
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | id= 597 | name= Marco Torres }}</code>
+
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | lic= 13822 | name= Alexandra RAISMAN }}</code>
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | id= 597 | name= Marco Torres | brief= yes }}</code>
+
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | lic= 13822 | name= Alexandra RAISMAN | brief= yes }}</code>
  
 
; Output
 
; Output
: {{{{BASEPAGENAME}} | id= 597 | name= Marco Torres }}
+
: {{{{BASEPAGENAME}} | lic= 13822 | name= Alexandra RAISMAN }}
: {{{{BASEPAGENAME}} | id= 597 | name= Marco Torres | brief= yes }}
+
: {{{{BASEPAGENAME}} | lic= 13822 | name= Alexandra RAISMAN | brief= yes }}
  
 
=== No parameters and Wikidata property not defined ===
 
=== No parameters and Wikidata property not defined ===
Line 62: Line 67:
 
   "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 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.",
 
   "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 http://fig-gymnastics.com/publicdir/athletes/bio_detail.php?id=29954 or https://database.fig-gymnastics.com/public/gymnasts/biography/29954/false?backUrl=. This parameter is optional if the template uses the \"lic\" parameter.",
       "description": "The \"id\" parameter (or unnamed parameter \"1\") should contain the ID portion of the URL. Example: 13822 is the ID portion of http://fig-gymnastics.com/publicdir/athletes/bio_detail.php?id=13822&type=licence or 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",
 +
      "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 http://fig-gymnastics.com/publicdir/athletes/bio_detail.php?id=13822&type=licence or https://database.fig-gymnastics.com/public/gymnasts/biography/13822/true?backUrl=. This parameter is optional if the template uses the \"bio\" parameter or if Wikidata property P2696 exists.",
 
       "type": "number",
 
       "type": "number",
 
       "default": "Wikidata property P2696",
 
       "default": "Wikidata property P2696",
Line 71: Line 82:
 
     },
 
     },
 
     "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 86: Line 97:
 
   },
 
   },
 
   "paramOrder": [
 
   "paramOrder": [
     "id",
+
     "bio",
 +
    "lic",
 
     "name",
 
     "name",
 
     "brief"
 
     "brief"
Line 104: Line 116:
 
== See also ==
 
== See also ==
 
* {{tl|USA Gymnastics name}}
 
* {{tl|USA Gymnastics name}}
 +
 +
== External links ==
 +
* [http://fig-gymnastics.com/publicdir/athletes/bio_view.php FIG athlete biographies search]
 +
* [http://fig-gymnastics.com/publicdir/athletes/lic_view.php FIG athlete licences search]
  
 
<includeonly>{{sandbox other||
 
<includeonly>{{sandbox other||

Revision as of 02:42, 1 August 2017

Template:Uses Wikidata Template:Tracks Wikidata

Template:FIG 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.

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:WPL
{{FIG}}
{{FIG | name= NAME }}
{{FIG | brief= yes }}
{{FIG | name= NAME | brief= yes }}

Examples

Using "bio" parameter (biography number)

URLs
http://fig-gymnastics.com/publicdir/athletes/bio_detail.php?id=29954
https://database.fig-gymnastics.com/public/gymnasts/biography/29954/false?backUrl=
Usage
{{FIG | bio= 29954 | name= Alexandra RAISMAN }}
{{FIG | bio= 29954 | name= Alexandra RAISMAN | brief= yes }}
Output
Alexandra RAISMAN at the International Gymnastics FederationTemplate:WikidataCheck
Alexandra RAISMANTemplate:WikidataCheck

Using "lic" parameter (licence number)

URLs
http://fig-gymnastics.com/publicdir/athletes/bio_detail.php?id=13822&type=licence
https://database.fig-gymnastics.com/public/gymnasts/biography/13822/true?backUrl=
Usage
{{FIG | lic= 13822 | name= Alexandra RAISMAN }}
{{FIG | lic= 13822 | name= Alexandra RAISMAN | brief= yes }}
Output
Alexandra RAISMAN at the International Gymnastics FederationTemplate:WikidataCheck
Alexandra RAISMANTemplate:WikidataCheck

No parameters and Wikidata property not defined

Usage
{{FIG}}
Output
Template:PAGENAMEBASE at the International Gymnastics FederationScript error: No such module "EditAtWikidata".

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

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 http://fig-gymnastics.com/publicdir/athletes/bio_detail.php?id=29954 or https://database.fig-gymnastics.com/public/gymnasts/biography/29954/false?backUrl=. This parameter is optional if the template uses the "lic" parameter.

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 http://fig-gymnastics.com/publicdir/athletes/bio_detail.php?id=13822&type=licence or https://database.fig-gymnastics.com/public/gymnasts/biography/13822/true?backUrl=. This parameter is optional if the template uses the "bio" parameter or if Wikidata property P2696 exists.

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

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

See also

External links