Anonymous

Template:CatStrip: Difference between revisions

From Jenny Everywhere Wiki
I will admit I don't fully know where I was going with this template, though I see now it was based on {{ArticleStrip}}. Anyhow, this simplification should still produce the same results.
(I will admit I don't fully know where I was going with this template, though I see now it was based on {{ArticleStrip}}. Anyhow, this simplification should still produce the same results.)
Line 1: Line 1:
<includeonly>{{#ifeq: {{#pos:{{urlencode:{{{1}}}}}|Video+}} | 0 | {{#sub:{{{1}}}|6|{{#expr:{{#len:{{{1}}}}} - 6}}}} | {{#ifeq: {{#pos:{{urlencode:{{lc:{{{1}}}}}}}|TV+}} | 0 | {{#sub:{{{1}}}|3|{{#expr:{{#len:{{{1}}}}} - 3}}}} | {{#ifeq: {{#pos:{{urlencode:{{lc:{{{1}}}}}}}|Television+}} | 0 | {{#sub:{{{1}}}|11|{{#expr:{{#len:{{{1}}}}} - 11}}}} | {{#ifeq: {{#pos:{{urlencode:{{lc:{{{1}}}}}}}|Film+}} | 0 | {{#sub:{{{1}}}|5|{{#expr:{{#len:{{{1}}}}} - 5}}}} | {{#ifeq: {{#pos:{{urlencode:{{lc:{{{1}}}}}}}|Audio+}} | 0 | {{#sub:{{{1}}}|6|{{#expr:{{#len:{{{1}}}}} - 6}}}} | {{#ifeq: {{#pos:{{urlencode:{{lc:{{{1}}}}}}}|Comic+}} | 0 | {{#sub:{{{1}}}|6|{{#expr:{{#len:{{{1}}}}} - 6}}}} | {{#ifeq: {{#pos:{{urlencode:{{lc:{{{1}}}}}}}|Prose+}} | 0 | {{#sub:{{{1}}}|6|{{#expr:{{#len:{{{1}}}}} - 6}}}} | {{#ifeq: {{#pos:{{urlencode:{{lc:{{{1}}}}}}}|Stage+}} | 0 | {{#sub:{{{1}}}|6|{{#expr:{{#len:{{{1}}}}} - 6}}}} | {{#ifeq: {{#pos:{{urlencode:{{{1}}}}}|Video_game+}} | 0 | {{#sub:{{{1}}}|11|{{#expr:{{#len:{{{1}}}}} - 11}}}} | {{{1}}} }} }} }} }} }} }} }} }} }}</includeonly><noinclude>[[Category:coding utility templates]]{{documentation}}{{lock}}</noinclude>
<includeonly>{{#switch:{{#explode:{{{1|{{PAGENAME}}}}}||0}}
|Audio|Comic|Prose|Stage={{#sub:{{{1|{{PAGENAME}}}}}|6|{{#expr:{{#len:{{{1|{{PAGENAME}}}}}}} - 6}}}}
|TV={{#sub:{{{1|{{PAGENAME}}}}}|3|{{#expr:{{#len:{{{1|{{PAGENAME}}}}}}} - 3}}}}
|Television={{#sub:{{{1}}}|11|{{#expr:{{#len:{{{1}}}}} - 11}}}}
|Video={{#ifeq:{{#explode:{{{1|{{PAGENAME}}}}}||1}}|game|{{#sub:{{{1|{{PAGENAME}}}}}|11|{{#expr:{{#len:{{{1|{{PAGENAME}}}}}}} - 11}}}}|{{#sub:{{{1|{{PAGENAME}}}}}|6|{{#expr:{{#len:{{{1|{{PAGENAME}}}}}}} - 6}}}}}}
|#default={{PAGENAME}}<!--{{ArticleStrip|{{{1|{{PAGENAME}}}}}}}-->
}}</includeonly><noinclude>[[Category:coding utility templates]]{{documentation}}{{lock}}</noinclude>