# வார்ப்புரு:Sports reference/doc



**:** displays an external link to an Olympic athlete's profile at Olympics at Sports-Reference.com, also known as SR/Olympics. It is intended for use in the section of an article.  

The link is archived since the Sports Reference Olympic site closed on 14 May 2020. The web archive is from the Internet Archive's Wayback Machine. The archive date defaults to 4 December 2016 because pages after that display incorrect output for extended characters. A specific archive at the Wayback Machine may be specified via the parameter.  

## Usage

The basic way to use the template is to insert this:  

: <code></code>  

If this results in an error, that means the article's Wikidata item does not have the property . To resolve this, either add the "id" in Wikidata or use the optional "id" parameter in the template. For example, <kbd>**da/bjorn-daehlie-1**</kbd> is the "id" portion of the URL <kbd>https://<nowiki/>www.sports-reference.com/olympics/athletes/**da/bjorn-daehlie-1**.html</kbd>.  

: <code>|<var>ID</var></code>  
: <code>|id=<var>ID</var></code>  

The link text defaults to the Wikipedia article name, without any disambiguation such as "(athlete)". The default text can be changed via the optional "name" parameter. This may be useful when adding the template more than once (to differentiate the links) or when the article name is different than the athlete's name at Sports-Reference.com.  

: <code>|<var>ID</var>|<var>NAME</var></code>  
: <code>|id=<var>ID</var>|name=<var>NAME</var></code>  

## Examples

### ID in template
; Usage in the article Jeremy Abbott, with article name as link text  
: <code> | ab/jeremy-abbott-2 }}</code>  
: <code> | id= ab/jeremy-abbott-2 | archive= 20161202194710 }}</code>  

; Usage with name parameter as link text  
: <code> | ab/jeremy-abbott-2 | Jeremy Abbott }}</code>  
: <code> | id= ab/jeremy-abbott-2 | name= Jeremy Abbott | archive= 20161202194710 }}</code>  

; Output  
:*  
:*  

; URL  
: <kbd>https://<nowiki/>www.sports-reference.com/olympics/athletes/.html</kbd>  

### ID in Wikidata
; Usage in the article Bjørn Dæhlie  
: <code></code>  
: <code> | name= Bjørn Dæhlie </code>  

; Output  
:*  

; URL  
: <kbd>https://<nowiki/>www.sports-reference.com/olympics/athletes/.html</kbd>  

### No ID in template or Wikidata
; Usage  
: <code></code>  

; Output  
:*  

## Add ID in Wikidata
- Find the athlete's ID on the Sports Reference website. To do this, search for the athlete **here**, and look at the URL. The ID is everything between <code>www.sports-reference.com/olympics/athletes/</code> and <code>.html</code>, so for <code>https://<nowiki/>www.sports-reference.com/olympics/athletes/be/livio-berruti-1.html</code>, the ID is **<code>be/livio-berruti-1</code>**.
- In order to add this to Wikidata:
  - Click "Wikidata item" under "Tools" to the of the article.
  - Go to the bottom of the section called "Statements" (just above the one called "Wikipedia pages linked to this item")
  - Click the bottom-most link called "[add]"
  - Type in "Sports Reference" in the first box that appears, and click "Sports Reference ID" in the dropdown that appears
  - In the next box, paste the ID (<code>be/livio-berruti-1</code> in the example above) and press enter
  - You're done! If you go back to the article and refresh it (maybe try to purge the page by adding <code>?action=purge</code> at the end of the URL), the link should work properly.
- If you find this process too cumbersome, you are always free to use the optional backup parameter instead.

## TemplateData

<templatedata>  
{  
"description": "This template displays an external link to an Olympic athlete's profile at Olympics at Sports-Reference.com, also known as SR/Olympics. It is intended for use in the external links section of an article.",  
"params": {  
"id": {  
"label": "ID",  
"aliases": ["1"],  
"description": "The ID portion of the URL, such as ab/jeremy-abbott-2 in https://www.sports-reference.com/olympics/athletes/ab/jeremy-abbott-2.html This parameter is optional if Wikidata property P1447 exists, but required if not.",  
"default": "Wikidata property P1447",  
"type": "string",  
"required": false  
},  
"name": {  
"label": "Name",  
"aliases": ["2"],  
"description": "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 \"(athlete)\".",  
"default": "",  
"type": "string",  
"required": false  
},  
"archive": {  
"label": "archive",  
"description": "A number representing the date/time in an Internet Archive URL, such as 20161202194710 in https://web.archive.org/web/20161202194710/https://www.sports-reference.com/olympics/athletes/ab/jeremy-abbott-2.html, which is a archive of https://www.sports-reference.com/olympics/athletes/ab/jeremy-abbott-2.html on 2016-12-02 19:47:10.",  
"type": "number",  
"required": false  
}  
},  
"paramOrder": [  
"id",  
"name",  
"archive"  
]  
}  
</templatedata>  

## Tracking categories
; template with ID  
- 
- 
; template missing ID  
-