Difference between revisions of "Template:ISSF/doc"

From blackwiki
Jump to navigation Jump to search
imported>Zyxw
(create documentation)
 
imported>Zyxw
(updates for use and tracking of associated Wikidata property)
Line 1: Line 1:
 
{{Documentation subpage}}
 
{{Documentation subpage}}
<!--Categories where indicated at the bottom of this page, please; interwikis at Wikidata (see [[Wikipedia:Wikidata]])-->
+
<!-- Place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
 +
{{Uses Wikidata|P2730}}
 +
{{Tracks Wikidata|P2730}}
 +
{{Lua|Module:WikidataCheck}}
  
'''{{NAMESPACE}}:{{BASEPAGENAME}}''' displays an external link to an athlete's page at the [[International Shooting Sport Federation]] (ISSF) website.
+
'''{{NAMESPACE}}:{{BASEPAGENAME}}''' displays an external link to a [[shooting sport]] athlete's page at [http://www.issf-sports.org/ ISSF-sports.org], the official website of the [[International Shooting Sport Federation]] (ISSF). It is intended for use in the [[Wikipedia:External links|external links]] section of an article.
  
 
== Usage ==
 
== Usage ==
 +
No parameters (only works if [[Wikidata]] property [[d:Property:P2730|P2730]] exists):
 +
* <code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>}}</nowiki></code>
 +
 
One parameter:
 
One parameter:
 
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | ''ID'' }}</code>
 
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | ''ID'' }}</code>
Line 17: Line 23:
 
<templatedata>
 
<templatedata>
 
