Editing User:Becasita/SubPages/Templates/CardImage

Jump to: navigation, search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

This page is not enabled for semantic in-text annotations due to namespace restrictions. Details about how to enable the namespace can be found on the configuration help page.

Latest revision Your text
Line 1: Line 1:
{{ <includeonly>subst:</includeonly>#vardefine: $FLAG | 0 }}{{OCG-TCG card image
+
{{OCG-TCG card image
| name    = {{ <includeonly>subst:</includeonly>#if: {{{name|}}} | {{{name}}} | {{ <includeonly>subst:</includeonly>#explode: {{ <includeonly>subst:</includeonly>#explode: {{ <includeonly>subst:</includeonly>PAGENAME }} | . | 0 }} | - | 0 }} }}
+
| name    = {{{1|}}}
| set    = {{ <includeonly>subst:</includeonly>#if: {{{fix|}}}
+
| set    = {{<includeonly>subst:</includeonly>#explode:{{<includeonly>subst:</includeonly>#explode: {{<includeonly>subst:</includeonly>PAGENAME}}|.|0}}|-|1}}{{<includeonly>subst:</includeonly>#if:{{{post|}}}|-{{{post}}}|}}
| {{ <includeonly>subst:</includeonly>#sub: {{ <includeonly>subst:</includeonly>#explode: {{<includeonly>subst:</includeonly>PAGENAME}} | - | 0 }}
+
| region  = {{<includeonly>subst:</includeonly>#vardefineecho:REGION|{{<includeonly>subst:</includeonly>#explode:{{<includeonly>subst:</includeonly>#explode: {{<includeonly>subst:</includeonly>PAGENAME}}|.|0}}|-|2}}}}
  | {{ <includeonly>subst:</includeonly>#len: {{ <includeonly>subst:</includeonly>#explode: {{ <includeonly>subst:</includeonly>#replace:{{ <includeonly>subst:</includeonly>#replace:{{ <includeonly>subst:</includeonly>#replace:{{ <includeonly>subst:</includeonly>#replace:{{ <includeonly>subst:</includeonly>#replace:{{ <includeonly>subst:</includeonly>#replace:{{ <includeonly>subst:</includeonly>#replace:{{ <includeonly>subst:</includeonly>#replace:{{ <includeonly>subst:</includeonly>#replace:{{ <includeonly>subst:</includeonly>#replace:{{ <includeonly>subst:</includeonly>#replace: {{{name|}}}|:}}|-}}|'}}|,}}|}}|.}}|?}}|#}}|"}}|/}}|\}} | ( }} }}
+
{{<includeonly>subst:</includeonly>#switch: {{<includeonly>subst:</includeonly>#explode:{{<includeonly>subst:</includeonly>#explode: {{<includeonly>subst:</includeonly>PAGENAME}}|.|0}}|-|-1}}
}}{{ <includeonly>subst:</includeonly>#vardefine: $FLAG | 1 }}
+
| OP = {{<includeonly>subst:</includeonly>#switch: {{<includeonly>subst:</includeonly>#var:REGION}}
| {{ <includeonly>subst:</includeonly>#explode: {{ <includeonly>subst:</includeonly>#explode: {{ <includeonly>subst:</includeonly>PAGENAME }} | . | 0 }} | - | 1 }} }}{{ <includeonly>subst:</includeonly>#if: {{{post|}}} | -{{{post}}} }}
+
        | JP
| region  = {{ <includeonly>subst:</includeonly>#vardefineecho:$REGION | {{ <includeonly>subst:</includeonly>#explode: {{ <includeonly>subst:</includeonly>#explode: {{ <includeonly>subst:</includeonly>PAGENAME }} | . | 0 }} | - | {{ <includeonly>subst:</includeonly>#expr: 2 - {{ <includeonly>subst:</includeonly>#var: $FLAG }} }} }} }}
+
        | TC = {{<includeonly>subst:</includeonly>!}} release {{<includeonly>subst:</includeonly>=}} {{<includeonly>subst:</includeonly>#explode:{{<includeonly>subst:</includeonly>#explode: {{<includeonly>subst:</includeonly>PAGENAME}}|.|0}}|-|3}}
{{ <includeonly>subst:</includeonly>#switch: {{ <includeonly>subst:</includeonly>#explode: {{ <includeonly>subst:</includeonly>#explode: {{ <includeonly>subst:</includeonly>PAGENAME }} | . | 0 }} | - | {{ <includeonly>subst:</includeonly>#vardefineecho:$LAST | {{ <includeonly>subst:</includeonly>#if: {{{alt|}}} | -2 | -1 }} }} }}
+
{{<includeonly>subst:</includeonly>))}}
  | OP = {{ <includeonly>subst:</includeonly>#switch: {{ <includeonly>subst:</includeonly>#var:$REGION }}
+
        | #default = {{<includeonly>subst:</includeonly>!}} edition {{<includeonly>subst:</includeonly>=}} {{<includeonly>subst:</includeonly>#explode:{{<includeonly>subst:</includeonly>#explode: {{<includeonly>subst:</includeonly>PAGENAME}}|.|0}}|-|3}}
            | JP
+
{{<includeonly>subst:</includeonly>!}} release {{<includeonly>subst:</includeonly>=}} {{<includeonly>subst:</includeonly>#explode:{{<includeonly>subst:</includeonly>#explode: {{<includeonly>subst:</includeonly>PAGENAME}}|.|0}}|-|-1}}
            | JA
+
{{<includeonly>subst:</includeonly>))}}
            | TC = {{ <includeonly>subst:</includeonly>! }} release {{ <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 }} }} }}
+
        }}
            | #default = {{ <includeonly>subst:</includeonly>! }} edition {{ <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 }} }} }}
+
| CT
{{ <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 }} }}
+
| GC = {{<includeonly>subst:</includeonly>#switch: {{<includeonly>subst:</includeonly>#var:REGION}}
          }}
+
        | JP
  | RP
+
        | TC = {{<includeonly>subst:</includeonly>!}} rarity {{<includeonly>subst:</includeonly>=}} {{<includeonly>subst:</includeonly>#explode:{{<includeonly>subst:</includeonly>#explode: {{<includeonly>subst:</includeonly>PAGENAME}}|.|0}}|-|3}}
  | CT
+
{{<includeonly>subst:</includeonly>!}} release {{<includeonly>subst:</includeonly>=}} {{<includeonly>subst:</includeonly>#explode:{{<includeonly>subst:</includeonly>#explode: {{<includeonly>subst:</includeonly>PAGENAME}}|.|0}}|-|-1}}
  | GC = {{ <includeonly>subst:</includeonly>#switch: {{ <includeonly>subst:</includeonly>#var: $REGION }}
+
{{<includeonly>subst:</includeonly>))}}
            | JP
+
        | #default = {{<includeonly>subst:</includeonly>!}} rarity  {{<includeonly>subst:</includeonly>=}} {{<includeonly>subst:</includeonly>#explode:{{<includeonly>subst:</includeonly>#explode: {{<includeonly>subst:</includeonly>PAGENAME}}|.|0}}|-|3}}
            | JA
+
{{<includeonly>subst:</includeonly>!}} edition {{<includeonly>subst:</includeonly>=}} {{<includeonly>subst:</includeonly>#explode:{{<includeonly>subst:</includeonly>#explode: {{<includeonly>subst:</includeonly>PAGENAME}}|.|0}}|-|4}}
            | TC = {{ <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>!}} release {{<includeonly>subst:</includeonly>=}} {{<includeonly>subst:</includeonly>#explode:{{<includeonly>subst:</includeonly>#explode: {{<includeonly>subst:</includeonly>PAGENAME}}|.|0}}|-|-1}}
{{ <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 }} }}
+
{{<includeonly>subst:</includeonly>))}}
            | #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>! }} 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 }} }} }}
+
| #default = {{<includeonly>subst:</includeonly>!}} rarity  {{<includeonly>subst:</includeonly>=}} {{<includeonly>subst:</includeonly>#explode:{{<includeonly>subst:</includeonly>#explode: {{<includeonly>subst:</includeonly>PAGENAME}}|.|0}}|-|3}}
{{ <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 }} }}
+
{{<includeonly>subst:</includeonly>#switch: {{<includeonly>subst:</includeonly>#var:REGION}}
          }}
+
  | JP
  | #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 }} }} }}
+
  | TC = {{<includeonly>subst:</includeonly>#ifeq:{{<includeonly>subst:</includeonly>#explode:{{<includeonly>subst:</includeonly>#explode: {{<includeonly>subst:</includeonly>PAGENAME}}|.|0}}|-|-1}} | DT | {{<includeonly>subst:</includeonly>!}} edition = {{<includeonly>subst:</includeonly>#explode:{{<includeonly>subst:</includeonly>#explode: {{<includeonly>subst:</includeonly>PAGENAME}}|.|0}}|-|-1}}
{{ <includeonly>subst:</includeonly>#switch: {{ <includeonly>subst:</includeonly>#var: $REGION }}
+
{{<includeonly>subst:</includeonly>))}} | {{<includeonly>subst:</includeonly>))}}}}
  | JP
+
  | #default = {{<includeonly>subst:</includeonly>!}} edition = {{<includeonly>subst:</includeonly>#explode:{{<includeonly>subst:</includeonly>#explode: {{<includeonly>subst:</includeonly>PAGENAME}}|.|0}}|-|4}}
  | JA
+
{{<includeonly>subst:</includeonly>))}}
  | 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: $FLAG }} }} }}
 
 
  }}
 
  }}
}}
+
}}<noinclude>
{{ <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;" />
 
<br style = "clear:both;" />
 
__NOTOC__
 
__NOTOC__
==Description==
+
==Known Problems==
Based on the {{t|OCG-TCG card image}} template.<br />
+
* Doesn't work with cards needing the <code>alt</code> parameter; (I know how to solve this, just need time.)
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).
+
* Badly designed.
  
<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 />
+
==Usage==
If using on pics named accordingly to the old Yu-Gi-Oh!:Image Policy, the <code>fix</code> parameter should be used.
+
I'll finish this when I have the time.
  
==Usage==
+
==Example==
 +
<div style = "color:Red;">'''Do not use this yet!'''</div>
 
<pre>
 
<pre>
{{subst::User:Becasita/SubPages/Templates/CardImage
+
{{subst::User:Becasita/SubPages/CardImageUploadTemplate|<Card name>}}
| name =
 
| fix  =
 
| post =
 
| alt  =
 
}}
 
 
</pre>
 
</pre>
  
; <code>name</code>
+
==Alternative (draft)==
: 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:
 
<pre>
 
{{subst::User:Becasita/SubPages/Templates/CardImage
 
| name = Number 39: Utopia
 
| fix  =
 
| post =
 
| alt  =
 
}}
 
</pre>
 
----
 
For a card like [[:File:TempestMagician-SOVR-FR-SR-LE.png]], it should be:
 
<pre>
 
{{subst::User:Becasita/SubPages/Templates/CardImage
 
| name = Tempest Magician
 
| fix  =
 
| post = SE
 
| alt  =  
 
}}
 
</pre>
 
----
 
For a card like [[:File:GraphaDragonLordofDarkWorld-DL18-SP-R-UE-Purple.png]], it should be:
 
 
<pre>
 
<pre>
{{subst::User:Becasita/SubPages/Templates/CardImage
+
{{OCG-TCG card image
| name = Grapha, Dragon Lord of Dark World
+
| name    = {{{1}}}
| fix =  
+
| set    = {{subst:#explode:{{subst:#explode: {{subst:PAGENAME}}|.|0}}|-|1}}{{subst:#if:{{{post|}}}|-{{{post}}}|}}
| post =  
+
| region  = {{subst:#vardefineecho:REGION|{{subst:#explode:{{subst:#explode: {{subst:PAGENAME}}|.|0}}|-|2}}}}
| alt = 1
+
| {{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  = {{subst:#explode:{{subst:#explode: {{subst:PAGENAME}}|.|0}}|-|3}}}}
 +
{{subst:#switch: {{subst:#var:REGION}}
 +
| JP
 +
  | TC = {{subst:#switch:{{subst:#explode:{{subst:#explode: {{subst:PAGENAME}}|.|0}}|-|-1}}
 +
        | 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>
 
 
==Draft==
 
<pre>
 
{{subst:#if:{{{watermark|}}}|{{Watermark}}
 
|}}{{subst:#if:{{{poor quality|}}}|{{Poor quality}}
 
|}}
 
 
</pre>
 
</pre>
 
</noinclude>
 
</noinclude>

Please note that all contributions to Yugipedia are considered to be released under the Creative Commons Attribution-ShareAlike 4.0 International License (see Yugipedia:Licensing for more details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

Cancel Editing help (opens in new window)
Below are some commonly used wiki markup codes. Simply click on what you want to use and it will appear in the edit box above.

View this template

Templates used on this page: