Difference between revisions of "Template:BoxRec/doc"

From blackwiki
Jump to navigation Jump to search
imported>Vanisaac
m (→‎See also: clean up per WP:CAT#T and WP:AWBREQ add template:Sandbox other)
imported>Zyxw
(update examples)
 
Line 6: Line 6:
 
{{Lua|Module:EditAtWikidata|Module:WikidataCheck}}
 
{{Lua|Module:EditAtWikidata|Module:WikidataCheck}}
  
'''{{NAMESPACE}}:{{BASEPAGENAME}}''' displays an external link to a [[professional boxer]]'s page at the [[BoxRec]] website ([http://www.boxrec.com/ boxrec.com]). It is intended for use in the [[Wikipedia:External links|external links]] section of an article.
+
'''{{NAMESPACE}}:{{BASEPAGENAME}}''' displays an external link to a [[professional boxing|professional]] or [[amateur boxing|amateur]] boxer's page at the [[BoxRec]] website ([https://www.boxrec.com/ boxrec.com]). It is intended for use in the [[Wikipedia:External links|external links]] section of an article.
  
 
== Usage ==
 
== Usage ==
Line 28: Line 28:
  
 
=== Unnamed parameters ===
 
=== Unnamed parameters ===
 +
 
URLs:
 
URLs:
: <kbd>[http://boxrec.com/boxer/180 http://boxrec.com/boxer/{{Hilite|180}}]</kbd>
+
: <kbd>[http://boxrec.com/boxer/866591 http://boxrec.com/boxer/{{Hilite|866591}}]</kbd>
: <kbd>[http://boxrec.com/en/boxer/180 http://boxrec.com/en/boxer/{{Hilite|180}}]</kbd>
+
: <kbd>[http://boxrec.com/en/boxer/866591 http://boxrec.com/en/boxer/{{Hilite|866591}}]</kbd>
 +
: <kbd>[https://boxrec.com/en/amateurboxer/866591 https://boxrec.com/en/amateurboxer/{{Hilite|866591}}]</kbd> (URLs above redirect here)
  
 
Usage:
 
Usage:
: {{tlcw|a=1|{{BASEPAGENAME}} | 180 | Muhammad Ali }}
+
: {{tlcw|a=1|{{BASEPAGENAME}} | 866591 | Chungneijang Marykom }}
  
 
Output:
 
Output:
:* {{{{BASEPAGENAME}} | 180 | Muhammad Ali }}
+
:* {{{{BASEPAGENAME}} | 866591 | Chungneijang Marykom }}
  
 
=== Named parameters ===
 
=== Named parameters ===
Line 42: Line 44:
 
: <kbd>[http://boxrec.com/boxer/9027 http://boxrec.com/boxer/{{Hilite|9027}}]</kbd>
 
: <kbd>[http://boxrec.com/boxer/9027 http://boxrec.com/boxer/{{Hilite|9027}}]</kbd>
 
: <kbd>[http://boxrec.com/en/boxer/9027 http://boxrec.com/en/boxer/{{Hilite|9027}}]</kbd>
 
: <kbd>[http://boxrec.com/en/boxer/9027 http://boxrec.com/en/boxer/{{Hilite|9027}}]</kbd>
 +
: <kbd>[https://boxrec.com/en/proboxer/9027 https://boxrec.com/en/proboxer/{{Hilite|9027}}]</kbd> (URLs above redirect here)
  
 
Usage:
 
Usage:
Line 57: Line 60:
  
 
==Instructions==
 
==Instructions==
# Go to the [http://boxrec.com/ BoxRec website] and enter the boxer's name in the search box.
+
# Go to the [https://boxrec.com/ BoxRec website] and enter the boxer's name in the search box.
 
# On the search results page, click the correct link for the boxer's page.
 
# On the search results page, click the correct link for the boxer's page.
# The page [[Uniform resource locator|URL]] should look like <code><nowiki>http://</nowiki>boxrec.com/boxer/<var>ID</var></code> or <code><nowiki>http://</nowiki>boxrec.com/en/boxer/<var>ID</var></code>, where <code><var>ID</var></code> is the ID number for the boxer.
+
# The page [[Uniform resource locator|URL]] should look like <code><nowiki>https://</nowiki>boxrec.com/en/amateurboxer/<var>ID</var></code> or <code><nowiki>https://</nowiki>boxrec.com/en/proboxer/<var>ID</var></code>, where <code><var>ID</var></code> is the ID number for the boxer.
 
# Add one of the following to the external links section of the boxer's Wikipedia article:
 
# Add one of the following to the external links section of the boxer's Wikipedia article:
 
#: <code><nowiki>* {{</nowiki>{{BASEPAGENAME}}|<var>ID</var>}}</code>
 
#: <code><nowiki>* {{</nowiki>{{BASEPAGENAME}}|<var>ID</var>}}</code>
Line 70: Line 73:
 
<templatedata>
 
<templatedata>
 
{
 
{
   "description": "This template displays an external link to a professional boxer's page at the BoxRec website (boxrec.com). It is intended for use in the external links section of an article.",
+
   "description": "This template displays an external link to a professional or amateur boxer's page at the BoxRec website (boxrec.com). It is intended for use in the external links section of an article.",
 
   "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 of the URL. Example: 180 is the ID portion of http://boxrec.com/boxer/180 or http://boxrec.com/en/boxer/180. This parameter is optional if Wikidata property P1967 exists, but required if not.",
+
       "description": "The \"id\" parameter (or unnamed parameter \"1\") should contain the ID portion of the URL. Examples: 866591 is the ID portion of https://boxrec.com/en/amateurboxer/866591 and 9027 is the ID portion of https://boxrec.com/en/proboxer/9027. This parameter is optional if Wikidata property P1967 exists, but required if not.",
 
       "type": "number",
 
       "type": "number",
 
       "required": false,
 
       "required": false,

Latest revision as of 21:29, 14 June 2020

Template:Uses Wikidata Template:Tracks Wikidata

Template:BoxRec displays an external link to a professional or amateur boxer's page at the BoxRec website (boxrec.com). It is intended for use in the external links section of an article.

Usage

Unnamed parameters:

Template:Tlcw
Template:Tlcw

Named parameters:

Template:Tlcw
Template:Tlcw
Template:Tlcw
Template:Tlcw

Using Wikidata property Template:Property:

Template:Tlcw
Template:Tlcw
Template:Tlcw
Template:Tlcw

Examples

Unnamed parameters

URLs:

http://boxrec.com/boxer/866591
http://boxrec.com/en/boxer/866591
https://boxrec.com/en/amateurboxer/866591 (URLs above redirect here)

Usage:

Template:Tlcw

Output:

Named parameters

URLs:

http://boxrec.com/boxer/9027
http://boxrec.com/en/boxer/9027
https://boxrec.com/en/proboxer/9027 (URLs above redirect here)

Usage:

Template:Tlcw

Output:

No parameters and Wikidata property not defined

Usage:

Template:Tlcw

Output:

Instructions

  1. Go to the BoxRec website and enter the boxer's name in the search box.
  2. On the search results page, click the correct link for the boxer's page.
  3. The page URL should look like https://boxrec.com/en/amateurboxer/ID or https://boxrec.com/en/proboxer/ID, where ID is the ID number for the boxer.
  4. Add one of the following to the external links section of the boxer's Wikipedia article:
    * {{BoxRec|ID}}
    * {{BoxRec|ID|NAME}}
    where ID is the boxer's ID number from the URL
    and NAME is the boxer's name. If the name is not specified, the template will display the Wikipedia article name, without any disambiguation such as "(boxer)".

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 BoxRec

This template displays an external link to a professional or amateur boxer's page at the BoxRec website (boxrec.com). 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. Examples: 866591 is the ID portion of https://boxrec.com/en/amateurboxer/866591 and 9027 is the ID portion of https://boxrec.com/en/proboxer/9027. This parameter is optional if Wikidata property P1967 exists, but required if not.

Default
Wikidata property P1967
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 boxer. This parameter is optional; it defaults to the Wikipedia article name, without any disambiguation such as "(boxer)".

Default
{{PAGENAMEBASE}}
Stringoptional
archivearchive

Number representing the date/time in an Internet Archive URL, such as 20170224101131 in https://web.archive.org/web/20170224101131/http://boxrec.com/boxer/9027.

Numberoptional

Tracking categories

template with ID
template missing ID

See also