Changes

Jump to: navigation, search

User:Becasita/SubPages/Templates/CardImage

3,020 bytes added, 7 years ago
Trying it this way.
{{ <includeonly>subst:</includeonly>#vardefine: $FLAG | 0 }}{{OCG-TCG card image| name = {{<includeonly>subst:</includeonly>#if: {1{{name|}}}| set = {{{name}}} | {{<includeonly>subst:</includeonly>#explode:{{<includeonly>subst:</includeonly>#explode: {{<includeonly>subst:</includeonly>PAGENAME}}|.|0}}|-|10 }} }}| set = {{<includeonly>subst:</includeonly>#if:{{{postfix|}}}|-{{{post}}}|}}| region = {{<<includeonly>subst:</includeonly>#vardefineechosub:REGION|{{<includeonly>subst:</includeonly>#explode:{{<includeonly>subst:</includeonly>#explode: {{<includeonly>subst:</includeonly>PAGENAME}}|.PAGENAME}} | - |0}} |-|2}}}}{{<includeonly>subst:</includeonly>#switchlen: {{<includeonly>subst:</includeonly>#explode:{{<includeonly>subst:</includeonly>#explodereplace: {{<includeonly>subst:</includeonly>PAGENAME}}|.|0}}|-|-1}} | OP = #replace:{{<includeonly>subst:</includeonly>#switchreplace: {{<includeonly>subst:</includeonly>#varreplace:{{ <includeonly>subst:</includeonly>#replace:REGION}} | JP | TC = {{<includeonly>subst:</includeonly>!}} release #replace:{{<includeonly>subst:</includeonly>=}} #replace:{{<includeonly>subst:</includeonly>#explodereplace:{{<includeonly>subst:</includeonly>#explodereplace: {{<includeonly>subst:</includeonly>PAGENAME}}|.|0}}|-|3}}#replace:{{<includeonly>subst:</includeonly>))}} | #default = replace: {{{<includeonly>subst:</includeonly>!name|}}} edition {{<includeonly>subst|:</includeonly>=}} {{<includeonly>subst:</includeonly>|-}}|'}}|,}}|}}|.}}|?}}|#explode:}}|"}}|/}}|\}} | ( }} }}}}{{<includeonly>subst:</includeonly>#explodevardefine: $FLAG | 1 }}| {{<includeonly>subst:</includeonly>PAGENAME}}|.|0}}|-|3}}#explode: {{<includeonly>subst:</includeonly>!}} release #explode: {{<includeonly>subst:</includeonly>=PAGENAME }} | . | 0 }} | - | 1 }} }} {{<includeonly>subst:</includeonly>#explode:{{<includeonly>subst:</includeonly>#explodeif: {{<includeonly>subst:</includeonly>PAGENAME{post|}}}|.|0-{{{post}}}|-|-1}}| region = {{<includeonly>subst:</includeonly>))}} }} #vardefineecho:$REGION | CT | GC = {{<includeonly>subst:</includeonly>#switchexplode: {{<includeonly>subst:</includeonly>#varexplode:REGION}} {{ <includeonly>subst:</includeonly>PAGENAME }} | . | JP 0 }} | - | TC = {{<includeonly>subst:</includeonly>!}} rarity #expr: 2 - {{<includeonly>subst:</includeonly>=#var: $FLAG }} }} }} }} {{ <includeonly>subst:</includeonly>#switch: {{<includeonly>subst:</includeonly>#explode:{{<includeonly>subst:</includeonly>#explode: {{<includeonly>subst:</includeonly>PAGENAME}}|.|0}}|-|3}}{{<includeonly>subst:</includeonly>!}} release {{<includeonly>subst#vardefineecho:</includeonly>=}} $LAST | {{<includeonly>subst:</includeonly>#explodeif:{{<includeonly>{alt|}}} | -2 | -1 }} }} }} | OP = {{ <includeonly>subst:</includeonly>#explodeswitch: {{<includeonly>subst:</includeonly>PAGENAME}}|.|0#var:$REGION }} |-JP |-1}}JA | TC = {{<includeonly>subst:</includeonly>))! }} | #default = release {{<includeonly>subst:</includeonly>!}} rarity {{<includeonly>subst:</includeonly>== }} {{<includeonly>subst:</includeonly>#explode:{{<includeonly>subst:</includeonly>#explode: {{<includeonly>subst:</includeonly>PAGENAME}}|.|0}}|-|3}}{{<includeonly>subst:</includeonly>!}} edition #expr: 3 - {{<includeonly>subst:</includeonly>=#var: $FLAG }} }} }} | #default = {{<includeonly>subst:</includeonly>#explode:! }} edition {{<includeonly>subst:</includeonly>#explode: = }} {{<includeonly>subst:</includeonly>PAGENAME}}|.|0}}|-|4}}#explode: {{<includeonly>subst:</includeonly>!}} release #explode: {{<includeonly>subst:</includeonly>=PAGENAME }} {{<| . | 0 }} | - | {{ <includeonly>subst:</includeonly>#explodeexpr: 3 - {{<includeonly>subst:</includeonly>#explodevar: $FLAG }} }} }}{{<includeonly>subst:</includeonly>PAGENAME! }}|.|0}}|-|-1}}{{release {{ <includeonly>subst:</includeonly>))= }} }} | #default = {{<includeonly>subst:</includeonly>!}} rarity #explode: {{<includeonly>subst:</includeonly>=}} #explode: {{<includeonly>subst:</includeonly>#explode:PAGENAME }} | . | 0 }} | - | {{<includeonly>subst:</includeonly>#explodevar: {{<includeonly>subst:</includeonly>PAGENAME$LAST }} }}|.|0 }} |-RP |3}}CT | GC = {{<includeonly>subst:</includeonly>#switch: {{<includeonly>subst:</includeonly>#var:$REGION}} | JP | JA | TC = {{<includeonly>subst:</includeonly>#ifeq! }} rarity {{ <includeonly>subst:</includeonly>= }} {{<includeonly>subst:</includeonly>#explode:{{<includeonly>subst:</includeonly>#explode: {{<includeonly>subst:</includeonly>PAGENAME}}|.|0}}|-|-1}} | DT | {{<includeonly>subst:</includeonly>!}} edition = #expr: 3 - {{<includeonly>subst:</includeonly>#explodevar:$FLAG }} }} }}{{<includeonly>subst:</includeonly>#explode: ! }} release {{<includeonly>subst:</includeonly>PAGENAME= }}|.|0}}|-|-1}}{{{<includeonly>subst:</includeonly>))}} | #explode: {{<includeonly>subst:</includeonly>))}}}} | #default = explode: {{<includeonly>subst:</includeonly>!PAGENAME }} | . | 0 }} edition = | - | {{<includeonly>subst:</includeonly>#explodevar:$LAST }} }} | #default = {{<includeonly>subst:</includeonly>#! }} rarity {{ <includeonly>subst:</includeonly>= }} {{ <includeonly>subst:</includeonly>#explode: {{<includeonly>subst>subst:</includeonly>#explode: {{ <includeonly>subst:</includeonly>PAGENAME }} | . | 0 }} | - | {{ <includeonly>subst:</includeonly>#expr: 3 - {{ <includeonly>subst:</includeonly>#var: $FLAG }} }} }}{{ <includeonly>subst:</includeonly>! }} edition {{ <includeonly>subst:</includeonly>= }} {{ <includeonly>subst:</includeonly>#explode: {{ <includeonly>subst:</includeonly>#explode: {{ <includeonly>subst:</includeonly>PAGENAME }} | . | 0 }} | - | {{ <includeonly>subst:</includeonly>#expr: 4 - {{ <includeonly>subst:</includeonly>#var: $FLAG }} }} }}{{ <includeonly>subst:</includeonly>! }} release {{ <includeonly>subst:</includeonly>= }} {{ <includeonly>subst:</includeonly>#explode: {{ <includeonly>subst:</includeonly>#explode: {{ <includeonly>subst:</includeonly>PAGENAME }} | . | 0 }} | - | {{ <includeonly>subst:</includeonly>#var: $LAST }} }} }} | #default = {{ <includeonly>subst:</includeonly>! }} rarity {{ <includeonly>subst:</includeonly>= }} {{ <includeonly>subst:</includeonly>#explode: {{ <includeonly>subst:</includeonly>#explode: {{ <includeonly>subst:</includeonly>PAGENAME }} | . | 0 }} | - | {{ <includeonly>subst:</includeonly>#expr: 3 - {{ <includeonly>subst:</includeonly>#var: $FLAG }} }} }}{{ <includeonly>subst:</includeonly>#switch: {{ <includeonly>subst:</includeonly>#var: $REGION }} | JP | JA | TC = {{ <includeonly>subst:</includeonly>#ifeq: {{ <includeonly>subst:</includeonly>#explode: {{ <includeonly>subst:</includeonly>#explode: {{ <includeonly>subst:</includeonly>PAGENAME }} | . | 0 }} | - | {{ <includeonly>subst:</includeonly>#var: $LAST }} }} | DT | {{ <includeonly>subst:</includeonly>! }} edition = {{ <includeonly>subst:</includeonly>#explode: {{ <includeonly>subst:</includeonly>#explode: {{ <includeonly>subst:</includeonly>PAGENAME }} | . | 0 }} | - | {{ <includeonly>subst:</includeonly>#var: $LAST }} }} }} | #default = {{ <includeonly>subst:</includeonly>! }} edition = {{ <includeonly>subst:</includeonly>#explode: {{ <includeonly>subst:</includeonly>#explode: {{ <includeonly>subst:</includeonly>PAGENAME }} | . | 0 }} | - | {{ <includeonly>subst:</includeonly>#expr: 4 - {{ <includeonly>subst:</includeonly>#var:</includeonly>PAGENAME$FLAG }}|.|0}}|-|4}}{{<includeonly>subst:</includeonly>))}}
}}
}}{{ <includeonly>subst:</includeonly>#if: {{{alt|}}} | {{ <includeonly>subst:</includeonly>! }} alt = {{ <includeonly>subst:</includeonly>#explode: {{ <includeonly>subst:</includeonly>#explode: {{ <includeonly>subst:</includeonly>PAGENAME }} | . | 0 }} | - | -1 }}{{ <includeonly>subst:</includeonly>)) }} | {{ <includeonly>subst:</includeonly>)) }} }}<noinclude>
<br style = "clear:both;" />
__NOTOC__
==Known ProblemsDescription==* Doesn'Based on the {{t work |OCG-TCG card image}} template.<br />Made to help with card image upload. It fills the parameters required automatically. Works with [[TCG]] and [[OCG]] cards (including [[Official Proxy|Proxies]] (OP), [[Giant Card]]s (GC), [[Case Topper]]s (CT), [[Replica]]s (RP) and [[Duel Terminal]] (DT) cards needing ). <span style = "color:Red;">'''Attention:'''</span> The output depends on the name of the file! So it's advisable to apply it only on files named accordingly to the [[Yu-Gi-Oh!:Image Policy]]!<br />If using on pics named accordingly to the old Yu-Gi-Oh!:Image Policy, the <code>altfix</code> parameter; (I know how to solve this, just need time.)* Badly designedshould be used.
==Usage==
I'll finish this when I have the time.<pre>{{subst::User:Becasita/SubPages/Templates/CardImage| name = | fix = | post = | alt = }}</pre>
; <code>name</code>: The English name of the card. If a card only as one word as its name and that word doesn't contain non-alphabetical characters (e.g., <code>!</code>, <code>#</code>, etc.), this parameter could be left blank.; <code>fix</code>: In case the image name is obsolete (named accordingly to the old Yu-Gi-Oh!:Image Policy), this parameter should be filled with <code>1</code>. If this parameter is used, the <code>name</code> must be used.; <code>post</code>: The postfix of a set. Should be left blank or removed if the set does not need a postfix.; <code>alt</code>: To be filled with <code>1</code> if the card requires the <code>alt</code> parameter. Should be left at blank or removed otherwise. ===Example===For a card like [[:File:Number39Utopia-YS11-EN-UE-OP.png]], it should be:<div style pre>{{subst::User:Becasita/SubPages/Templates/CardImage| name = "colorNumber 39:Red;">'''Do not use this yet!'''Utopia| fix = | post = | alt = }}</divpre>----For a card like [[:File:TempestMagician-SOVR-FR-SR-LE.png]], it should be:
<pre>
{{subst::User:Becasita/SubPages/CardImageUploadTemplateTemplates/CardImage|name = Tempest Magician| fix = | post = SE| alt = }}</pre>----For a card like [[:File:GraphaDragonLordofDarkWorld-DL18-SP-R-UE-Purple.png]], it should be:<Card pre>{{subst::User:Becasita/SubPages/Templates/CardImage| name>= Grapha, Dragon Lord of Dark World| fix = | post = | alt = 1}}
</pre>
==Alternative (draft)Draft==
<pre>
{{OCG-TCG card image| name = {{{1}}}| set = {{subst:#explode:{{subst:#explode: {{subst:PAGENAME}}|.|0}}|-|1}}{{subst:#if:{{{postwatermark|}}}|-{{{post}}}|}}| region = {{subst:#vardefineecho:REGION|{{subst:#explode:{{subst:#explode: {{subst:PAGENAME}}|.|0}}|-|2}}Watermark}}| {{subst:#ifeq: {{subst:#explode:{{subst:#explode: {{subst:PAGENAME}}|.|0}}|-|-1}}| OP | {{subst:#switch: {{subst:#var:REGION}} | JP | TC = release {{subst:=}} {{subst:#explode:{{subst:#explode: {{subst:PAGENAME}}|.|0}}|-|3}} | #default = edition {{subst:=}} {{subst:#explode:{{subst:#explode: {{subst:PAGENAME}}|.|0}}|-|3}}}} | rarity = {{substif:#explode:{{subst:#explode: {{subst:PAGENAME}}poor quality|.|0}}|-|3}}}}{{subst:#switch: {{subst:#var:REGION}} | JP | TC = {{subst:#switch:{{subst:#explode:{{subst:#explode: {{subst:PAGENAME}}|.|0}}|-|-1Poor quality}} | DT = {{subst:!}} edition = {{subst:#explode:{{subst:#explode: {{subst:PAGENAME}}|.|0}}|-|-1}}{{subst:))}} | GC | CT = {{subst:!}} release = {{subst:#explode:{{subst:#explode: {{subst:PAGENAME}}|.|0}}|-|-1}}{{subst:))}} | #default = {{subst:))}} }} | #default = {{subst:#switch: {{subst:#explode:{{subst:#explode: {{subst:PAGENAME}}|.|0}}|-|-1}} | OP = {{subst:!}} release = {{subst:#explode:{{subst:#explode: {{subst:PAGENAME}}|.|0}}|-|4}} | GC | CT = {{subst:!}} edition = {{subst:#explode:{{subst:#explode: {{subst:PAGENAME}}|.|0}}|-|4}}{{subst:!}} release = {{subst:#explode:{{subst:#explode: {{subst:PAGENAME}}|.|0}}|-|-1}} | #default = {{subst:!}} edition {{subst:=}} {{subst:#explode:{{subst:#explode: {{subst:PAGENAME}}|.|0}}|-|4}} }}{{subst:))}}}}
</pre>
</noinclude>
Bureaucrats, System administrator, Administrators
57,478
edits

Navigation menu