Permanently protected template

Difference between revisions of "Template:Card table anime and manga appearances"

From Yugipedia
Jump to: navigation, search
(slight refinement to replacement code - not seeing any way to achieve this without either using SMW features, or having access to loops)
(go ahead and add this in a fashion allowing for testing)
Line 1: Line 1:
{{IfSemantics
+
{{ #if: {{{test|}}}
 +
| {{ #replace: {{ #replace: {{ #replace: {{ #replace: {{{1}}} | . | [;Yu-Gi-Oh! {{ #if: {{{series|}}} | {{{series}}} }} - {{{type}}}  }} | ; | [ }} | , | ]], }} | : | ]] }}
 +
| {{IfSemantics
 
| {{ #arraymap: {{{1}}} | / | x | [[Yu-Gi-Oh! {{ #if: {{{series|}}} | {{{series}}} }} - {{{type}}} {{padleft:x|3|0}}|{{padleft:x|3|0}}]] }}
 
| {{ #arraymap: {{{1}}} | / | x | [[Yu-Gi-Oh! {{ #if: {{{series|}}} | {{{series}}} }} - {{{type}}} {{padleft:x|3|0}}|{{padleft:x|3|0}}]] }}
 
| {{ #replace: {{ #sub: {{{1}}} | 0 | {{ #pos: {{{1}}} | // }} }} | / | ,  }}
 
| {{ #replace: {{ #sub: {{{1}}} | 0 | {{ #pos: {{{1}}} | // }} }} | / | ,  }}
 
}}{{
 
}}{{
 
#if: {{{extra|}}} | , {{{extra}}}}}{{
 
#if: {{{extra|}}} | , {{{extra}}}}}{{
#if: {{{extra2|}}} | , {{{extra2}}}}}<noinclude>
+
#if: {{{extra2|}}} | , {{{extra2}}}}}
 +
}}<noinclude>
  
 
:'''To get figured out later''' - <code>#arraymap</code> can probably be replaced by a "doubled" input array and some <code>#replace</code>s (still got a little bit to be worked out, and this can doubtless be refined somehow or another):
 
:'''To get figured out later''' - <code>#arraymap</code> can probably be replaced by a "doubled" input array and some <code>#replace</code>s (still got a little bit to be worked out, and this can doubtless be refined somehow or another):

Revision as of 21:12, 10 April 2011

[[Yu-Gi-Oh! - {{{type}}} {{{1}}}|{{{1}}}]]

To get figured out later - #arraymap can probably be replaced by a "doubled" input array and some #replaces (still got a little bit to be worked out, and this can doubtless be refined somehow or another):
{{ #replace: {{ #replace: {{ #replace: {{ #replace: .001, .002, .003: | . | [;Yu-Gi-Oh! {{ #if: {{{series|}}} | {{{series}}} }} - {{{type}}} }} | ; | [ }} | , | ]], }} | : | ]] }}