Cricket Template‑class | ||||||||||||
|
Usage: Designed to be used instead of Template:First Class Matches where an editor feels necessary/prefers working with it. The functionality is similar, but extended, as described below.
Contrary to the name, this template does not have to be used for just Test Matches - it may be used for those that do not necessarily have test status (ie a Tour Match, or a First Class match in domestic cricket). It is simply named as such because 'First Class Matches' would be the ideal name but is currently taken by the old method.
Usage of the template may appear confusing at first but is easily explained. A clean template with all variables available is:
{{Test match | date = | team1 = | team2 = | score-team1-inns1 = | runs-team1-inns1 = | wickets-team1-inns1 = | score-team2-inns1 = | runs-team2-inns1 = | wickets-team2-inns1 = | score-team1-inns2 = | runs-team1-inns2 = | wickets-team1-inns2 = | score-team2-inns2 = | runs-team2-inns2 = | wickets-team2-inns2 = | result = | venue = | umpires = | motm = | report = | rain = | }}
Most are fairly obvious, but some may seem slightly more ambiguous at first:
Advantages of this system:
Drawbacks:
date = [[November 5]] -<br>[[November 8]], [[2007]] |
Although changing the dates is obviously necessary depending on the page. Note: I have plans to possibly change the template to make the column with the date data in it wider so that even long dates can fit on one line. I'll keep this page updated.
Examples:
A match that wasn't completed:
v
|
||
An empty scorecard, in preparation for an upcoming match:
v
|
||
A match that was won without playing all innings:
Would it be possible to make this template show the umpires even when the "result" parameter is empty? It's extremely frustrating to have to fill in that parameter just to make the umpires' names show. – Pee Jay 14:45, 8 July 2009 (UTC)
When filling in the information of the second Test match in Australian cricket team in the West Indies in 2011–12 the template was not parsed, it just appeared as if it was not a template. I copied the wikitext of the template and pasted it into my user sandbox, still it was not parsed. It appeared like this (I am actually trying to transclude the template here!):
{{Test match
| date = 15–19 April 2012 | team1 = Australia | team2 = West Indies
| score-team1-inns1 = 311 (135 overs) | runs-team1-inns1 = Michael Hussey 73 (207) | wickets-team1-inns1 = Kemar Roach 5/105 (27 overs)
| score-team2-inns1 = 257 (104.4 overs) | runs-team2-inns1 = Shivnarine Chanderpaul 94 (217) | wickets-team2-inns1 = Nathan Lyon 5/68 (29 overs)
| score-team1-inns2 = 160/8 (61.5 overs, decl.) | runs-team1-inns2 = Ricky Ponting 41 (85) | wickets-team1-inns2 = Kemar Roach 5/41 (18 overs)
| score-team2-inns2 = 53/2 (11 overs) | runs-team2-inns2 = Darren Sammy 30* (42) | wickets-team2-inns2 = [[Ben Hilfenhaus 2/22 (4 overs)
| result = Draw | venue = Queen's Park Oval, Port of Spain, Trinidad | umpires = Marais Erasmus (SA), Ian Gould (ENG) | motm = Kemar Roach (West Indies) | report = Scorecard | toss = Australia won the toss and elected to bat. | rain = | notes =
}}
However, in the match box of the first Test in the same article, the template was parsed and appeared properly. Transcluding it here:
7–11 April 2012
Scorecard |
v
|
||
Is the problem with some of the parameters of the match box of the 2nd Test, with the template itself or is it a software problem?
As I've discussed at WikiProject Cricket, a collapsible option would be helpful for when this template is used on some articles. I've managed to get an adapted version, which I don't think loses any of the functionality of the current template, but I would appreciate anyone here checking that. It can be set to be collapsible, but omission of this field means it remains as it currently is, so shouldn't affect any instances of this template. My code for it is at User:97rob/sandbox/collapsibleTest, with examples of it's usage at User:97rob/sandbox/collapsibleTest2. - 97rob ( talk) 17:39, 25 May 2014 (UTC)
Both templates {{
Single-innings cricket match}}
and {{
Two-innings cricket match}}
generate
Missing end tag lint errors whenever the |notes=
parameter is extended to multiple lines. Please see discussion at
Template talk:Single-innings cricket match#Missing end tag lint errors, and maybe it's best to discuss both templates there, so the conversation is all in one place. —
Anomalocaris (
talk) 23:17, 29 July 2018 (UTC)
Cricket Template‑class | ||||||||||||
|
Usage: Designed to be used instead of Template:First Class Matches where an editor feels necessary/prefers working with it. The functionality is similar, but extended, as described below.
Contrary to the name, this template does not have to be used for just Test Matches - it may be used for those that do not necessarily have test status (ie a Tour Match, or a First Class match in domestic cricket). It is simply named as such because 'First Class Matches' would be the ideal name but is currently taken by the old method.
Usage of the template may appear confusing at first but is easily explained. A clean template with all variables available is:
{{Test match | date = | team1 = | team2 = | score-team1-inns1 = | runs-team1-inns1 = | wickets-team1-inns1 = | score-team2-inns1 = | runs-team2-inns1 = | wickets-team2-inns1 = | score-team1-inns2 = | runs-team1-inns2 = | wickets-team1-inns2 = | score-team2-inns2 = | runs-team2-inns2 = | wickets-team2-inns2 = | result = | venue = | umpires = | motm = | report = | rain = | }}
Most are fairly obvious, but some may seem slightly more ambiguous at first:
Advantages of this system:
Drawbacks:
date = [[November 5]] -<br>[[November 8]], [[2007]] |
Although changing the dates is obviously necessary depending on the page. Note: I have plans to possibly change the template to make the column with the date data in it wider so that even long dates can fit on one line. I'll keep this page updated.
Examples:
A match that wasn't completed:
v
|
||
An empty scorecard, in preparation for an upcoming match:
v
|
||
A match that was won without playing all innings:
Would it be possible to make this template show the umpires even when the "result" parameter is empty? It's extremely frustrating to have to fill in that parameter just to make the umpires' names show. – Pee Jay 14:45, 8 July 2009 (UTC)
When filling in the information of the second Test match in Australian cricket team in the West Indies in 2011–12 the template was not parsed, it just appeared as if it was not a template. I copied the wikitext of the template and pasted it into my user sandbox, still it was not parsed. It appeared like this (I am actually trying to transclude the template here!):
{{Test match
| date = 15–19 April 2012 | team1 = Australia | team2 = West Indies
| score-team1-inns1 = 311 (135 overs) | runs-team1-inns1 = Michael Hussey 73 (207) | wickets-team1-inns1 = Kemar Roach 5/105 (27 overs)
| score-team2-inns1 = 257 (104.4 overs) | runs-team2-inns1 = Shivnarine Chanderpaul 94 (217) | wickets-team2-inns1 = Nathan Lyon 5/68 (29 overs)
| score-team1-inns2 = 160/8 (61.5 overs, decl.) | runs-team1-inns2 = Ricky Ponting 41 (85) | wickets-team1-inns2 = Kemar Roach 5/41 (18 overs)
| score-team2-inns2 = 53/2 (11 overs) | runs-team2-inns2 = Darren Sammy 30* (42) | wickets-team2-inns2 = [[Ben Hilfenhaus 2/22 (4 overs)
| result = Draw | venue = Queen's Park Oval, Port of Spain, Trinidad | umpires = Marais Erasmus (SA), Ian Gould (ENG) | motm = Kemar Roach (West Indies) | report = Scorecard | toss = Australia won the toss and elected to bat. | rain = | notes =
}}
However, in the match box of the first Test in the same article, the template was parsed and appeared properly. Transcluding it here:
7–11 April 2012
Scorecard |
v
|
||
Is the problem with some of the parameters of the match box of the 2nd Test, with the template itself or is it a software problem?
As I've discussed at WikiProject Cricket, a collapsible option would be helpful for when this template is used on some articles. I've managed to get an adapted version, which I don't think loses any of the functionality of the current template, but I would appreciate anyone here checking that. It can be set to be collapsible, but omission of this field means it remains as it currently is, so shouldn't affect any instances of this template. My code for it is at User:97rob/sandbox/collapsibleTest, with examples of it's usage at User:97rob/sandbox/collapsibleTest2. - 97rob ( talk) 17:39, 25 May 2014 (UTC)
Both templates {{
Single-innings cricket match}}
and {{
Two-innings cricket match}}
generate
Missing end tag lint errors whenever the |notes=
parameter is extended to multiple lines. Please see discussion at
Template talk:Single-innings cricket match#Missing end tag lint errors, and maybe it's best to discuss both templates there, so the conversation is all in one place. —
Anomalocaris (
talk) 23:17, 29 July 2018 (UTC)