Difference between revisions of "Template:Cricketarchive/doc"
imported>Zyxw (update examples) |
imported>Zyxw (place examples after usage, document tracking category sort keys, add category) |
||
| Line 16: | Line 16: | ||
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | ref= ''REF'' | name= ''NAME'' <nowiki>}}</nowiki></code> | : <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | ref= ''REF'' | name= ''NAME'' <nowiki>}}</nowiki></code> | ||
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | ref= ''REF'' | name= ''NAME'' | accessdate= ''DATE'' <nowiki>}}</nowiki></code> | : <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | ref= ''REF'' | name= ''NAME'' | accessdate= ''DATE'' <nowiki>}}</nowiki></code> | ||
| + | |||
| + | == Examples == | ||
| + | |||
| + | === Using "id" parameter === | ||
| + | {{For|additional examples showing how the URL is formatted based on the number of digits in the "id"|{{NAMESPACE}}:{{BASEPAGENAME}}/testcases}} | ||
| + | |||
| + | ''URL:'' | ||
| + | : <tt>[http://www.cricketarchive.com/Archive/Players/1/1933/1933.html http://www.cricketarchive.com/Archive/Players/1/1933/{{hilite|1933}}.html]</tt> | ||
| + | |||
| + | ''Usage:'' | ||
| + | : <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | id= 1933 | name= Sachin Tendulkar }}</code> | ||
| + | : {{{{BASEPAGENAME}} | id= 1933 | name= Sachin Tendulkar }} | ||
| + | |||
| + | ''Usage with accessdate parameter:'' | ||
| + | : <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | id= 1933 | name= Sachin Tendulkar | accessdate= 25 February 2017 }}</code> | ||
| + | : {{{{BASEPAGENAME}} | id= 1933 | name= Sachin Tendulkar | accessdate= 25 February 2017 }} | ||
| + | |||
| + | === Using "ref" parameter === | ||
| + | ''URL:'' | ||
| + | : <tt>[http://www.cricketarchive.com/Archive/Grounds/22/1547.html http://www.cricketarchive.com/{{hilite|Archive/Grounds/22/1547}}.html]</tt> | ||
| + | |||
| + | ''Usage:'' | ||
| + | : <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | ref= Archive/Grounds/22/1547 | name= Zafar Ali Stadium }}</code> | ||
| + | : {{{{BASEPAGENAME}} | ref= Archive/Grounds/22/1547 | name= Zafar Ali Stadium }} | ||
| + | |||
| + | ''Usage with ".html" in ref parameter:'' | ||
| + | : <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | ref= Archive/Grounds/22/1547.html | name= Zafar Ali Stadium }}</code> | ||
| + | : {{{{BASEPAGENAME}} | ref= Archive/Grounds/22/1547.html | name= Zafar Ali Stadium }} | ||
| + | |||
| + | ''Usage with accessdate parameter:'' | ||
| + | : <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | ref= Archive/Grounds/22/1547 | name= Zafar Ali Stadium | accessdate= 25 February 2017 }}</code> | ||
| + | : {{{{BASEPAGENAME}} | ref= Archive/Grounds/22/1547 | name= Zafar Ali Stadium | accessdate= 25 February 2017 }} | ||
== TemplateData == | == TemplateData == | ||
| − | {{ | + | {{TemplateData header}} |
<templatedata>{ | <templatedata>{ | ||
"description": "This template displays an external link to a CricketArchive web page. Links to cricket player profiles are created with the \"id\" parameter and links to other pages are created with the \"ref\" parameter. It is intended for use in the external links section of an article.", | "description": "This template displays an external link to a CricketArchive web page. Links to cricket player profiles are created with the \"id\" parameter and links to other pages are created with the \"ref\" parameter. It is intended for use in the external links section of an article.", | ||
| Line 51: | Line 83: | ||
} | } | ||
}}</templatedata> | }}</templatedata> | ||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
== Tracking category == | == Tracking category == | ||
| − | * {{clc|Cricketarchive maintenance}} | + | * {{clc|Cricketarchive maintenance}} – handles multiple maintenance issues using [[WP:SORT KEYS|category sort keys]]: |
| + | ** <code>1</code>: pages using template with unnamed parameter 1 | ||
| + | ** <code>2</code>: pages using template with unnamed parameter 2 | ||
== See also == | == See also == | ||
| Line 95: | Line 97: | ||
[[Category:Cricket external link templates]] | [[Category:Cricket external link templates]] | ||
[[Category:People and person external link templates]] | [[Category:People and person external link templates]] | ||
| + | [[Category:External link templates with accessdate parameter]] | ||
[[Category:Templates that add a tracking category]] | [[Category:Templates that add a tracking category]] | ||
| − | |||
}}</includeonly> | }}</includeonly> | ||
Revision as of 18:17, 14 August 2017
| This is a documentation subpage for Template:Cricketarchive. It contains usage information, categories and other content that is not part of the original template page. |
Template:Cricketarchive displays an external link to a CricketArchive web page. Links to cricket player profiles are created with the "id" parameter and links to other pages are created with the "ref" parameter. It is intended for use in the external links section of an article.
Contents
Usage
Using "id" parameter:
{{Cricketarchive | id= ID }}{{Cricketarchive | id= ID | name= NAME }}{{Cricketarchive | id= ID | name= NAME | accessdate= DATE }}
Using "ref" parameter:
{{Cricketarchive | ref= REF }}{{Cricketarchive | ref= REF | name= NAME }}{{Cricketarchive | ref= REF | name= NAME | accessdate= DATE }}
Examples
Using "id" parameter
URL:
Usage:
{{Cricketarchive | id= 1933 | name= Sachin Tendulkar }}- Sachin Tendulkar at CricketArchiveScript error: No such module "EditAtWikidata". Template:Subscription required
Usage with accessdate parameter:
{{Cricketarchive | id= 1933 | name= Sachin Tendulkar | accessdate= 25 February 2017 }}- "Sachin Tendulkar". CricketArchive. Retrieved 25 February 2017. Template:Subscription required
Using "ref" parameter
URL:
Usage:
{{Cricketarchive | ref= Archive/Grounds/22/1547 | name= Zafar Ali Stadium }}- Zafar Ali Stadium at CricketArchiveScript error: No such module "EditAtWikidata". Template:Subscription required
Usage with ".html" in ref parameter:
{{Cricketarchive | ref= Archive/Grounds/22/1547.html | name= Zafar Ali Stadium }}- Zafar Ali Stadium at CricketArchiveScript error: No such module "EditAtWikidata". Template:Subscription required
Usage with accessdate parameter:
{{Cricketarchive | ref= Archive/Grounds/22/1547 | name= Zafar Ali Stadium | accessdate= 25 February 2017 }}- "Zafar Ali Stadium". CricketArchive. Retrieved 25 February 2017. Template:Subscription required
TemplateData
TemplateData for Cricketarchive
This template displays an external link to a CricketArchive web page. Links to cricket player profiles are created with the "id" parameter and links to other pages are created with the "ref" parameter. It is intended for use in the external links section of an article.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| id | id | The "id" parameter should contain the ID number in the URL for the player's profile. Example: 1933 is the "id" in http://www.cricketarchive.com/Archive/Players/1/1933/1933.html.
| Number | required |
| ref | ref | The "ref" parameter is optional and only used when the player "id" is not specified. If used, it should contain the portion of the URL between "http://www.cricketarchive.com/" and ".html". Example: Archive/Grounds/22/1547 is the "ref" portion of http://www.cricketarchive.com/Archive/Grounds/22/1547.html.
| String | optional |
| name | name | The "name" parameter may be used to specify the link text. This parameter is optional; it defaults to the Wikipedia article name, without any disambiguation such as "(cricketer)".
| String | optional |
| accessdate | accessdate | The "accessdate" parameter may be used to document the date when the link was accessed or retrieved. This parameter is optional.
| Date | optional |
Tracking category
- Category:Cricketarchive maintenance (0) – handles multiple maintenance issues using category sort keys:
1: pages using template with unnamed parameter 12: pages using template with unnamed parameter 2
See also
{{Cricinfo}}, which uses a similar format{{Yahoo! Cricket}}, which uses a similar format