Difference between revisions of "Template:Cricket graph requests"

From blackwiki
Jump to navigation Jump to search
imported>Extra999
imported>Benzband
(add parameters)
Line 1: Line 1:
[[Image:Pictogram voting wait.svg|18px|Requests|link=]] '''[[{{{1}}}]]''' ''{{{2}}}'' {{{3}}}
+
[[Image:Pictogram voting wait.svg|18px|Requests|link=]] <!--
 +
-->{{#if:{{{name|{{{1|<noinclude>Example</noinclude>}}}}}}|'''[[{{{link|{{{name|{{{1|<noinclude>Example</noinclude>}}}}}}}}}{{!}}{{{name|{{{1|{{{link|<noinclude>Example</noinclude>}}}}}}}}}]]'''|}} <!--
 +
-->{{#ifeq:{{{format|{{{2|{{{format_2|}}}}}}}}}|test|([[Test match{{!}}<span style="color:#736F6E">Test</span>]])|}}<!--
 +
-->{{#ifeq:{{{format|{{{2|{{{format_2|}}}}}}}}}|Test|([[Test match{{!}}<span style="color:#736F6E">Test</span>]])|}}<!--
 +
-->{{#ifeq:{{{format|{{{2|{{{format_2|}}}}}}}}}|odi|([[One Day International{{!}}<span style="color:#736F6E">ODI</span>]])|}}<!--
 +
-->{{#ifeq:{{{format|{{{2|{{{format_2|}}}}}}}}}|ODI|([[One Day International{{!}}<span style="color:#736F6E">ODI</span>]])|}}<!--
 +
-->{{#ifeq:{{{format|{{{2|{{{format_2|}}}}}}}}}|T20I|([[Twenty20 International{{!}}<span style="color:#736F6E">T20I</span>]])|}}<!--
 +
-->{{#ifeq:{{{format|{{{2|<noinclude>all</noinclude>}}}}}}|all|([[Test match{{!}}<span style="color:#736F6E">Test</span>]]{{·}}[[One Day International{{!}}<span style="color:#736F6E">ODI</span>]]{{·}}[[Twenty20 International{{!}}<span style="color:#736F6E">T20I</span>]])|}} <!--
 +
-->{{#if:{{{cricinfoid|}}}|(<small><span class="plainlinks">[http://www.espncricinfo.com/general/content/player/{{{cricinfoid|}}}.html Cricinfo profile]</span></small>|}}<!--
 +
-->{{#if:{{{note|{{{3|<noinclude>note</noinclude>}}}}}}|{{{note|{{{3|<noinclude>note</noinclude>}}}}}}.|}}<!--
 +
-->{{#if:{{{1|}}}{{{name|}}}{{{link|}}}{{{2|}}}{{{format|2}}}{{{format_2|}}}{{{cricinfoid|}}}{{{3|}}}{{{note|}}}||{{error|no parameters specified}}
  
 
<noinclude>
 
<noinclude>
This template is used here: [[WP:CRIC/GR]].
+
{{documentation}}
 +
</noinclude>

Revision as of 17:29, 30 May 2012

Requests Example (Test · ODI · T20I) note.{{#if:2||no parameters specified


50px Template documentation[view] [edit] [history] [purge]


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:

Requests Example (Test) {{#if:Exampletest2||no parameters specified


  • set to "odi", "ODI", "odis" or "ODIs" produces:

Requests Example (ODI) {{#if:Exampleodi2||no parameters specified


  • set to "T20I", "t20i", "t20is" or "T20Is" produces:

Requests Example (T20I) {{#if:ExampleT20I2||no parameters specified


  • set to "all" produces:

Requests Example (Test · ODI · T20I) {{#if:Exampleall2||no parameters specified


  • 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:

Requests Example (Test) {{#if:Exampletest||no parameters specified


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 Requests {{#if:2||no parameters specified


In this parameter, the header function is disabled.

  • a |reason= or |1= can be specified, producing
    Requests {{#if:2||no parameters specified


  • a |fixture= can be specified, producing
    Requests {{#if:2||no parameters specified


For example, {{Cricket graph requests|usage=suspend|reason=Example}} would produce:
Requests {{#if:2||no parameters specified


Examples

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

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

Requests Example (T20I) note.{{#if:ExampleT20I2note||no parameters specified


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

Requests Taylor, Ross (Test) (Cricinfo profileNote for Taylor.{{#if:Taylor, RossRoss TaylorTest38699Note for Taylor||no parameters specified


  • if no parameters are specified whatsoever, the template produces an error message. thus, {{Cricket graph requests}} alone would produce: Requests {{#if:2||no parameters specified