Difference between revisions of "Template:BoxRec/doc"
imported>Zyxw m (Since <tt> is obsolete in HTML5, replace it with <kbd> – see HTML element#tt, Wikipedia:HTML5, and mw:Help:Extension:Linter/obsolete-tag. using AWB) |
imported>Zyxw (update URL) |
||
| Line 16: | Line 16: | ||
: {{tlcw|{{BASEPAGENAME}} | id{{=}} <var>ID</var> | name{{=}} <var>NAME</var> }} | : {{tlcw|{{BASEPAGENAME}} | id{{=}} <var>ID</var> | name{{=}} <var>NAME</var> }} | ||
| − | Using [[Wikidata]] property | + | Using [[Wikidata]] property {{Property|1967}}: |
: {{tlcw|{{BASEPAGENAME}} }} | : {{tlcw|{{BASEPAGENAME}} }} | ||
: {{tlcw|{{BASEPAGENAME}} | name{{=}} <var>NAME</var> }} | : {{tlcw|{{BASEPAGENAME}} | name{{=}} <var>NAME</var> }} | ||
| Line 23: | Line 23: | ||
=== Unnamed parameters === | === Unnamed parameters === | ||
| − | + | ; URLs | |
: <kbd>[http://boxrec.com/boxer/180 http://boxrec.com/boxer/{{Hilite|180}}]</kbd> | : <kbd>[http://boxrec.com/boxer/180 http://boxrec.com/boxer/{{Hilite|180}}]</kbd> | ||
| − | + | : <kbd>[http://boxrec.com/en/boxer/180 http://boxrec.com/en/boxer/{{Hilite|180}}]</kbd> | |
| − | : {{tlcw|{{BASEPAGENAME}} | 180 | Muhammad Ali }} | + | |
| − | + | ; Usage | |
| − | : {{{{BASEPAGENAME}} | 180 | Muhammad Ali }} | + | : {{tlcw|a=1|{{BASEPAGENAME}} | 180 | Muhammad Ali }} |
| + | |||
| + | ; Output | ||
| + | :* {{{{BASEPAGENAME}} | 180 | Muhammad Ali }} | ||
=== Named parameters === | === Named parameters === | ||
| − | + | ; URLs | |
: <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> | |
| − | : {{tlcw|{{BASEPAGENAME}} | id{{=}} 9027 | name{{=}} Joe Louis }} | + | |
| − | + | ; Usage | |
| − | : {{{{BASEPAGENAME}} | id= 9027 | name= Joe Louis }} | + | : {{tlcw|a=1|{{BASEPAGENAME}} | id{{=}} 9027 | name{{=}} Joe Louis }} |
| + | |||
| + | ; Output | ||
| + | :* {{{{BASEPAGENAME}} | id= 9027 | name= Joe Louis }} | ||
=== No parameters and Wikidata property not defined === | === No parameters and Wikidata property not defined === | ||
| − | + | ; Usage | |
| − | : {{tlcw|{{BASEPAGENAME}}}} | + | : {{tlcw|a=1|{{BASEPAGENAME}}}} |
| − | + | ||
| − | : {{{{BASEPAGENAME}}<!-- -->}} | + | ; Usage |
| + | :* {{{{BASEPAGENAME}}<!-- -->}} | ||
==Instructions== | ==Instructions== | ||
# Go to the [http://boxrec.com/ BoxRec website] and enter the boxer's name in the search box. | # Go to the [http://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>, where <code><var>ID</var></code> is the ID number for the boxer. | + | # 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. |
# 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 63: | Line 70: | ||
"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. 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. 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.", |
"type": "number", | "type": "number", | ||
"required": false, | "required": false, | ||
| Line 95: | Line 102: | ||
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | | | <includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | | | ||
<!-- Categories below this line; interwikis at Wikidata --> | <!-- Categories below this line; interwikis at Wikidata --> | ||
| + | [[Category:Boxing templates]] | ||
| + | [[Category:Sports external link templates]] | ||
[[Category:People and person external link templates]] | [[Category:People and person external link templates]] | ||
| − | |||
| − | |||
[[Category:External link templates using Wikidata]] | [[Category:External link templates using Wikidata]] | ||
[[Category:Templates that add a tracking category]] | [[Category:Templates that add a tracking category]] | ||
}}</includeonly> | }}</includeonly> | ||
Revision as of 02:55, 6 November 2018
| 40px | This is a documentation subpage for Template:BoxRec. It contains usage information, categories and other content that is not part of the original template page. |
Template:Uses Wikidata Template:Tracks Wikidata
| 30px | This template uses Lua: |
Template:BoxRec 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.
Contents
Usage
Unnamed parameters:
Named parameters:
Using Wikidata property Template:Property:
Examples
Unnamed parameters
- Usage
- Template:Tlcw
- Output
-
- Boxing record for Muhammad Ali from BoxRecScript error: No such module "EditAtWikidata". Template:WikidataCheck
Named parameters
- Usage
- Template:Tlcw
- Output
-
- Boxing record for Joe Louis from BoxRecScript error: No such module "EditAtWikidata". Template:WikidataCheck
No parameters and Wikidata property not defined
- Usage
- Template:Tlcw
- Usage
-
- Boxing record for Template:PAGENAMEBASE from BoxRecScript error: No such module "EditAtWikidata". Template:WikidataCheck
Instructions
- Go to the 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.
- The page URL should look like
http://boxrec.com/boxer/IDorhttp://boxrec.com/en/boxer/ID, whereIDis the ID number for the boxer. - Add one of the following to the external links section of the boxer's Wikipedia article:
* {{BoxRec|ID}}* {{BoxRec|ID|NAME}}- where
IDis the boxer's ID number from the URL - and
NAMEis 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
TemplateData for BoxRec
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.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| id | id 1 | 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.
| Number | optional |
| name | name 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)".
| String | optional |
Tracking categories
- "id" parameter exists
- Category:BoxRec template with ID same as Wikidata (0)
- Category:BoxRec template with ID different from Wikidata (0)
- Category:BoxRec template with ID not in Wikidata (0)
- "id" parameter does not exist
- Category:BoxRec template using Wikidata (0)
- Category:BoxRec template missing ID and not in Wikidata (0)