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

From blackwiki
Jump to navigation Jump to search
imported>Extra999
imported>Benzband
m (update)
Line 5: Line 5:
  
 
=== Parameters ===
 
=== Parameters ===
 +
 
;name (required)
 
;name (required)
 
*{{para|name}} or {{para|1}} for defining the linked name: <tt><nowiki>[[name]]</nowiki></tt>
 
*{{para|name}} or {{para|1}} for defining the linked name: <tt><nowiki>[[name]]</nowiki></tt>
 
*{{para|link}} and {{para|name}} for defining a link different from name: <tt><nowiki>[[link|name]]</nowiki></tt>
 
*{{para|link}} and {{para|name}} for defining a link different from name: <tt><nowiki>[[link|name]]</nowiki></tt>
 +
 
;format
 
;format
*{{para|format|test}} or {{para|2|test}} or {{para|format|Test}} or {{para|2|Test}} or {{para|format|Tests}} or {{para|2|Tests}} produces {{CGR|Example|test}}
+
*{{para|format}} or {{para|2}}:
*{{para|format|odi}} or {{para|2|odi}} or {{para|format|ODI}} or {{para|2|ODI}} produces {{CGR|Example|odi}}
+
**set to "test", "Test", "tests" or "Tests" produces {{CGR|Example|test}}
*{{para|format|T20I}} or {{para|2|T20I}} or {{para|format|T2OI}} or {{para|2|T2OI}} produces {{CGR|Example|T20I}}
+
** set to "odi" or "ODI" produces {{CGR|Example|odi}}
*{{para|format|all}} or {{para|2|all}} produces {{CGR|Example|all}}
+
** set to "T20I" or "t20i" produces {{CGR|Example|T20I}}
*two formats can be added, using {{para|format_2}} (except for "all")
+
**set to "all" produces {{CGR|Example|all}}
 +
*two formats can be added, using {{para|format_2}} (except for "all", which already includes all possibilities)
 
**say, <code><nowiki>{{CGR|name=Example|format=test|format_2=odi}}</nowiki></code> would produce {{CGR|name=Example|format=test|format_2=odi}}
 
**say, <code><nowiki>{{CGR|name=Example|format=test|format_2=odi}}</nowiki></code> would produce {{CGR|name=Example|format=test|format_2=odi}}
 +
 
;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}} for defining a [[Cricinfo]] player id external link: <tt><nowiki>http://www.espncricinfo.com/ci/content/player/</nowiki><u>cricinfoid</u>.html]</tt>
 +
 
;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 {{CGR|usage=suspend}}
Line 24: Line 30:
  
 
=== Examples ===
 
=== Examples ===
 +
 
*<code><nowiki>{{CGR|Example|T20I|note}}</nowiki></code> would produce:
 
*<code><nowiki>{{CGR|Example|T20I|note}}</nowiki></code> would produce:
 
:{{CGR|Example|T20I|note}}
 
:{{CGR|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>{{CGR|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}}
 
:{{CGR|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>{{CGR}}</nowiki></code> alone would produce:
 
:{{CGR}}
 
:{{CGR}}

Revision as of 15:17, 31 May 2012

This template is used at WP:CRIC/GR.

Parameters

name (required)
  • |name= or |1= for defining the linked name: [[name]]
  • |link= and |name= for defining a link different from name: [[link|name]]
format
  • |format= or |2=:
    • set to "test", "Test", "tests" or "Tests" produces
  1. REDIRECT Template:WikiProject Classical Greece and Rome
    • set to "odi" or "ODI" produces
  1. REDIRECT Template:WikiProject Classical Greece and Rome
    • set to "T20I" or "t20i" produces
  1. REDIRECT Template:WikiProject Classical Greece and Rome
    • set to "all" produces
  1. REDIRECT Template:WikiProject Classical Greece and Rome
  • two formats can be added, using |format_2= (except for "all", which already includes all possibilities)
    • say, {{CGR|name=Example|format=test|format_2=odi}} would produce
  1. REDIRECT Template:WikiProject Classical Greece and Rome
cricinfo id
  • |cricinfoid= for defining a Cricinfo player id external link: http://www.espncricinfo.com/ci/content/player/cricinfoid.html]
note
  • |note= or |3= for leaving an additional note or signature
usage
  • |usage=suspend produces
  1. REDIRECT Template:WikiProject Classical Greece and Rome
    • a |reason= can be specified for this, producing
  1. REDIRECT Template:WikiProject Classical Greece and Rome

Examples

  • {{CGR|Example|T20I|note}} would produce:
  1. REDIRECT Template:WikiProject Classical Greece and Rome
  • {{CGR|link=Ross Taylor|name=Taylor, Ross|format=Test|format_2=ODI|cricinfoid=38699|note=Note for Taylor}} would produce:
  1. REDIRECT Template:WikiProject Classical Greece and Rome
  • if no parameters are specified whatsoever, the template produces an error message. thus, {{CGR}} alone would produce:
  1. REDIRECT Template:WikiProject Classical Greece and Rome