{
 
{
   "description": "This template displays an external link to an athlete's page at the International Shooting Sport Federation (ISSF) website.",
+
   "description": "This template displays an external link to a shooting sport athlete's page at ISSF-sports.org, the official website of the International Shooting Sport Federation (ISSF). It is intended for use in the external links section of an article.",
 
   "params": {
 
   "params": {
     "1": {
+
     "id": {
 
       "label": "ID",
 
       "label": "ID",
       "aliases": ["id"],  
+
       "aliases": ["1"],  
       "description": "ID portion of URL for athlete's ISSF web page. Example: SHCHNW0605198901 is the ID portion of http://www.issf-sports.org/athletes/athlete.ashx?personissfid=SHCHNW0605198901.",
+
       "description": "The \"id\" parameter (or unnamed parameter \"1\") should contain the ID portion of the URL for a shooting sport athlete's ISSF web page. Example: SHCHNW0605198901 is the ID portion of http://www.issf-sports.org/athletes/athlete.ashx?personissfid=SHCHNW0605198901. This parameter is optional if Wikidata property P2730 exists, but required if not.",
 
       "type": "string",
 
       "type": "string",
       "default": "",
+
       "default": "Wikidata property P2730",
 
       "required": true
 
       "required": true
 
     },
 
     },
     "2": {
+
     "name": {
 
       "label": "Name",
 
       "label": "Name",
       "aliases": ["name"],  
+
       "aliases": ["2"],  
       "description": "Name of athlete. If not given it defaults to the Wikipedia article name, without any disambiguation such as (sport shooter).",
+
       "description": "The \"name\" parameter (or unnamed parameter \"2\") may be used to specify the link text, which should be the name of the shooting sport athlete. This parameter is optional; it defaults to the Wikipedia article name, without any disambiguation such as \"(sport shooter)\".",
 
       "type": "string",
 
       "type": "string",
 
       "default": "{{PAGENAMEBASE}}",
 
       "default": "{{PAGENAMEBASE}}",
Line 62: Line 68:
 
# <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | id= SHCHNW0605198901 | name= YI Siling }}</code>
 
# <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | id= SHCHNW0605198901 | name= YI Siling }}</code>
 
#: {{{{BASEPAGENAME}} | id= SHCHNW0605198901 | name= YI Siling }}
 
#: {{{{BASEPAGENAME}} | id= SHCHNW0605198901 | name= YI Siling }}
 +
 +
==Tracking categories==
 +
; ID parameter exists
 +
* [[:Category:ISSF ID not in Wikidata]] ({{PAGESINCAT:ISSF ID not in Wikidata}} pages)
 +
* [[:Category:ISSF ID different from Wikidata]] ({{PAGESINCAT:ISSF ID different from Wikidata}} pages)
 +
* [[:Category:ISSF ID same as Wikidata]] ({{PAGESINCAT:ISSF ID same as Wikidata}} pages)
 +
; ID parameter does not exist
 +
* [[:Category:ISSF template using Wikidata]] ({{PAGESINCAT:ISSF template using Wikidata}} pages)
 +
* [[:Category:ISSF template missing ID]] ({{PAGESINCAT:ISSF template missing ID}} pages)
  
 
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox||
 
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox||
Line 68: Line 83:
 
[[Category:Sports external link templates]]
 
[[Category:Sports external link templates]]
 
[[Category:Shooting templates]]
 
[[Category:Shooting templates]]
 +
[[Category:Templates that add a tracking category]]
 
}}</includeonly>
 
}}</includeonly>

Revision as of 09:41, 7 June 2016

Template:Uses Wikidata Template:Tracks Wikidata

Template:ISSF displays an external link to a shooting sport athlete's page at ISSF-sports.org, the official website of the International Shooting Sport Federation (ISSF). It is intended for use in the external links section of an article.

Usage

No parameters (only works if Wikidata property P2730 exists):

  • {{ISSF}}

One parameter:

{{ISSF | ID }}
{{ISSF | id= ID }}

Two parameters:

{{ISSF | ID | NAME }}
{{ISSF | id= ID | name= NAME }}

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 ISSF

This template displays an external link to a shooting sport athlete's page at ISSF-sports.org, the official website of the International Shooting Sport Federation (ISSF). 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 for a shooting sport athlete's ISSF web page. Example: SHCHNW0605198901 is the ID portion of http://www.issf-sports.org/athletes/athlete.ashx?personissfid=SHCHNW0605198901. This parameter is optional if Wikidata property P2730 exists, but required if not.

Default
Wikidata property P2730
Stringrequired
Namename 2

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

Default
{{PAGENAMEBASE}}
Stringoptional

Instructions

  1. Go to ISSF-sports.org and search for an athlete
  2. Click on the correct link to go to the athlete's page
  3. The page URL should look like
http://www.issf-sports.org/athletes/athlete.ashx?personissfid=AAAAAAnnnnnnnnnn
where "AAAAAAnnnnnnnnnn" indicates the alphanumeric ID string for a specific athlete.

Examples

One parameter:

ISSF web page for Joshua Richmond:
http://www.issf-sports.org/athletes/athlete.ashx?personissfid=SHUSAM1912198501
  1. {{ISSF | SHUSAM1912198501 }}
    Template:PAGENAMEBASE at the International Shooting Sport FederationScript error: No such module "EditAtWikidata". Template:WikidataCheck
  2. {{ISSF | id= SHUSAM1912198501 }}
    Template:PAGENAMEBASE at the International Shooting Sport FederationScript error: No such module "EditAtWikidata". Template:WikidataCheck

Two parameters:

ISSF web page for Yi Siling:
http://www.issf-sports.org/athletes/athlete.ashx?personissfid=SHCHNW0605198901
  1. {{ISSF | SHCHNW0605198901 | YI Siling }}
    YI Siling at the International Shooting Sport FederationScript error: No such module "EditAtWikidata". Template:WikidataCheck
  2. {{ISSF | id= SHCHNW0605198901 | name= YI Siling }}
    YI Siling at the International Shooting Sport FederationScript error: No such module "EditAtWikidata". Template:WikidataCheck

Tracking categories

ID parameter exists
ID parameter does not exist