Difference between revisions of "Template:Cricket graph requests/doc"

From blackwiki
Jump to navigation Jump to search
imported>Benzband
m (headers)
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)
 
(10 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
{{Documentation subpage}}
 
{{Documentation subpage}}
 
<!-- Categories and interwikis go at the bottom of this page. -->
 
<!-- Categories and interwikis go at the bottom of this page. -->
 +
 +
__NOTOC__
  
 
This template is used at [[WP:CRIC/GR]].
 
This template is used at [[WP:CRIC/GR]].
Line 6: Line 8:
 
== Parameters ==
 
== Parameters ==
  
;name (required)
+
For this tutorial, headers have been disabled from the template using {{para|header|no}}.
*{{para|name}} or {{para|1}} for defining the (linked) name
 
*{{para|link}} and {{para|name}} for defining a link if different from the name (<tt><nowiki>[[link|name]]</nowiki></tt>)
 
**the header option can be disabled by inserting {{para|header|no}}, which produces:
 
{{CGR|Example|format=test|header=no}}
 
  
;format
+
=== name ===
{{para|format}} or {{para|2}}:
+
*{{para|name}} or {{para|1}} for defining the name
*set to "test", "Test", "tests" or "Tests" produces:
+
*{{para|link}} and {{para|name}} for defining a link if different from the name (as in <kbd><nowiki>[[</nowiki><u>link</u><nowiki>|name]]</nowiki></kbd>)
{{CGR|Example|test}}
+
**the header, which normally displays the defined name, can be disabled by inserting {{para|header|no}}
 +
 
 +
=== format ===
 +
{{para|format}} or {{para|2}}:<br>
 +
In the following examples, header has been disabled.
 +
*set to "test", "Test", "tests" or "Tests" produces:  
 +
{{Cricket graph requests|Example|test|header=no}}
 
* set to "odi", "ODI", "odis" or "ODIs" produces:
 
* set to "odi", "ODI", "odis" or "ODIs" produces:
{{CGR|Example|odi}}
+
{{Cricket graph requests|Example|odi|header=no}}
* set to "T20I", "t20i" or "T20Is" produces:
+
* set to "T20I", "t20i", "t20is" or "T20Is" produces:
{{CGR|Example|T20I}}
+
{{Cricket graph requests|Example|T20I|header=no}}
 
*set to "all" produces:
 
*set to "all" produces:
{{CGR|Example|all}}
+
{{Cricket graph requests|Example|all|header=no}}
*two formats can be added, using {{para|format 2}} (except for "all", which already includes all possibilities)
+
*two formats can be added, using {{para|format 2}} or {{para|format_2}} or {{para|format2}} (except for "all", which already includes all possibilities)
*say, <code><nowiki>{{CGR|name=Example|format=test|format 2=odi}}</nowiki></code> would produce:
+
*say, <code><nowiki>{{Cricket graph requests|name=Example|format=test|format 2=odi}}</nowiki></code> would produce:
{{CGR|name=Example|format=test|format 2=odi}}
+
{{Cricket graph requests|name=Example|format=test|format 2=odi|header=no}}
  
;cricinfo id
+
=== cricinfo id ===
{{para|cricinfoid}} for defining a [[Cricinfo]] player id external link: <tt><nowiki>http://www.espncricinfo.com/ci/content/player/</nowiki><u>cricinfoid</u>.html]</tt>
+
{{para|cricinfoid}} or {{para|4}} for defining a [[Cricinfo]] player id external link (as in <kbd><nowiki>http://www.espncricinfo.com/ci/content/player/</nowiki><u>cricinfoid</u><nowiki>.html</nowiki></kbd>)
  
;note
+
=== note ===
 
{{para|note}} or {{para|3}} for leaving an additional note or signature
 
{{para|note}} or {{para|3}} for leaving an additional note or signature
  
;usage
+
=== usage ===
{{para|usage|suspend}} produces {{CGR|usage=suspend}}
+
{{para|usage|suspend}} produces {{Cricket graph requests|usage=suspend}}  
*a {{para|reason}} can be specified for this, producing {{CGR|usage=suspend|reason=Example reason.}}
+
In this parameter, the header function is disabled.
 +
*a {{para|reason}} or {{para|1}} can be specified, producing<br> {{Cricket graph requests|usage=suspend|reason=Reason}}
 +
*a {{para|fixture}} can be specified, producing<br> {{Cricket graph requests|usage=suspend|fixture=Fixture}}
 +
For example,
 +
<code><nowiki>{{Cricket graph requests|usage=suspend|reason=Example}}</nowiki></code> would produce:<br>
 +
{{Cricket graph requests|usage=suspend|reason=Example reason}}
  
 
== Examples ==
 
== Examples ==
  
*<code><nowiki>{{CGR|Example|T20I|note}}</nowiki></code> would produce:
+
In the following examples, the header has not been disabled.
{{CGR|Example|T20I|note}}
+
 
 +
*<code><nowiki>{{Cricket graph requests|Example|T20I|note}}</nowiki></code> would produce:
 +
{{Cricket graph requests|Example|T20I|note}}
  
*<code><nowiki>{{CGR|link=Ross Taylor|name=Taylor, Ross|format=Test|format 2=ODI|cricinfoid=38699|note=Note for Taylor}}</nowiki></code> would produce:
+
*<code><nowiki>{{Cricket graph requests|link=Ross Taylor|name=Taylor, Ross|format=Test|format 2=ODI|cricinfoid=38699|note=Note for Taylor}}</nowiki></code> would produce:
{{CGR|link=Ross Taylor|name=Taylor, Ross|format=Test|format 2=ODI|cricinfoid=38699|note=Note for Taylor}}
+
{{Cricket graph requests|link=Ross Taylor|name=Taylor, Ross|format=Test|format 2=ODI|cricinfoid=38699|note=Note for Taylor}}
  
*if no parameters are specified whatsoever, the template produces an error message. thus, <code><nowiki>{{CGR}}</nowiki></code> alone would produce:
+
*if no parameters are specified whatsoever, the template produces an error message. thus, <code><nowiki>{{Cricket graph requests}}</nowiki></code> alone would produce: {{Cricket graph requests}}
{{CGR}}
 
  
 
<includeonly>
 
<includeonly>
<!-- Categories and interwikis go here: -->
+
<!-- Categories go here: -->
  
 
</includeonly>
 
</includeonly>

Latest revision as of 06:54, 5 August 2018


This template is used at WP:CRIC/GR.

Parameters

For this tutorial, headers have been disabled from the template using |header=no.

name

  • |name= or |1= for defining the name
  • |link= and |name= for defining a link if different from the name (as in [[link|name]])
    • the header, which normally displays the defined name, can be disabled by inserting |header=no

format

|format= or |2=:
In the following examples, header has been disabled.

  • set to "test", "Test", "tests" or "Tests" produces:
  • set to "odi", "ODI", "odis" or "ODIs" produces:
  • set to "T20I", "t20i", "t20is" or "T20Is" produces:
  • set to "all" produces:
  • two formats can be added, using |format 2= or |format_2= or |format2= (except for "all", which already includes all possibilities)
  • say, {{Cricket graph requests|name=Example|format=test|format 2=odi}} would produce:

cricinfo id

|cricinfoid= or |4= for defining a Cricinfo player id external link (as in http://www.espncricinfo.com/ci/content/player/cricinfoid.html)

note

|note= or |3= for leaving an additional note or signature

usage

|usage=suspend produces Suspended.

In this parameter, the header function is disabled.

  • a |reason= or |1= can be specified, producing
    Suspended
  Reason.
  • a |fixture= can be specified, producing
    Suspended
 Due to the ongoing matches on the tour of the Fixture.

For example, {{Cricket graph requests|usage=suspend|reason=Example}} would produce:
Suspended

  Example reason.

Examples

In the following examples, the header has not been disabled.

  • {{Cricket graph requests|Example|T20I|note}} would produce:

Example

Note: note.
  • {{Cricket graph requests|link=Ross Taylor|name=Taylor, Ross|format=Test|format 2=ODI|cricinfoid=38699|note=Note for Taylor}} would produce:

Taylor, Ross

Note: Note for Taylor.
  • if no parameters are specified whatsoever, the template produces an error message. thus, {{Cricket graph requests}} alone would produce:

no parameters specified