Jump to content

Template:Category series navigation: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
Migrate to Module:Navseasoncats/navhyphen, from sandbox
Full(ish) Lua implementation, from sandbox & testcases
Tag: Replaced
Line 1: Line 1:
{{#invoke:Navseasoncats|navseasoncats}}<noinclude>{{Documentation}}</noinclude>
<!-- Don't forget to add/remove "/sandbox" to/from below, depending on which way you're copying! --><!--

{{Navseasoncats/var pagename}} is a testing variable with a test category name
{{Navseasoncats/var season}} returns the word containing the year 2015-16 or 2015
{{Navseasoncats/var firsthalf}} returns the string before the year-word
{{Navseasoncats/var lasthalf}} returns the string after the year-word

--><includeonly>{{#ifexpr: {{str len|{{#invoke:Navseasoncats/var season|var_season|{{{testcase|}}}}}}} > 5 and {{str len|{{#invoke:Navseasoncats/var season|var_season|{{{testcase|}}}}}}} < 10 and ({{#invoke:String|find|{{#invoke:Navseasoncats/var season|var_season|{{{testcase|}}}}}|–}} > 0 or {{#invoke:String|find|{{#invoke:Navseasoncats/var season|var_season|{{{testcase|}}}}}|-}} > 0)<!--
-->|{{#invoke:Navseasoncats/navhyphen|navhyphen|{{str left|{{#invoke:Navseasoncats/var season|var_season|{{{testcase|}}}}}|4}}|{{str mid|{{#invoke:Navseasoncats/var season|var_season|{{{testcase|}}}}}|5|1}}|{{str rightc|{{#invoke:Navseasoncats/var season|var_season|{{{testcase|}}}}}|2}}|{{#invoke:Navseasoncats/var firsthalf|var_firsthalf|{{{testcase|}}}}}|{{#invoke:Navseasoncats/var lasthalf|var_lasthalf|{{{testcase|}}}}}}}<!--
-->|{{#ifexpr: {{str len|{{#invoke:Navseasoncats/var season|var_season|{{{testcase|}}}}}}} = 4<!--
-->|{{#invoke:Navseasoncats/navyear|navyear|{{#invoke:Navseasoncats/var firsthalf|var_firsthalf|{{{testcase|}}}}}|{{str left|{{#invoke:Navseasoncats/var season|var_season|{{{testcase|}}}}}|4}}|{{#invoke:Navseasoncats/var lasthalf|var_lasthalf|{{{testcase|}}}}}|{{{min|}}}|{{{max|}}}}}<!--
-->|{{#ifexpr: ({{str len|{{#invoke:Navseasoncats/var season|var_season|{{{testcase|}}}}}}} = 5) and {{#ifeq: {{str mid|{{#invoke:Navseasoncats/var season|var_season|{{{testcase|}}}}}|4|2}} | 0s | 1 | 0}} = 1<!--
-->|{{#invoke:Navseasoncats/navdecade|navdecade|{{#invoke:Navseasoncats/var firsthalf|var_firsthalf|{{{testcase|}}}}}|{{str left|{{#invoke:Navseasoncats/var season|var_season|{{{testcase|}}}}}|4}}|{{#invoke:Navseasoncats/var lasthalf|var_lasthalf|{{{testcase|}}}}}|{{str left|{{CURRENTYEAR}}|3}}0}}<!--
-->|<nowiki>***Navseasoncats failed to generate navbox***</nowiki>[[Category:Navseasoncats failed to generate navbox]]<!--
-->}}<!--
-->}}<!--
-->}}</includeonly><noinclude>{{Documentation}}</noinclude>

Revision as of 18:00, 12 April 2019

Script error: No such module "Navseasoncats".