Difference between revisions of "Template:Infobox GAA club/sandbox"
imported>BrownHairedGirl (.) |
imported>Jonesey95 (sync with live template, rm nowrap for data) |
||
| Line 8: | Line 8: | ||
| headerstyle = background:#BFD7FF; | | headerstyle = background:#BFD7FF; | ||
| labelstyle=white-space: nowrap | | labelstyle=white-space: nowrap | ||
| − | | datastyle= | + | | datastyle= |
| label1 = Founded: | | label1 = Founded: | ||
| − | | data1 = {{#if: {{{founded|}}} | {{{founded|}}} | {{{ | + | | data1 = {{{founded|}}} <!-- |
| + | # ERRROR checking on value of founded ################## | ||
| + | -->{{#if: {{{founded|}}}<!-- | ||
| + | -->| <!-- | ||
| + | # We have a value for founded | ||
| + | -->{{#if: {{#invoke:String|match|{{{founded|}}}|^%d%d%d%d$|ignore_errors=true}} | <!-- valid year --> | {{#if: {{#invoke:String|match|{{{founded|}}}|^%d%d%d0s$|ignore_errors=true}} | <!-- valid decade --> | {{error|Invalid "founded". Must be either a decade (e.g. 1830s) or a year (e.g. 1889). May be left blank if the date is unknown. {{main other|[[Category:Infobox GAA club with invalid value for founded]]}}}} }} }}<!-- | ||
| + | -->|<!-- | ||
| + | # No value for founded | ||
| + | --> {{main other|[[Category:Infobox GAA club with no value for founded]]}}<!-- | ||
| + | -->}}<!-- | ||
| + | # End error checking ################################### --> | ||
| label2 = [[GAA County|County]]: | | label2 = [[GAA County|County]]: | ||
| data2 = {{#if: {{{county|}}} | [[{{{county}}} GAA|{{{county}}}]] }} | | data2 = {{#if: {{{county|}}} | [[{{{county}}} GAA|{{{county}}}]] }} | ||
| Line 107: | Line 117: | ||
</tr>}} | </tr>}} | ||
</table>}} | </table>}} | ||
| − | }}</includeonly>{{# | + | }}</includeonly><!-- |
| − | | | + | -->{{#if: {{{nocat|}}}| <!-- non-null value of nocat, so do nothing --> | <!-- |
| − | | | + | # nocat not set, so do categories |
| + | -->{{main other|<!-- | ||
| + | # Check for the obselete foundedDecade paramater -->{{#if: {{{foundedDecade|}}} | {{main other|[[Category:Infobox GAA club with foundedDecade parameter]]}}}}<!-- | ||
| + | ############################################################################################################### | ||
| + | # Categorise in a subcat of [[Category:Gaelic Athletic Association clubs by year or decade of establishment # | ||
| + | ############################################################################################################### | ||
| + | -->{{#if: {{#invoke:String|match|{{{founded|}}}|^%d%d%d0s$|ignore_errors=true}}<!-- | ||
| + | --> | <!-- | ||
| + | # We have a decade value for founded, so cat by decade of establishment | ||
| + | --> [[Category:Gaelic Athletic Association clubs established in the {{{founded|}}}]]<!-- | ||
| + | --> | <!-- | ||
| + | # founded value is not a decade, so test whether it is a year | ||
| + | -->{{#if: {{#invoke:String|match|{{{founded|}}}|^%d%d%d%d$|ignore_errors=true}}<!-- | ||
| + | -->|<!-- | ||
| + | # We have a year, so categorise by year of establishment | ||
| + | -->[[Category:Gaelic Athletic Association clubs established in {{{founded|}}}]]<!-- | ||
| + | -->|<!-- | ||
| + | # We have neither a valid year of foundation nor a valid decade | ||
| + | # Warnings are error categories are done above in the infiobox, so do nothing here | ||
| + | -->}}<!-- | ||
| + | -->}}<!-- | ||
| + | # Done subcats of [[Category:Gaelic Athletic Association clubs by decade of establishment]] ################### | ||
| + | # | ||
| + | ###################################################################################### | ||
| + | # Categorise in [[Category:YYYY establishments in Ireland/Northern Ireland/England]] # | ||
| + | ###################################################################################### | ||
| + | -->{{#if: {{{county|}}} | {{#if: {{#invoke:String|match|{{{founded|}}}|^%d%d%d%ds?$|ignore_errors=true}} | | ||
{{#switch: {{{county|}}} | {{#switch: {{{county|}}} | ||
| − | | | + | |London = [[Category:{{{founded|}}} establishments in England]] <!-- |
| − | + | # Northern Ireland | |
| − | }}<noinclude>{{documentation}}</noinclude> | + | --> |
| + | |Antrim|Armagh|Down|Fermanagh|Londonderry|Derry|Tyrone=<!-- | ||
| + | -->{{#if: {{#invoke:String|match|{{{founded|}}}|^%d%d%d%d$|ignore_errors=true}} | <!-- | ||
| + | # it's a valid year, so categorise it in Northern Ireland if >= 1921, else in Ireland | ||
| + | -->{{#ifexpr: {{{founded|}}} >= 1921 | [[Category:{{{founded|}}} establishments in Northern Ireland]] | [[Category:{{{founded|}}} establishments in Ireland]] }} |<!-- | ||
| + | # not a valid year, so see if it is a valid decade | ||
| + | -->{{#if: {{#invoke:String|match|{{{founded|}}}|^%d%d%d0s$|ignore_errors=true}} | <!-- | ||
| + | # it's a valid decade, so test if >= 1921 (Northern Ireland established in 1921) | ||
| + | -->{{#ifexpr: {{#invoke:String|match|{{{founded|}}}|^%d%d%d|ignore_errors=true}} >= 192 | <!-- | ||
| + | # post-1921, so categorise it in Northern Ireland | ||
| + | -->[[Category:{{{founded|}}} establishments in Northern Ireland]]| <!-- | ||
| + | # pre-1921, so categorise it in Ireland | ||
| + | -->[[Category:{{{founded|}}} establishments in Ireland]]| <!-- | ||
| + | -->}}<!-- | ||
| + | -->}}<!-- | ||
| + | -->}}<!-- | ||
| + | # Republic of Ireland | ||
| + | --> | ||
| + | |Carlow|Cavan|Clare|Cork|Donegal|Dublin|Galway|Kerry|Kildare|Kilkenny|Laois|Leitrim|Limerick|Longford|Louth|Mayo|Meath|Monaghan|Offaly|Roscommon|Sligo|Tipperary|Waterford|Westmeath|Wexford|Wicklow=<!-- | ||
| + | -->{{#ifexpr: {{#invoke:String|find|source=1987|target=^%d%d%d%d$|start=1|plain= false}} + {{#invoke:String|find|source=1987|target=^%d%d%d0s$|start=1|plain= false}} | ||
| + | =1 | <!-- | ||
| + | # it's a valid year or decade, so categorise it | ||
| + | -->[[Category:{{{founded|}}} establishments in Ireland]]<!-- | ||
| + | -->| <!-- | ||
| + | -->}} | ||
| + | }}<!-- End switch | ||
| + | -->}}}}<!-- End pre-switch tests | ||
| + | # Done [[Category:YYYY establishments in Ireland/Northern Ireland/England]] | ||
| + | -->}}<!-- End main other | ||
| + | -->}}<!-- End nocat | ||
| + | --><noinclude>{{documentation}}</noinclude> | ||
Latest revision as of 11:54, 26 November 2018
| 50px | This is the template sandbox page for Template:Infobox GAA club (diff). See also the companion subpage for test cases. |
Usage
{{Infobox GAA club
| club gaa =
| irish =
| crest =
| founded =
| province =
| county =
| nickname =
| colours =
| grounds =
| coordinates =
| f1 =
| f2 =
| f3 =
| h1 =
| h2 =
| h3 =
| c1 =
| c2 =
| c3 =
| l1 =
| l2 =
| l3 =
| pattern_la =
| pattern_b =
| pattern_ra =
| pattern_sh =
| pattern_so =
| leftarm =
| body =
| rightarm =
| shorts =
| socks =
|}}
Examples
| Cill Mochuda Na Croácaigh | |||||||||||||
| Script error: No such module "If empty". | |||||||||||||
| Founded: | 1959 | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| County: | Dublin | ||||||||||||
| Nickname: | Crokes | ||||||||||||
| Colours: | Purple and Yellow | ||||||||||||
| Grounds: | Páirc de Burca | ||||||||||||
| Coordinates: | Lua error: callParserFunction: function "#coordinates" was not found. | ||||||||||||
| Playing kits | |||||||||||||
| Senior Club Championships | |||||||||||||
| |||||||||||||
{{Infobox GAA club
| club gaa = Kilmacud Crokes GAA
| irish = Cill Mochuda Na Croácaigh
| crest =
| founded = 1959
| province = Leinster
| county = Dublin
| nickname = ''Crokes''
| colours = Purple/Yellow '''or''' Gold
| grounds = Páirc de Burca
| coordinates = {{coord|53|17|14.50|N|6|11|58.93|W|display=inline|region:IE_type:landmark}}
| pattern_la =
| pattern_b = _thinyellowsides
| pattern_ra =
| leftarm = 4B0082
| body = 4B0082
| rightarm = 4B0082
| shorts = EEEEEE
| socks = 4B0082
| f1 = 1
| f2 = 3
| f3 = 5
| h1 = 0
| h2 = 34
| h3 = 3
}}
| Cill Mochuda Na Croácaigh | ||||||||||||||
| Script error: No such module "If empty". | ||||||||||||||
| Founded: | 1959 | |||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| County: | Dublin | |||||||||||||
| Nickname: | Crokes | |||||||||||||
| Colours: | Purple and Yellow | |||||||||||||
| Grounds: | Páirc de Burca | |||||||||||||
| Coordinates: | Lua error: callParserFunction: function "#coordinates" was not found. | |||||||||||||
| ||||||||||||||
| Senior Club Championships | ||||||||||||||
| ||||||||||||||
{{Infobox GAA club
| club gaa = Kilmacud Crokes GAA
| irish = Cill Mochuda Na Croácaigh
| crest =
| founded = 1959
| province = Leinster
| county = Dublin
| nickname = ''Crokes''
| colours = Purple/Yellow '''or''' Gold
| grounds = Páirc de Burca
| coordinates = {{coord|53|17|14.50|N|6|11|58.93|W|display=it|region:IE_type:landmark}}
| camogie_pattern_la =
| camogie_pattern_b = _thinyellowsides
| camogie_pattern_ra =
| camogie_leftarm = 4B0082
| camogie_body = 4B0082
| camogie_rightarm = 4B0082
| camogie_skirt = EEEEEE
| camogie_socks = 4B0082
| f1 = 1
| f2 = 3
| f3 = 5
| h1 = 0
| h2 = 34
| h3 = 3
}}
Parameters
- club gaa
- Name of club in English
- irish
- Name of club in Irish
- crest
- Image of the club's crest
- founded
- Year the club was founded :If the precise year is unknown, enter a decade (e.g. 1940s) or leave blank.
Invalid entries will generate an error message - province
- Province the club is in.
- county
- County the club is in
- nickname
- Club's nickname.
- colours
- Colours of the club
- grounds
- Name of the club's grounds.
- coordinates
- Geographic coordinates of the club's main facilities. Use {{Template:coord}}.
- f1
- No of All-Ireland senior club football championships won
- f2
- No of Provincial senior club football championships won
- f3
- No of County senior club football championships won
- h1
- No of All Ireland senior club Hurling championships won
- h2
- No of Provincial senior club Hurling championships won
- h3
- No of County senior club Hurling championships won
- l1
- No of All Ireland Ladies' senior club football championships won
- l2
- No of Provincial Ladies' senior club football championships won
- l3
- No of County Ladies' senior club football championships won
- c1
- No of All Ireland senior club Camogie championships won
- c2
- No of Provincial senior club Camogie championships won
- c3
- No ofCounty senior club Camogie championships won
- pattern_la
- Pattern of left arm of kit - See Template:Football kit/pattern list for options
- pattern_b
- Pattern of body of kit - See Template:Football kit/pattern list for options
- pattern_ra
- Pattern of right arm of kit - See Template:Football kit/pattern list for options
- leftarm
- Colour of left arm of kit - in RRGGBB format
- body
- Colour of body of kit - in RRGGBB format
- rightarm
- Colour of right arm of kit - in RRGGBB format
- shorts
- Colour of shorts - in RRGGBB format
- socks
- Colour of socks - in RRGGBB format
- camogie_pattern_la
- Pattern of left arm of kit - See Template:Football kit/pattern list for options
- camogie_pattern_b
- Pattern of body of kit - See Template:Football kit/pattern list for options
- camogie_pattern_ra
- Pattern of right arm of kit - See Template:Football kit/pattern list for options
- camogie_leftarm
- Colour of left arm of kit - in RRGGBB format
- camogie_body
- Colour of body of kit - in RRGGBB format
- camogie_rightarm
- Colour of right arm of kit - in RRGGBB format
- camogie_skirt
- Colour of shorts - in RRGGBB format
- camogie_socks
- Colour of socks - in RRGGBB format
Tracking categories
- Category:Infobox GAA club with no value for founded (Template:PAGESINCATEGORY pages)
- Articles using {{Infobox GAA club}} without any value for the "founded" parameter
- Category:Infobox GAA club with invalid value for founded (Template:PAGESINCATEGORY pages)
- Articles using {{Infobox GAA club}} with an invalid value for the "founded" parameter (e.g. (June 1925). It must be either a decade (e.g. 1830s) or a year (e.g. 1889)
TemplateData
TemplateData documentation used by VisualEditor and other tools
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
See the monthly parameter usage report for this template.
TemplateData for Infobox GAA club Infobox for Gaelic football or hurling clubs.
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| The above documentation is transcluded from Template:Infobox GAA club/doc. (edit | history) Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages. Please add categories to the /doc subpage. Subpages of this template. |