Difference between revisions of "Template:Cricket graph requests"
imported>Extra999 |
imported>Benzband (update) |
||
| Line 1: | Line 1: | ||
{{#ifeq:{{{usage|}}}|suspend|'''Suspended:''' <span style="color:#736F6E">{{{reason|}}}</span>|<!-- | {{#ifeq:{{{usage|}}}|suspend|'''Suspended:''' <span style="color:#736F6E">{{{reason|}}}</span>|<!-- | ||
| + | -->{{#if:{{{name|{{{1|{{{link|<noinclude>Example</noinclude>}}}}}}}}}| | ||
| + | ==={{{{{{name|{{{1|{{{link|<noinclude>Example</noinclude>}}}}}}}}}=== | ||
| + | |}}<!-- | ||
-->{{#if:{{{name|{{{1|<noinclude>Example</noinclude>}}}}}}|'''[[{{{link|{{{name|{{{1|<noinclude>Example</noinclude>}}}}}}}}}{{!}}{{{name|{{{1|{{{link|<noinclude>Example</noinclude>}}}}}}}}}]]'''|}} <!-- | -->{{#if:{{{name|{{{1|<noinclude>Example</noinclude>}}}}}}|'''[[{{{link|{{{name|{{{1|<noinclude>Example</noinclude>}}}}}}}}}{{!}}{{{name|{{{1|{{{link|<noinclude>Example</noinclude>}}}}}}}}}]]'''|}} <!-- | ||
| − | -->{{#ifeq:{{{format|{{{2|}}}}}}|test|([[Test match{{!}}<span style="color:#736F6E">Test</span>]] | + | -->{{#ifeq:{{{format|{{{2|}}}}}}|test|([[Test match{{!}}<span style="color:#736F6E">Test</span>]]|}}<!-- |
| − | -->{{#ifeq:{{{format|{{{2|}}}}}}|Test|([[Test match{{!}}<span style="color:#736F6E">Test</span>]] | + | -->{{#ifeq:{{{format|{{{2|}}}}}}|Test|([[Test match{{!}}<span style="color:#736F6E">Test</span>]]|}}<!-- |
| − | -->{{#ifeq:{{{format|{{{2|}}}}}}|tests|([[Test match{{!}}<span style="color:#736F6E">Test</span>]] | + | -->{{#ifeq:{{{format|{{{2|}}}}}}|tests|([[Test match{{!}}<span style="color:#736F6E">Test</span>]]|}}<!-- |
| − | -->{{#ifeq:{{{format|{{{2|}}}}}}|Tests|([[Test match{{!}}<span style="color:#736F6E">Test</span>]] | + | -->{{#ifeq:{{{format|{{{2|}}}}}}|Tests|([[Test match{{!}}<span style="color:#736F6E">Test</span>]]|}}<!-- |
| − | -->{{#ifeq:{{{format|{{{2|}}}}}}|odi|([[One Day International{{!}}<span style="color:#736F6E">ODI</span>]] | + | -->{{#ifeq:{{{format|{{{2|}}}}}}|odi|([[One Day International{{!}}<span style="color:#736F6E">ODI</span>]]|}}<!-- |
| − | -->{{#ifeq:{{{format|{{{2|}}}}}}|ODI|([[One Day International{{!}}<span style="color:#736F6E">ODI</span>]] | + | -->{{#ifeq:{{{format|{{{2|}}}}}}|ODI|([[One Day International{{!}}<span style="color:#736F6E">ODI</span>]]|}}<!-- |
| − | -->{{#ifeq:{{{format|{{{2|}}}}}}|ODIs|([[One Day International{{!}}<span style="color:#736F6E">ODI</span>]] | + | -->{{#ifeq:{{{format|{{{2|}}}}}}|ODIs|([[One Day International{{!}}<span style="color:#736F6E">ODI</span>]]|}}<!-- |
| − | -->{{#ifeq:{{{format|{{{2|}}}}}}|odis|([[One Day International{{!}}<span style="color:#736F6E">ODI</span>]] | + | -->{{#ifeq:{{{format|{{{2|}}}}}}|odis|([[One Day International{{!}}<span style="color:#736F6E">ODI</span>]]|}}<!-- |
| − | -->{{#ifeq:{{{format|{{{2|}}}}}}|T20I|([[Twenty20 International{{!}}<span style="color:#736F6E">T20I</span>]] | + | -->{{#ifeq:{{{format|{{{2|}}}}}}|T20I|([[Twenty20 International{{!}}<span style="color:#736F6E">T20I</span>]]|}}<!-- |
| − | -->{{#ifeq:{{{format|{{{2|}}}}}}|T2OI|([[Twenty20 International{{!}}<span style="color:#736F6E">T20I</span>]] | + | -->{{#ifeq:{{{format|{{{2|}}}}}}|T2OI|([[Twenty20 International{{!}}<span style="color:#736F6E">T20I</span>]]|}}<!-- |
| − | -->{{#ifeq:{{{format|{{{2|}}}}}}|T2OIs|([[Twenty20 International{{!}}<span style="color:#736F6E">T20I</span>]] | + | -->{{#ifeq:{{{format|{{{2|}}}}}}|T2OIs|([[Twenty20 International{{!}}<span style="color:#736F6E">T20I</span>]]|}}<!-- |
| − | -->{{#ifeq:{{{format|{{{2|}}}}}}|t20i|([[Twenty20 International{{!}}<span style="color:#736F6E">T20I</span>]] | + | -->{{#ifeq:{{{format|{{{2|}}}}}}|t20i|([[Twenty20 International{{!}}<span style="color:#736F6E">T20I</span>]]|}}<!-- |
| − | -->{{#ifeq:{{{format|{{{2|}}}}}}|t2oi|([[Twenty20 International{{!}}<span style="color:#736F6E">T20I</span>]] | + | -->{{#ifeq:{{{format|{{{2|}}}}}}|t2oi|([[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>]])|}} <!-- | -->{{#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>]])|}} <!-- | ||
| − | -->{{#ifeq:{{{format 2|}}}|test| | + | -->{{#if:{{{format|}}}|{{#if:{{{format 2|}}}|{{·}}|)}}|}} {{#if:{{{format 2|}}}|{{{#if:{{{format|}}}||(}}|}}<!-- |
| − | -->{{#ifeq:{{{format 2|}}}|Test| | + | -->{{#ifeq:{{{format 2|}}}|test|[[Test match{{!}}<span style="color:#736F6E">Test</span>]])|}}<!-- |
| − | -->{{#ifeq:{{{format 2|}}}|tests| | + | -->{{#ifeq:{{{format 2|}}}|Test|[[Test match{{!}}<span style="color:#736F6E">Test</span>]])|}}<!-- |
| − | -->{{#ifeq:{{{format 2|}}}|Tests| | + | -->{{#ifeq:{{{format 2|}}}|tests|[[Test match{{!}}<span style="color:#736F6E">Test</span>]])|}}<!-- |
| − | -->{{#ifeq:{{{format 2|}}}|odi| | + | -->{{#ifeq:{{{format 2|}}}|Tests|[[Test match{{!}}<span style="color:#736F6E">Test</span>]])|}}<!-- |
| − | -->{{#ifeq:{{{format 2|}}}|ODI| | + | -->{{#ifeq:{{{format 2|}}}|odi|[[One Day International{{!}}<span style="color:#736F6E">ODI</span>]])|}}<!-- |
| − | -->{{#ifeq:{{{format 2|}}}|ODIs| | + | -->{{#ifeq:{{{format 2|}}}|ODI|[[One Day International{{!}}<span style="color:#736F6E">ODI</span>]])|}}<!-- |
| − | -->{{#ifeq:{{{format 2|}}}}|odis| | + | -->{{#ifeq:{{{format 2|}}}|ODIs|[[One Day International{{!}}<span style="color:#736F6E">ODI</span>]])|}}<!-- |
| − | -->{{#ifeq:{{{format 2|}}}|T20I| | + | -->{{#ifeq:{{{format 2|}}}}|odis|[[One Day International{{!}}<span style="color:#736F6E">ODI</span>]])|}}<!-- |
| − | -->{{#ifeq:{{{format 2|}}}|T2OI| | + | -->{{#ifeq:{{{format 2|}}}|T20I|[[Twenty20 International{{!}}<span style="color:#736F6E">T20I</span>]])|}}<!-- |
| − | -->{{#ifeq:{{{format 2|}}}|T2OIs| | + | -->{{#ifeq:{{{format 2|}}}|T2OI|[[Twenty20 International{{!}}<span style="color:#736F6E">T20I</span>]])|}}<!-- |
| − | -->{{#ifeq:{{{format 2|}}}|t20i| | + | -->{{#ifeq:{{{format 2|}}}|T2OIs|[[Twenty20 International{{!}}<span style="color:#736F6E">T20I</span>]])|}}<!-- |
| − | -->{{#ifeq:{{{format 2|}}}|t2oi| | + | -->{{#ifeq:{{{format 2|}}}|t20i|[[Twenty20 International{{!}}<span style="color:#736F6E">T20I</span>]])|}}<!-- |
| − | -->{{# | + | -->{{#ifeq:{{{format 2|}}}|t2oi|[[Twenty20 International{{!}}<span style="color:#736F6E">T20I</span>]])|}}<!-- |
| + | -->{{#if:{{{format 2}}}|)}}|)|}} <!-- | ||
-->{{#if:{{{cricinfoid|}}}|<small><span class="plainlinks">([http://www.espncricinfo.com/ci/content/player/{{{cricinfoid|}}}.html Cricinfo profile])</span></small>|}} <!-- | -->{{#if:{{{cricinfoid|}}}|<small><span class="plainlinks">([http://www.espncricinfo.com/ci/content/player/{{{cricinfoid|}}}.html Cricinfo profile])</span></small>|}} <!-- | ||
-->{{#if:{{{note|{{{3|<noinclude>note</noinclude>}}}}}}|<br><small>Note: <span style="color:#736F6E">{{{note|{{{3|<noinclude>Example note</noinclude>}}}}}}</span>.</small>|}}<!-- | -->{{#if:{{{note|{{{3|<noinclude>note</noinclude>}}}}}}|<br><small>Note: <span style="color:#736F6E">{{{note|{{{3|<noinclude>Example note</noinclude>}}}}}}</span>.</small>|}}<!-- | ||
Revision as of 14:55, 1 June 2012
{{#ifeq:|suspend|Suspended: |{{#if:Example|
==={Template:Example===Example (Test · ODI · T20I) )|)|}}
Note: Example note.}}
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
- the header, which normally displays the defined name, can be disabled by inserting
format
|format= or |2=:
In the following examples, header has been disabled.
- set to "test", "Test", "tests" or "Tests" produces:
{{#ifeq:|suspend|Suspended: |{{#if:Example| ==={Template:Example===Example (Test )|)|}} }}
- set to "odi", "ODI", "odis" or "ODIs" produces:
{{#ifeq:|suspend|Suspended: |{{#if:Example| ==={Template:Example===Example (ODI )|)|}} }}
- set to "T20I", "t20i", "t20is" or "T20Is" produces:
{{#ifeq:|suspend|Suspended: |{{#if:Example| ==={Template:Example===Example (T20I )|)|}} }}
- set to "all" produces:
{{#ifeq:|suspend|Suspended: |{{#if:Example| ==={Template:Example===Example (Test · ODI · T20I) )|)|}} }}
- 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:
{{#ifeq:|suspend|Suspended: |{{#if:Example| ==={Template:Example===Example (Test · {ODI))|)|}} }}
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 {{#ifeq:suspend|suspend|Suspended: |{{#if:|
==={Template:=== )|)|}} }}
In this parameter, the header function is disabled.
- a
|reason=or|1=can be specified, producing
{{#ifeq:suspend|suspend|Suspended: Reason|{{#if:|
==={Template:=== )|)|}} }}
- a
|fixture=can be specified, producing
{{#ifeq:suspend|suspend|Suspended: |{{#if:|
==={Template:=== )|)|}} }}
For example,
{{Cricket graph requests|usage=suspend|reason=Example}} would produce:
{{#ifeq:suspend|suspend|Suspended: Example reason|{{#if:|
==={Template:=== )|)|}} }}
Examples
In the following examples, the header has not been disabled.
{{Cricket graph requests|Example|T20I|note}}would produce:
{{#ifeq:|suspend|Suspended: |{{#if:Example|
==={Template:Example===Example (T20I )|)|}}
Note: note.}}
{{Cricket graph requests|link=Ross Taylor|name=Taylor, Ross|format=Test|format 2=ODI|cricinfoid=38699|note=Note for Taylor}}would produce:
{{#ifeq:|suspend|Suspended: |{{#if:Taylor, Ross|
==={Template:Taylor, Ross===Taylor, Ross (Test · {ODI))|)|}} (Cricinfo profile)
Note: Note for Taylor.}}
- if no parameters are specified whatsoever, the template produces an error message. thus,
{{Cricket graph requests}}alone would produce: {{#ifeq:|suspend|Suspended: |{{#if:|
==={Template:=== )|)|}} no parameters specified}}
| The above documentation is transcluded from Template:Cricket graph requests/doc. (edit | history) Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages. Please add categories to the /doc subpage. Subpages of this template. |