Changes

Jump to navigation Jump to search
Imported page
<noinclude>{{Distinguish|Template:Year by country category}}</noinclude><includeonly><!--
# The first step is to check whether this uses the old-style year parameters, of the form {{Year in country category|1|9|7|3|Ruritania|Europe|Asia|prefix}}
# The new form is {{Year in country category|Ruritania|Europe|Asia|prefix}}
# If it is then all parameters should be passed to the old template ... if not, then use the new core
#
# We check this by concatenating the first 4 parameters, and then checking that they are all digits.
-->{{#ifeq: {{#invoke:String|match|s={{{1}}}{{{2|}}}{{{3|}}}{{{4|}}}|pattern=^%d%d%d%d?$|start=1|match=1|plain=false|nomatch=%%nomatch%%}}|%%nomatch%%<!--
-->|<!--
# NOT using the old-style parameters, so proceed



# Track use of an unnamed 4th and 5th parameters, and new prefix parameter.
# Some of these can later be moved to inner core

-->{{Category other|<!--
# Note:there are lots of tracking categories here. Most of them are temporary,
# while User:BrownHairedGirl is developing the template

-->{{#if: {{{4|}}}|[[Category:Template Year in country category with unnamed 4th parameter]]}}<!--
-->{{#if: {{{5|}}}|[[Category:Template Year in country category with unnamed 5th parameter]]}}<!--
-->{{#if: {{{prefix|}}}|[[Category:Template Year in country category with prefix parameter]]}}<!--

-->{{#if: {{CountryPrefixThe|{{{1|}}}|onlythe=yes}}<!--
-->|<!--
# a prefix is available
-->[[Category:Template Year in country category with prefix available though CountryPrefixThe]]<!--
# Now see if it is the same prefix as is supplied by parameters
-->{{#ifeq: {{CountryPrefixThe|{{{1|}}}|onlythe=yes}} | {{{prefix|{{{4|}}}}}}<!--
-->|[[Category:Template Year in country category with prefix parameter matching that in CountryPrefixThe]]<!--
-->}}<!--
-->}}<!--

-->{{#if: {{{prefix|{{{4|}}}}}}<!--
-->|<!--
# a prefix is available
-->[[Category:Template Year in country category with prefix available though CountryPrefixThe]]<!--
# Now see if it is the same prefix as is supplied by parameters
-->{{#ifeq: {{CountryPrefixThe|{{{1|}}}|onlythe=yes}} | {{{prefix|{{{4|}}}}}}<!--
-->|<!-- do nothing if true. This test is to track the no matches
-->|[[Category:Template Year in country category with prefix parameter NOT matching that in CountryPrefixThe]]<!--
-->}}<!--
-->}}<!--

-->}}<!-- # End of Category other


-->{{Year in country category/outer core<!--
-->|yearparam={{{year|}}} <!-- pass it through to the outer core, which decides whether to use it
-->|yearparamcheck=<!--
-->{{#ifeq: {{#invoke:String|find|{{{year|}}}|^%d%d%d%d?$|1|false}}|0<!--
-->|FAIL<!--
-->|OK<!--
-->}}<!--
-->|calcyear={{#invoke:String|replace|{{PAGENAME}}|^(%d%d%d%d?).+$|%1|1|false}}<!--
-->|country = {{{1}}}<!--
-->|countrydab = {{{countrydab|}}}<!--
-->|prefix = {{{prefix|{{{4|{{CountryPrefixThe|{{{1|}}}|onlythe=yes}}}}}}}}<!--
-->|continent1 = {{{2|}}}<!--
-->|continent2 = {{{3|}}}<!--
-->|newname= {{{newname|}}}<!--
-->|newnamestart={{{newnamestart|}}}<!--
-->|newnamestartcheck=<!--
-->{{#ifeq: {{#invoke:String|find|{{{newnamestart|}}}|^%d%d%d%d?$|1|false}}|0<!--
-->|FAIL<!--
-->|OK<!--
-->}}<!--
-->|nocat={{yesno-no|{{{nocat|}}}}}<!--
-->|min={{{min|}}}<!--
-->|nocountrycentury={{yesno-no|{{{nocountrycentury|}}}}}<!--
-->}}<!--
-->|<!--
# FOUND the old-style parameters
# Treat this as an error
-->{{Error|ERROR!<br />[[Template:Year in country category]] no longer supports year parameters. The year is derived automatically from the page title.}}<!--
-->[[Category:Errors reported by other category header templates]]<!--
-->}}</includeonly><!--
# Note {{CatAutoTOC}} needs to be available whether or not this template page has been transcluded
-->{{CatAutoTOC}}<noinclude>
{{Documentation}}<!--
Add categories and interwikis to the /doc subpage, please, not here!
--></noinclude>
Bureaucrats, Check users, editor, emailconfirmed, Interface administrators, reviewer, smwadministrator, smwcurator, smweditor, Suppressors, Administrators
12,798

edits

Navigation menu