Difference between revisions of "Template:Cricketarchive/doc"

From blackwiki
Jump to navigation Jump to search
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 ==
{{TemplateDataHeader}}
+
{{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>
 
== 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 }}
 
  
 
== Tracking category ==
 
== Tracking category ==
* {{clc|Cricketarchive maintenance}}
+
* {{clc|Cricketarchive maintenance}} &ndash; 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

Template:Wikidata property

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.

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:

http://www.cricketarchive.com/Archive/Players/1/1933/1933.html

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:

http://www.cricketarchive.com/Archive/Grounds/22/1547.html

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

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 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.

Template parameters

ParameterDescriptionTypeStatus
idid

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.

Default
Numberrequired
refref

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.

Default
Stringoptional
namename

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)".

Default
{{PAGENAMEBASE}}
Stringoptional
accessdateaccessdate

The "accessdate" parameter may be used to document the date when the link was accessed or retrieved. This parameter is optional.

Default
Dateoptional

Tracking category

See also