Permanently protected template

Difference between revisions of "Template:OCG-TCG card image"

From Yugipedia
Jump to: navigation, search
m (Protected "Template:OCG-TCG card image": High traffic page ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite)))
(fix second $para_set_full "[short region] set and region prefix" query failing)
 
(11 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{ #vardefine: $smw | {{ #var: $smw | {{ #if: {{ #show: }} || 1 }} }}<!-- standard implementation -->
+
{{ #varexists: $smw || {{ #vardefine: $smw | {{ #if: {{ #set: }} || 1 }} }}<!-- standard implementation -->
 
+
}}{{ #vardefine: $pagename    | {{Normalized pagename|{{PAGENAME<noinclude>:BlueEyesUltimateDragon-EN-CA.png</noinclude>}}}}
}}{{ #vardefine: $ext        | {{ #explode: {{PAGENAME<noinclude>:png</noinclude>}} | . | -1 }}
+
}}{{ #vardefine: $name        | {{{name|<noinclude>Blue-Eyes Ultimate Dragon</noinclude>}}}
}}{{ #vardefine: $filename    | {{ #explode: {{Normalized pagename|{{PAGENAME}}}} | .{{ #var: $ext }} }}
+
}}{{ #vardefine: $ext        | {{ #explode: {{ #var: $pagename }} | . | -1 }}
 +
}}{{ #vardefine: $filename    | {{ #explode: {{ #var: $pagename }} | .{{ #var: $ext }} }}
 
}}{{ #vardefine: $good_ext    | {{ lc: {{ #var: $ext }} }}
 
}}{{ #vardefine: $good_ext    | {{ lc: {{ #var: $ext }} }}
 
}}{{ #vardefine: $good_ext    | {{ #replace: {{ #var: $good_ext }} | jpeg | jpg }}
 
}}{{ #vardefine: $good_ext    | {{ #replace: {{ #var: $good_ext }} | jpeg | jpg }}
 
}}{{ #vardefine: $ns          | {{NAMESPACE}}
 
}}{{ #vardefine: $ns          | {{NAMESPACE}}
 
 
}}{{ #vardefine: $fn_region  | {{rg|{{ #explode: {{ #var: $filename }} | - | 2 }}}}<!-- region should be the third item in the image name -->
 
}}{{ #vardefine: $fn_region  | {{rg|{{ #explode: {{ #var: $filename }} | - | 2 }}}}<!-- region should be the third item in the image name -->
 
}}{{ #if: {{ #var: $fn_region }}
 
}}{{ #if: {{ #var: $fn_region }}
Line 27: Line 27:
 
     }}
 
     }}
 
   }}
 
   }}
}}{{ #vardefine: $fn_rarity  | {{r|{{ #explode: {{ #var: $filename }} | - | {{ #var: $count }} }}}}
+
}}{{ #vardefine: $fn_rarity  | {{rarity|{{ #explode: {{ #var: $filename }} | - | {{ #var: $count }} }}}}
 
}}{{ #if: {{ #var: $fn_rarity }} | {{ #vardefine: $count | {{ #expr: {{ #var: $count }} + 1 }} }}
 
}}{{ #if: {{ #var: $fn_rarity }} | {{ #vardefine: $count | {{ #expr: {{ #var: $count }} + 1 }} }}
 
}}{{ #vardefine: $fn_edition  | {{ #explode: {{ #var: $filename }} | - | {{ #var: $count }} }}
 
}}{{ #vardefine: $fn_edition  | {{ #explode: {{ #var: $filename }} | - | {{ #var: $count }} }}
Line 33: Line 33:
 
}}{{ #if: {{ #var: $fn_edition }} | {{ #vardefine: $count | {{ #expr: {{ #var: $count }} + 1 }} }}
 
}}{{ #if: {{ #var: $fn_edition }} | {{ #vardefine: $count | {{ #expr: {{ #var: $count }} + 1 }} }}
 
}}{{ #vardefine: $fn_release  | {{ #explode: {{ #var: $filename }} | - | {{ #var: $count }} }}
 
}}{{ #vardefine: $fn_release  | {{ #explode: {{ #var: $filename }} | - | {{ #var: $count }} }}
}}{{ #vardefine: $fn_release  | {{ #switch: {{ #var: $fn_release }} | OP | GC | CT | RP | VG | DDM | Anime | Manga | SAMPLE = {{ #var: $fn_release }} }}
+
}}{{ #if: {{ #pos: {{ #var: $pagename }} | -OW. }} | {{ #vardefine: $fn_release | OW }}<!-- horrible dirty hardcoding, not that that's really out of line for the rest of this template -->
 +
}}{{ #if: {{ #pos: {{ #var: $pagename }} | -OP. }} | {{ #vardefine: $fn_release | OP }}<!-- ibid -->
 +
}}{{ #if: {{ #pos: {{ #var: $pagename }} | -CA. }}{{ #pos: {{ #var: $pagename }} | -CA- }} | {{ #vardefine: $fn_release | CA }}<!-- ibid -->
 +
}}{{ #vardefine: $fn_release  | {{ #switch: {{ #var: $fn_release }} | OP | OW | CA | GC | CT | RP | VG | DDM | Anime | Manga | SAMPLE = {{ #var: $fn_release }} }}
 
}}{{ #if: {{ #var: $fn_release }} | {{ #vardefine: $count | {{ #expr: {{ #var: $count }} + 1 }} }}
 
}}{{ #if: {{ #var: $fn_release }} | {{ #vardefine: $count | {{ #expr: {{ #var: $count }} + 1 }} }}
 
}}{{ #vardefine: $fn_alt      | {{ #explode: {{ #var: $filename }} | - | {{ #var: $count }} }}
 
}}{{ #vardefine: $fn_alt      | {{ #explode: {{ #var: $filename }} | - | {{ #var: $count }} }}
}}{{ #vardefine: $fn_name_set | {{ #var: $fn_name_set | {{ #explode: {{ #var: $filename }} | -{{ #var: $fn_rarity | {{ #var: $fn_edition | {{ #var: $fn_release | {{ #var: $fn_alt }} }} }} }} }} }}
+
}}{{ #if: {{ #var: $fn_alt }} | {{ #vardefine: $count | {{ #expr: {{ #var: $count }} + 1 }} }}
}}{{ #ifexpr: {{ #len: {{ #explode: {{ #var: $fn_name_set }} | - | -1 }} }} < 5 | {{ #vardefine: $fn_set | {{ #explode: {{ #var: $fn_name_set }} | - | -1 }} }}
+
}}{{ #vardefine: $fn_alt_2    | {{ #explode: {{ #var: $filename }} | - | {{ #var: $count }} }}
 +
}}{{ #if: {{ #var: $fn_alt_2 }} | {{ #vardefine: $count | {{ #expr: {{ #var: $count }} + 1 }} }}
 +
}}{{ #vardefine: $fn_alt_3    | {{ #explode: {{ #var: $filename }} | - | {{ #var: $count }} }}
 +
}}{{ #vardefine: $fn_name_set | {{ #var: $fn_name_set | {{ #explode: {{ #var: $filename }} | -{{ #var: $fn_rarity | {{ #var: $fn_edition | {{ #var: $fn_release | {{ #var: $fn_alt | {{ #var: $fn_alt_2 | {{ #var: $fn_alt_3 }} }} }} }} }} }} }} }}
 +
}}{{ #ifexpr: {{ #len: {{ #explode: {{ #var: $fn_name_set }} | - | -1 }} }} < 7 | {{ #vardefine: $fn_set | {{ #explode: {{ #var: $fn_name_set }} | - | -1 }} }}
 
}}{{ #if: {{ #var: $fn_set }}
 
}}{{ #if: {{ #var: $fn_set }}
 
   | {{ #vardefine: $fn_name | {{ #explode: {{ #var: $fn_name_set }} | -{{ #var: $fn_set }} }} }}
 
   | {{ #vardefine: $fn_name | {{ #explode: {{ #var: $fn_name_set }} | -{{ #var: $fn_set }} }} }}
 
   | {{ #if: {{{set|}}} | {{ #if: {{ #pos: {{ #var: $fn_name_set }} | {{ uc: {{{set}}} }} }} | {{ #vardefine: $fn_name_set | {{ #replace: {{ #var: $fn_name_set }} | {{ uc: {{{set}}} }} }} }} }} }}
 
   | {{ #if: {{{set|}}} | {{ #if: {{ #pos: {{ #var: $fn_name_set }} | {{ uc: {{{set}}} }} }} | {{ #vardefine: $fn_name_set | {{ #replace: {{ #var: $fn_name_set }} | {{ uc: {{{set}}} }} }} }} }} }}
 
+
}}{{ #ifeq: {{ #var: $fn_name }} | {{ #var: $fn_set }} | {{ #vardefine: $fn_set }}<!-- I'm sure this will break stuff, but not doing this currently breaks a few SAMPLE images -->
}}{{ #vardefine: $para_name        | {{ #replace: {{{name|<noinclude>Jinzo 7</noinclude>}}} | # }}<!-- original input; should match card's page name including anything in "()" ("#" is allowed/stripped here simply for backwards compatibility, since previously the template required the card's printed name rather than the name of its article) -->
+
}}{{ #vardefine: $para_name        | {{ #replace: {{ #var: $name }} | # }}<!-- original input; should match card's page name including anything in "()" ("#" is allowed/stripped here simply for backwards compatibility, since previously the template required the card's printed name rather than the name of its article) -->
 
}}{{ #vardefine: $para_name        | {{ #var: $para_name | {{ #var: $fn_name | {{ #var: $fn_name_set }} }} }}<!-- if no name is given, fall back on the name in the image name (which will fall apart for anything with spaces, etc. in its name, but sometimes we'll luck out and get a single-word name with no punctuation); if we couldn't separate the name from the set, just use that since at least then the template output won't be completely borked (the name and set stuff will probably be completely useless in this case, though) -->
 
}}{{ #vardefine: $para_name        | {{ #var: $para_name | {{ #var: $fn_name | {{ #var: $fn_name_set }} }} }}<!-- if no name is given, fall back on the name in the image name (which will fall apart for anything with spaces, etc. in its name, but sometimes we'll luck out and get a single-word name with no punctuation); if we couldn't separate the name from the set, just use that since at least then the template output won't be completely borked (the name and set stuff will probably be completely useless in this case, though) -->
}}{{ #vardefine: $para_pretty_name  | {{Card name|{{ #var: $para_name }}}}<!-- name as it will be displayed; should include e.g. "#" and exclude "(stuff)" -->
+
}}{{ #vardefine: $para_pretty_name  | {{Name|{{ #var: $para_name }}}}<!-- name as it will be displayed; should include e.g. "#" and exclude "(stuff)" -->
 
}}{{ #vardefine: $has_article      | {{ #var: $para_pretty_name }}<!-- card has a page -->
 
}}{{ #vardefine: $has_article      | {{ #var: $para_pretty_name }}<!-- card has a page -->
 
}}{{ #vardefine: $para_pretty_name  | {{ #var: $para_pretty_name | {{ #explode: {{ #var: $para_name }} | ( }} }}<!-- support redlinked names -->
 
}}{{ #vardefine: $para_pretty_name  | {{ #var: $para_pretty_name | {{ #explode: {{ #var: $para_name }} | ( }} }}<!-- support redlinked names -->
}}{{ #vardefine: $para_page_name    | {{ #if: {{ #var: $smw }} | {{ #show: {{ #var: $para_name }} |?Page name }} | {{ #var: $para_name }} }}<!-- check that $para_name is the actual page name and not e.g. a redirect; if so $para_name and $para_page_name will be the same -->
+
}}{{ #vardefine: $para_page_name    | {{Target of|{{ #var: $para_name }}}}<!-- check that $para_name is the actual page name and not e.g. a redirect; if so $para_name and $para_page_name will be the same -->
}}{{ #vardefine: $para_page_name   | {{ #var: $para_page_name | {{ #var: $para_name }} }}<!-- support redlinked names -->
+
}}{{ #vardefine: $para_main_name   | {{ #show: {{ #var: $para_name }} |?Main card page | link=none | default={{ #var: $para_name }} }}
}}{{ #vardefine: $para_url_name    | {{Card image name|{{ #var: $para_pretty_name }}}}<!-- name as it appears in the image name/URL -->
+
}}{{ #vardefine: $para_url_name    | {{Card image name|{{ #var: $para_page_name }}}}<!-- name as it appears in the image name/URL -->
}}{{ #vardefine: $para_old_url_name | {{ #replace: {{ #replace: {{ #replace: {{ #replace: {{ #replace: {{ #replace: {{ #replace: {{ #var: $para_pretty_name }} }} | . }} | ? }} | # }} | " }} | / }} | \ }}<!-- name as it would appear in the image name if the image was named with the old rules -->
+
}}{{ #if: {{ #var: $has_article }}  || {{ #vardefine: $para_url_name | {{ #explode: {{ #var: $para_url_name }} | ( }} }}<!-- if there's no page, assume the correct card name doesn't have any parenthesized component (this is *usually* correct) -->
}}{{ #vardefine: $para_set          | {{ uc: {{{set|}}} }}
+
}}{{ #vardefine: $para_old_url_name | {{ #replace: {{ #replace: {{ #replace: {{ #replace: {{ #replace: {{ #replace: {{ #replace: {{ #replace: {{ #replace: {{ #var: $para_pretty_name }} }} | . }} | ? }} | # }} | " }} | / }} | \ }} | [ }} | ] }}<!-- name as it would appear in the image name if the image was named with the old rules -->
 +
}}{{ #vardefine: $para_set          | {{ #ifexpr: {{ #len: {{{set|}}} }} < 12 | {{ uc: {{{set|}}} }} | }}
 
}}{{ #vardefine: $para_set          | {{ #var: $para_set | {{ #var: $fn_set | {{ #replace: {{ #replace: {{ #var: $fn_name_set }} | {{ #var: $para_url_name }} }} | {{ #var: $para_old_url_name }} }} }} }}
 
}}{{ #vardefine: $para_set          | {{ #var: $para_set | {{ #var: $fn_set | {{ #replace: {{ #replace: {{ #var: $fn_name_set }} | {{ #var: $para_url_name }} }} | {{ #var: $para_old_url_name }} }} }} }}
 
}}{{ #vardefine: $para_region      | {{rg|{{{region|}}}}}
 
}}{{ #vardefine: $para_region      | {{rg|{{{region|}}}}}
Line 57: Line 65:
 
}}{{ #vardefine: $para_region_full  | {{region|{{ #var: $para_region }}}}
 
}}{{ #vardefine: $para_region_full  | {{region|{{ #var: $para_region }}}}
 
}}{{ #vardefine: $para_ocg_tcg      | {{rgo|{{ #var: $para_region }}}}
 
}}{{ #vardefine: $para_ocg_tcg      | {{rgo|{{ #var: $para_region }}}}
}}{{ #vardefine: $para_set_full    | {{ #ask: [[{{ #var: $para_region_full }} set and region prefix::{{ #var: $para_set }}-{{ #var: $para_region }}]] | link=none | limit=1 |searchlabel= }}
+
}}{{ #if: {{ #var: $para_set }}
}}{{ #vardefine: $para_set_full    | {{ #var: $para_set_full | {{ #ask: [[{{ #var: $para_region_full }} set prefix::{{ #var: $para_set }}]] | link=none | limit=1 |searchlabel= }} }}
+
  | {{ #vardefine: $para_set_full    | {{ #if: {{{set|}}} | {{ #ifeq: {{{set}}} | {{ #var: $para_set }} || {{{set}}} }} }}
}}{{ #vardefine: $para_set_full    | {{ #var: $para_set_full | {{ #ask: [[{{region|{{ #var: $para_region }}|short2=1}} set and region prefix::{{ #var: $para_set }}]] | link=none | limit=1 |searchlabel= }} }}
+
  }}{{ #vardefine: $para_set_full    | {{ #var: $para_set_full | {{ #ask: [[{{ #var: $para_region_full }} set and region prefix::{{ #ifexpr: {{ #len: {{ #var: $para_set }}}} > 5
}}{{ #vardefine: $para_set_full    | {{ #var: $para_set_full | {{ #ask: [[{{region|{{ #var: $para_region }}|short2=1}} set prefix::{{ #var: $para_set }}]] | link=none | limit=1 |searchlabel= }} }}
+
    | {{ #sub:{{ #var: $para_set }} | 0 | 2 }}/{{ #sub: {{ #var: $para_set }} | 2 }}
}}{{ #vardefine: $para_set          | {{ #explode: {{ #var: $para_set }} | - }}
+
    | {{ #var: $para_set }}
}}{{ #vardefine: $para_pretty_set  | {{ #explode: {{ #var: $para_set_full }} | ( | 0 }}
+
  }}-{{ #var: $para_region }}]] | link=none | limit=1 |searchlabel= }} }}
}}{{ #vardefine: $para_rarity      | {{r|{{{rarity}}}}}
+
  }}{{ #vardefine: $para_set_full    | {{ #var: $para_set_full | {{ #ask: [[{{ #var: $para_region_full }} set prefix::{{ #var: $para_set }}]] | link=none | limit=1 |searchlabel= }} }}
 +
  }}{{ #vardefine: $para_set_full    | {{ #var: $para_set_full | {{ #ask: [[{{region|{{ #var: $para_region }}|short2=1}} set and region prefix::{{ #var: $para_set }}-{{ #var: $para_region }}]] | link=none | limit=1 |searchlabel= }} }}
 +
  }}{{ #vardefine: $para_set_full    | {{ #var: $para_set_full | {{ #ask: [[{{region|{{ #var: $para_region }}|short2=1}} set prefix::{{ #var: $para_set }}]] | link=none | limit=1 |searchlabel= }} }}
 +
  }}{{ #vardefine: $para_set          | {{ #explode: {{ #var: $para_set }} | - }}
 +
  }}{{ #vardefine: $para_pretty_set  | {{ #explode: {{ #var: $para_set_full }} | ( | 0 }}
 +
  }}
 +
}}{{ #vardefine: $para_rarity      | {{rarity|{{{rarity}}}}}
 
}}{{ #vardefine: $para_rarity      | {{ #var: $para_rarity | {{ #var: $fn_rarity }} }}
 
}}{{ #vardefine: $para_rarity      | {{ #var: $para_rarity | {{ #var: $fn_rarity }} }}
}}{{ #vardefine: $para_rarity_full  | {{r|{{ #var: $para_rarity }}|full=yes}}
+
}}{{ #vardefine: $para_rarity_full  | {{rarity|{{ #var: $para_rarity }}|full=yes}}
 
}}{{ #vardefine: $para_edition      | {{ uc: {{{edition|}}} }}
 
}}{{ #vardefine: $para_edition      | {{ uc: {{{edition|}}} }}
 
}}{{ #vardefine: $para_edition      | {{ #var: $para_edition | {{ #var: $fn_edition }} }}
 
}}{{ #vardefine: $para_edition      | {{ #var: $para_edition | {{ #var: $fn_edition }} }}
}}{{ #vardefine: $para_edition_abbr | {{ #switch: {{ #var: $para_edition }} | UE | 1E | LE | DT | SC | TC | CL = {{ #var: $para_edition }} | #default = }}
+
}}{{ #vardefine: $para_edition_abbr | {{ #switch: {{ lc: {{ #var: $para_edition }} }}
 +
  | ue | unlimited edition = UE
 +
  | 1e | 1st edition = 1E
 +
  | le | limited edition = LE
 +
  | dt | duel terminal | duel terminal edition = DT
 +
  | sc | strategy card = SC
 +
  | tc | tip card = TC
 +
  | cl | checklist = CL
 +
  | #default =  
 +
  }}
 
}}{{ #vardefine: $para_edition_full | {{ #switch: {{ #var: $para_edition_abbr }}
 
}}{{ #vardefine: $para_edition_full | {{ #switch: {{ #var: $para_edition_abbr }}
 
   | UE = Unlimited Edition
 
   | UE = Unlimited Edition
Line 81: Line 104:
 
}}{{ #vardefine: $para_release      | {{ #var: $para_release | {{ #var: $fn_release }} }}
 
}}{{ #vardefine: $para_release      | {{ #var: $para_release | {{ #var: $fn_release }} }}
 
}}{{ #vardefine: $para_release      | {{ #switch: {{ #var: $para_release }}
 
}}{{ #vardefine: $para_release      | {{ #switch: {{ #var: $para_release }}
   | OP | GC | CT | RP | VG | DDM | SAMPLE = {{ #var: $para_release }}
+
   | OP | OW | CA | GC | CT | RP | VG | DDM | SAMPLE = {{ #var: $para_release }}
 
   | OSP = CT
 
   | OSP = CT
 
   | ANIME | MANGA = {{ ucfirst: {{ lc: {{ #var: $para_release }} }} }}
 
   | ANIME | MANGA = {{ ucfirst: {{ lc: {{ #var: $para_release }} }} }}
 
   | #default = {{ #switch: {{ #var: $para_edition }}
 
   | #default = {{ #switch: {{ #var: $para_edition }}
     | OP | GC | CT | RP | VG | DDM | SAMPLE = {{ #var: $para_edition }}
+
     | OP | OW | CA | GC | CT | RP | VG | DDM | SAMPLE = {{ #var: $para_edition }}
 
     | OSP = CT
 
     | OSP = CT
 
     | ANIME | MANGA = {{ ucfirst: {{ lc: {{ #var: $para_edition }} }} }}
 
     | ANIME | MANGA = {{ ucfirst: {{ lc: {{ #var: $para_edition }} }} }}
Line 93: Line 116:
 
}}{{ #vardefine: $para_release_full | {{ #switch: {{ #var: $para_release }}
 
}}{{ #vardefine: $para_release_full | {{ #switch: {{ #var: $para_release }}
 
   | OP  = Official Proxy
 
   | OP  = Official Proxy
 +
  | OW  = Official Website
 +
  | CA  = Card Artwork
 
   | GC  = Giant Card
 
   | GC  = Giant Card
 
   | CT  = Case Topper
 
   | CT  = Case Topper
Line 101: Line 126:
 
   }}
 
   }}
 
}}{{ #vardefine: $para_alt          | {{{alt|}}}
 
}}{{ #vardefine: $para_alt          | {{{alt|}}}
}}{{ #vardefine: $para_alt          | {{ #var: $para_alt | {{ #var: $fn_alt }} }}
+
}}{{ #if: {{ #var: $fn_alt }}
 +
  | {{ #ifeq: {{ #var: $para_pretty_name }} | Token
 +
    | {{ #if: {{ #pos: {{ #var: $para_page_name }} | ( }}
 +
      | {{ #vardefine: $para_alt | {{Card image name|{{ #replace: {{ #explode: {{ #var: $para_page_name }} | ( | 1 }} | ) }}}} }}
 +
    }}
 +
  }}
 +
}}{{ #vardefine: $para_alt          | {{ #var: $para_alt | {{ #var: $fn_alt }}{{ #if: {{ #var: $fn_alt_2 }} | -{{ #var: $fn_alt_2 }}{{ #if: {{ #var: $fn_alt_3 }} | -{{ #var: $fn_alt_3 }} }} }} }}
 
}}{{ #vardefine: $para_alt          | {{ #switch: {{ lc: {{ #var: $para_alt }} }}
 
}}{{ #vardefine: $para_alt          | {{ #switch: {{ lc: {{ #var: $para_alt }} }}
 
   | misc = Misc
 
   | misc = Misc
Line 109: Line 140:
 
   | #default = {{ #var: $para_alt }}
 
   | #default = {{ #var: $para_alt }}
 
   }}
 
   }}
 
+
}}{{ #if: {{ #pos: {{ #var: $para_alt }} | . }} | {{ #vardefine: $para_alt | {{ #explode: {{ #var: $para_alt }} | . }} }}
 
<!-- clean these up later or w/e -->
 
<!-- clean these up later or w/e -->
}}{{ #vardefine: $correctimgname | {{ #var: $para_url_name }}-{{ #var: $para_set }}-{{ #var: $para_region }}{{ #if: {{ #var: $para_rarity }} | -{{ #var: $para_rarity }} }}{{ #if: {{ #var: $para_edition_abbr }} | -{{ #var: $para_edition_abbr }} }}{{ #if: {{ #var: $para_release }} | -{{ #var: $para_release }} }}{{ #if: {{ #var: $para_alt }} | -{{ #var: $para_alt }} }}
+
}}{{ #vardefine: $correctimgname | {{ #var: $para_url_name }}{{ #if: {{ #var: $para_set }} | -{{ #replace: {{ #var: $para_set }} | / }} }}{{ #if: {{ #var: $para_region }} | -{{ #var: $para_region }} }}{{ #if: {{ #var: $para_rarity }} | -{{ #var: $para_rarity }} }}{{ #if: {{ #var: $para_edition_abbr }} | -{{ #var: $para_edition_abbr }} }}{{ #if: {{ #var: $para_release }} | -{{ #var: $para_release }} }}{{ #if: {{ #var: $para_alt }} | -{{ #var: $para_alt }} }}
 
+
}}{{ #vardefine: $correctpagename | {{ #var: $correctimgname }}.{{ #var: $good_ext }}
 +
<!-- debug stuff -->
 +
}}{{ #if: {{{debug<includeonly>|</includeonly>}}} |
 +
<table class="wikitable">
 +
  <caption>basic variables</caption>
 +
  <tr>
 +
    <th scope="col">variable</th>
 +
    <th scope="col">parameter</th>
 +
    <th scope="col">filename</th>
 +
    <th scope="col">"final"</th>
 +
  </tr>
 +
  <tr>
 +
    <td>Name</td>
 +
    <td><code><nowiki>{{{name}}}</nowiki></code>: {{ #var: $name }}</td>
 +
    <td><code>$fn_name_set</code>: {{ #var: $fn_name_set }}<br /><code>$fn_name</code>: {{ #var: $fn_name }}</td>
 +
    <td><code>$para_name</code>: {{ #var: $para_name }}<br /><code>$para_pretty_name</code>: {{ #var: $para_pretty_name }}<br /><code>$para_page_name</code>: {{ #var: $para_page_name }}<br /><code>$para_url_name</code>: {{ #var: $para_url_name }}<br /><code>$para_old_url_name</code>: {{ #var: $para_old_url_name }}<br /><code>$para_main_name</code>: {{ #var: $para_main_name }}</td>
 +
  </tr>
 +
  <tr>
 +
    <td>Set</td>
 +
    <td><code><nowiki>{{{set}}}</nowiki></code>: {{{set|}}}</td>
 +
    <td><code>$fn_name_set</code>: {{ #var: $fn_name_set }}<br /><code>$fn_set</code>: {{ #var: $fn_set }}</td>
 +
    <td><code>$para_set</code>: {{ #var: $para_set }}<br /><code>$para_set_full</code>: {{ #var: $para_set_full }}<br /><code>$para_pretty_set</code>: {{ #var: $para_pretty_set }}</td>
 +
  </tr>
 +
  <tr>
 +
    <td>Region</td>
 +
    <td><code><nowiki>{{{region}}}</nowiki></code>: {{{region|}}}</td>
 +
    <td><code>$fn_region</code>: {{ #var: $fn_region }}</td>
 +
    <td><code>$para_region</code>: {{ #var: $para_region }}<br /><code>$para_region_full</code>: {{ #var: $para_region_full }}</td>
 +
  </tr>
 +
  <tr>
 +
    <td>Rarity</td>
 +
    <td><code><nowiki>{{{rarity}}}</nowiki></code>: {{{rarity|}}}</td>
 +
    <td><code>$fn_rarity</code>: {{ #var: $fn_rarity }}</td>
 +
    <td><code>$para_rarity</code>: {{ #var: $para_rarity }}<br /><code>$para_rarity_full</code>: {{ #var: $para_rarity_full }}</td>
 +
  </tr>
 +
  <tr>
 +
    <td>Edition</td>
 +
    <td><code><nowiki>{{{edition}}}</nowiki></code>: {{{edition|}}}</td>
 +
    <td><code>$fn_edition</code>: {{ #var: $fn_edition }}</td>
 +
    <td><code>$para_edition</code>: {{ #var: $para_edition }}<br /><code>$para_edition_abbr</code>: {{ #var: $para_edition_abbr }}<br /><code>$para_edition_full</code>: {{ #var: $para_edition_full }}</td>
 +
  </tr>
 +
  <tr>
 +
    <td>Release</td>
 +
    <td><code><nowiki>{{{release}}}</nowiki></code>: {{{release|}}}</td>
 +
    <td><code>$fn_release</code>: {{ #var: $fn_release }}</td>
 +
    <td><code>$para_release</code>: {{ #var: $para_release }}<br /><code>$para_release_full</code>: {{ #var: $para_release_full }}</td>
 +
  </tr>
 +
  <tr>
 +
    <td>Alt</td>
 +
    <td><code><nowiki>{{{alt}}}</nowiki></code>: {{{alt|}}}</td>
 +
    <td><code>$fn_alt</code>: {{ #var: $fn_alt }}<br /><code>$fn_alt_2</code>: {{ #var: $fn_alt_2 }}<br /><code>$fn_alt_3</code>: {{ #var: $fn_alt_3 }}</td>
 +
    <td><code>$para_alt</code>: {{ #var: $para_alt }}</td>
 +
  </tr>
 +
</table>
 +
* <code><nowiki>{{{watermark}}}</nowiki></code>: {{{watermark|}}}
 +
* <code><nowiki>{{{poor}}}</nowiki></code>: {{{poor|}}}
 +
* <code>$ext</code>: {{ #var: $ext }}
 +
* <code>$filename</code>: {{ #var: $filename }}
 +
* <code>$good_ext</code>: {{ #var: $good_ext }}
 +
* <code>$ns</code>: {{ #var: $ns }}
 +
* <code>$count</code>: {{ #var: $count }}
 +
* <code>$has_article</code>: {{ #var: $has_article }}
 +
* <code>$para_ocg_tcg</code>: {{ #var: $para_ocg_tcg }}
 +
* <code>$correctimgname</code>: {{ #var: $correctimgname }}
 +
* <code>$correctpagename</code>: {{ #var: $correctpagename }}
 
}}{{ #if: {{ #var: $smw }}
 
}}{{ #if: {{ #var: $smw }}
 
   | {{ #if: {{ #var: $has_article }}
 
   | {{ #if: {{ #var: $has_article }}
Line 125: Line 220:
 
     | {{imbox
 
     | {{imbox
 
       | type = content
 
       | type = content
       | text = '''There is no article for the card "[[{{ #var: $para_name }}]]".'''<br />{{ #if: {{{name|}}} | Be sure that you typed the name correctly. | No value was provided for <code>name</code>. }} If the card's page does not exist yet, you can ignore this message or [{{fullurl:{{FULLPAGENAMEE:{{ #var: $para_name }}}}|action=edit&redlink=yes}} create the page] yourself.
+
       | text = '''There is no article for the card "[[{{ #var: $para_name }}]]".'''<br />{{ #if: {{ #var: $name }} | Be sure that you typed the name correctly. | No value was provided for <code>name</code>. }} If the card's page does not exist yet, you can ignore this message or [{{fullurl:{{FULLPAGENAMEE:{{ #var: $para_name }}}}|action=edit&redlink=yes}} create the page] yourself.
 
     }}{{ #ifeq: {{ #var: $ns }} | {{NS:6}}<!-- only categorize images -->
 
     }}{{ #ifeq: {{ #var: $ns }} | {{NS:6}}<!-- only categorize images -->
 
       [[Category:Card images for a card without an article]]
 
       [[Category:Card images for a card without an article]]
 
     }}
 
     }}
 
   }}
 
   }}
}}{{ #ifeq: {{ #var: $correctimgname }} | {{ #var: $filename }}
+
}}{{ #ifeq: {{ #var: $correctpagename }} | {{ #var: $pagename }}
 
   | {{ #ifeq: {{ #var: $ext }} | {{ #var: $good_ext }}
 
   | {{ #ifeq: {{ #var: $ext }} | {{ #var: $good_ext }}
 
     || {{imbox
 
     || {{imbox
 
       | type = move
 
       | type = move
       | text = '''The extension on this image should be corrected.'''<br />To simplify linking to this image, it should be renamed so that its extension is {{ #ifeq: {{ #var: $ext }} | {{ lc: {{ #var: $ext }} }} || lowercase{{ #ifeq: {{ lc: {{ #var: $ext }} }} | jpeg | , and }} }} {{ #ifeq: {{ lc: {{ #var: $ext }} }} | jpeg | shortened to "jpg" }}.<br />The image should be located at [[:File:{{ #var: $correctimgname }}.{{ #var: $good_ext }}]].<br />Please '''do not''' reupload this image; a [[Yu-Gi-Oh!:Mover|mover]] or [[Yu-Gi-Oh!:Administrators|admin]] will be along shortly to move it to the correct name.<br /><small>Movers and administrators: [[Special:WhatLinksHere/{{FULLPAGENAMEE}}|What links here]]{{•}} [{{fullurl:{{FULLPAGENAMEE}}|action=history}} Image history]{{•}} [{{fullurl:Special:MovePage/{{FULLPAGENAMEE}}|wpNewTitle=File:{{urlencode:{{ #var: $correctimgname }}.{{ #var: $good_ext }}}}&wpReason={{urlencode:Moving card image to correct name "{{ #var: $correctimgname }}.{{ #var: $good_ext }}" to correct the file extension}}}} Rename image]</small>
+
       | text = '''The extension on this image should be corrected.'''<br />To simplify linking to this image, it should be renamed so that its extension is {{ #ifeq: {{ #var: $ext }} | {{ lc: {{ #var: $ext }} }} || lowercase{{ #ifeq: {{ lc: {{ #var: $ext }} }} | jpeg | , and }} }} {{ #ifeq: {{ lc: {{ #var: $ext }} }} | jpeg | shortened to "jpg" }}.<br />The image should be located at [[:File:{{ #var: $correctpagename }}]].<br />Please '''do not''' reupload this image; a [[Project:Mover|mover]] or [[Project:Administrators|admin]] will be along shortly to move it to the correct name.<br /><small>Movers and administrators: [[Special:WhatLinksHere/{{FULLPAGENAMEE}}|What links here]]{{•}} [{{fullurl:{{FULLPAGENAMEE}}|action=history}} Image history]{{•}} [{{fullurl:Special:MovePage/{{FULLPAGENAMEE}}|wpNewTitle=File:{{urlencode:{{ #var: $correctpagename }}}}&wpReason={{urlencode:Moving card image to correct name "{{ #var: $correctpagename }}" to correct the file extension}}}} Rename image]</small>
 
     }}{{ #ifeq: {{ #var: $ns }} | {{NS:6}}<!-- only categorize images -->
 
     }}{{ #ifeq: {{ #var: $ns }} | {{NS:6}}<!-- only categorize images -->
 
       | [[Category:Card images with incorrect names]]
 
       | [[Category:Card images with incorrect names]]
Line 141: Line 236:
 
   | {{imbox
 
   | {{imbox
 
     | type = move
 
     | type = move
     | text = '''This image is named incorrectly''', and must be renamed to comply with the [[Yu-Gi-Oh!:Image policy|image policy]].<br />The image should be located at [[:File:{{ #var: $correctimgname }}.{{ #var: $good_ext }}]].<br />Please '''do not''' reupload this image; a [[Yu-Gi-Oh!:Mover|mover]] or [[Yu-Gi-Oh!:Administrators|admin]] will be along shortly to move it to the correct name.<br /><small>Movers and administrators: [[Special:WhatLinksHere/{{FULLPAGENAMEE}}|What links here]]{{•}} [{{fullurl:{{FULLPAGENAMEE}}|action=history}} Image history]{{•}} [{{fullurl:Special:MovePage/{{FULLPAGENAMEE}}|wpNewTitle=File:{{urlencode:{{ #var: $correctimgname }}.{{ #var: $good_ext }}}}&wpReason={{urlencode:Moving card image to correct name "{{ #var: $correctimgname }}.{{ #var: $good_ext }}" per the [[Yu-Gi-Oh!:Image policy|image policy]]}}}} Rename image]</small>
+
     | text = '''This image is named incorrectly''', and must be renamed to comply with the [[Project:Image policy|image policy]].<br />The image should be located at [[:File:{{ #var: $correctpagename }}]].<br />Please '''do not''' reupload this image; a [[Project:Mover|mover]] or [[Project:Administrators|admin]] will be along shortly to move it to the correct name.<br /><small>Movers and administrators: [[Special:WhatLinksHere/{{FULLPAGENAMEE}}|What links here]]{{•}} [{{fullurl:{{FULLPAGENAMEE}}|action=history}} Image history]{{•}} [{{fullurl:Special:MovePage/{{FULLPAGENAMEE}}|wpNewTitle=File:{{urlencode:{{ #var: $correctpagename }}}}&wpReason={{urlencode:Moving card image to correct name "{{ #var: $correctpagename }}" per the [[Project:Image policy|image policy]]}}}} Rename image]</small>
 
   }}{{ #ifeq: {{ #var: $ns }} | {{NS:6}}<!-- only categorize images -->
 
   }}{{ #ifeq: {{ #var: $ns }} | {{NS:6}}<!-- only categorize images -->
 
     | [[Category:Card images with incorrect names]]
 
     | [[Category:Card images with incorrect names]]
 
   }}
 
   }}
 
}}{{ #ifeq: {{ #var: $good_ext }} | png
 
}}{{ #ifeq: {{ #var: $good_ext }} | png
   || {{ #ifexist: File:{{ #var: $correctimgname }}.png
+
   || {{ #ifexpr: {{ #imgw: File:{{ #var: $correctimgname }}.png }} > 0
 
     | {{imbox
 
     | {{imbox
 
       | type = style
 
       | type = style
       | text = '''There is a [[wikipedia:Portable Network Graphics|PNG]] version of this image available.'''<br />Per the [[Yu-Gi-Oh!:Image policy|image policy]], PNG images are preferred for card images. There is a PNG version of this image at [[:File:{{ #var: $correctimgname }}.png]], which should be used instead of this file. Please switch all [[Special:Whatlinkshere/{{FULLPAGENAMEE}}|uses]] of this image to the PNG version and mark this one for deletion.
+
       | text = '''There is a [[wikipedia:Portable Network Graphics|PNG]] version of this image available.'''<br />Per the [[Project:Image policy|image policy]], PNG images are preferred for card images. There is a PNG version of this image at [[:File:{{ #var: $correctimgname }}.png]], which should be used instead of this file. Please switch all [[Special:Whatlinkshere/{{FULLPAGENAMEE}}|uses]] of this image to the PNG version and mark this one for deletion.<br /><small>Administrators: [{{fullurl:{{FULLPAGENAMEE}}|action=delete&wpReason={{urlencode:Duplicated/superseded file: [[File:{{ #var: $correctimgname }}.png]]}}}} Delete image]</small>
 
     }}{{ #ifeq: {{ #var: $ns }} | {{NS:6}}<!-- only categorize images -->
 
     }}{{ #ifeq: {{ #var: $ns }} | {{NS:6}}<!-- only categorize images -->
 
       | [[Category:Card images with an available PNG version]]
 
       | [[Category:Card images with an available PNG version]]
Line 155: Line 250:
 
     | {{imbox
 
     | {{imbox
 
       | type = style
 
       | type = style
       | text = '''This is not a [[wikipedia:Portable Network Graphics|PNG]] image.'''<br />Per the [[Yu-Gi-Oh!:Image policy|image policy]], PNG images are preferred for card images. If possible, [[Special:Upload/{{ #var: $correctimgname }}.png|upload a PNG version]] of this image and mark this one for deletion.
+
       | text = '''This is not a [[wikipedia:Portable Network Graphics|PNG]] image.'''<br />Per the [[Project:Image policy|image policy]], PNG images are preferred for card images. If possible, [{{fullurl:Special:Upload|wpDestFile={{ #var: $correctimgname }}.png}} upload a PNG version] of this image and mark this one for deletion.
 
     }}{{ #ifeq: {{ #var: $ns }} | {{NS:6}}<!-- only categorize images -->
 
     }}{{ #ifeq: {{ #var: $ns }} | {{NS:6}}<!-- only categorize images -->
 
       | [[Category:Non-PNG card images]][[Category:Non-PNG {{ #var: $para_region_full }} card images]]
 
       | [[Category:Non-PNG card images]][[Category:Non-PNG {{ #var: $para_region_full }} card images]]
Line 161: Line 256:
 
   }}
 
   }}
 
}}{{ #if: {{{watermark|}}}
 
}}{{ #if: {{{watermark|}}}
    | {{Watermark}}
+
  | {{Watermark}}
    | {{ #if: {{{poor|}}}
+
}}{{ #if: {{{poor|}}}
          | {{Poor quality|{{ #ifexpr: {{ #len: {{{poor}}} }} > 4 | {{{poor}}} | }}}}
+
  | {{Poor quality|{{ #ifexpr: {{ #len: {{{poor}}} }} > 4 | {{{poor}}} | }}}}
      }}
+
}}{{imbox
  }}{{imbox
+
| text = {{ #switch: {{ #var: $para_release }}
| text = This is a {{ #ifeq: {{ #var: $para_alt }} | NC | non- }}card image for the {{ #if: {{ #var: $para_rarity_full }} | [[{{ #var: $para_rarity_full }}]] }} {{ #if: {{ #var: $para_edition_full }} | [[{{ #var: $para_edition_full }}]] }} {{ #if: {{ #var: $para_release_full }} | {{ #switch: {{ #var: $para_release }} | Anime | Manga = {{ #var: $para_release_full }} | VG = | [[{{ #var: $para_release_full }}]] }} }} card "[[{{ #var: $para_page_name }}|{{ #var: $para_pretty_name }}]]" from the {{ #ifeq: {{ #var: $para_release }} | VG | [[Gallery of {{vg|{{ #var: $para_set }}|full=1}} cards|{{ #var: $para_region_full }}]] release of {{ #ifeq: {{ #var: $para_release }} | VG | the video game }} ''[[{{vg|{{ #var: $para_set }}|full=1|link=1}}|{{vg|{{ #var: $para_set }}|full=1}}]]''. | [[Set Card Galleries:{{ #var: $para_pretty_set }} ({{ #var: $para_ocg_tcg }}-{{ #var: $para_region }}{{ #switch: {{ #var: $para_region }} | JP | JA | TC = | #default = {{ #if: {{ #var: $para_edition_abbr }} | -{{ #var: $para_edition_abbr }} | {{ #if: {{ #var: $para_release }} | -1E }} }} }})|{{ #var: $para_region_full }}]] print of ''[[{{ #var: $para_set_full }}|{{ #var: $para_pretty_set }}]]''. }} You can also view a [[Special:Prefixindex/File:{{ #var: $para_url_name }}|list]] {{ #ifeq: {{ #var: $para_url_name }} | {{ #var: $para_old_url_name }} || <span class="cardimageoldname" style="display: none;">([[Special:Prefixindex/File:{{ #var: $para_old_url_name }}|old]])</span> }} {{ #ifexist: Card Gallery:{{ #var: $para_name }} | and [[Card Gallery:{{ #var: $para_name }}|gallery]] }} of all images uploaded for "{{ #var: $para_pretty_name }}".
+
  | Anime
 +
  | Manga    = This is a {{ #if: {{ #pos: {{ #var: $para_alt }} | NC }} | non- }}card image of the {{ #if: {{ #var: $para_rarity_full }} | [[{{ #var: $para_rarity_full }}]] }} {{ #if: {{ #var: $para_edition_full }} | [[{{ #var: $para_edition_full }}]] }} {{ lc: {{ #var: $para_release_full }} }} card "[[{{ #var: $para_page_name }}|{{ #var: $para_pretty_name }}]]".<!-- TODO list the series -->
 +
  | VG      = This is a {{ #if: {{ #pos: {{ #var: $para_alt }} | NC }} | non- }}card image of the {{ #if: {{ #var: $para_rarity_full }} | [[{{ #var: $para_rarity_full }}]] }} {{ #if: {{ #var: $para_edition_full }} | [[{{ #var: $para_edition_full }}]] }} card "[[{{ #var: $para_page_name }}|{{ #var: $para_pretty_name }}]]" from the {{ #if: {{ #var: $para_region }} | [[Gallery of {{vg|{{ #var: $para_set }}|full=1}} cards|{{ #var: $para_region_full }}]] release of the }} video game ''[[{{vg|{{ #var: $para_set }}|full=1|link=1}}|{{vg|{{ #var: $para_set }}|full=1}}]]''.
 +
  | OP      = This is a {{ #if: {{ #pos: {{ #var: $para_alt }} | NC }} | non- }}card image of the {{ #if: {{ #var: $para_rarity_full }} | [[{{ #var: $para_rarity_full }}]] }} {{ #if: {{ #var: $para_edition_full }} | [[{{ #var: $para_edition_full }}]] }} {{ #if: {{ #var: $para_set }} || {{ #var: $para_region_full }} }} [[Official Proxy]] card "[[{{ #var: $para_page_name }}|{{ #var: $para_pretty_name }}]]"{{ #if: {{ #var: $para_set }} |  &#32;from the [[Set Card Galleries:{{ #var: $para_pretty_set }} ({{ #var: $para_ocg_tcg }}-{{ #var: $para_region }}{{ #switch: {{ #var: $para_region }} | JP | JA | SC | TC = | #default = {{ #if: {{ #var: $para_edition_abbr }} | -{{ #var: $para_edition_abbr }} | {{ #if: {{ #var: $para_release }} | -1E }} }} }})|{{ #var: $para_region_full }}]] print of ''[[{{ #var: $para_set_full }}|{{ #var: $para_pretty_set }}]]'' }}.
 +
  | OW      = This is a {{ #if: {{ #pos: {{ #var: $para_alt }} | NC }} | non- }}card image of the {{ #if: {{ #var: $para_rarity_full }} | [[{{ #var: $para_rarity_full }}]] }} {{ #if: {{ #var: $para_edition_full }} | [[{{ #var: $para_edition_full }}]] }} Official Website card "[[{{ #var: $para_page_name }}|{{ #var: $para_pretty_name }}]]".
 +
  | CA      = This is a cropped artwork image of the {{ #if: {{ #var: $para_region_full }} | {{ #var: $para_region_full }} print of the }} card "[[{{ #var: $para_page_name }}|{{ #var: $para_pretty_name }}]]".
 +
  | SAMPLE  = This is a {{ #var: $para_region_full }} SAMPLE card image of the card "[[{{ #var: $para_page_name }}|{{ #var: $para_pretty_name }}]]".
 +
  | #default = This is a {{ #if: {{ #pos: {{ #var: $para_alt }} | NC }} | non- }}card image of the {{ #if: {{ #var: $para_rarity_full }} | [[{{ #var: $para_rarity_full }}]] }} {{ #if: {{ #var: $para_edition_full }} | [[{{ #var: $para_edition_full }}]] }} {{ #if: {{ #var: $para_release_full }} | [[{{ #var: $para_release_full }}]] }} card "[[{{ #var: $para_page_name }}|{{ #var: $para_pretty_name }}]]"{{ #if: {{ #var: $para_set }} | &#32;from the [[Set Card Galleries:{{ #var: $para_pretty_set }} ({{ #var: $para_ocg_tcg }}-{{ #var: $para_region }}{{ #switch: {{ #var: $para_region }} | JP | JA | SC | TC = | #default = {{ #if: {{ #var: $para_edition_abbr }} | -{{ #var: $para_edition_abbr }} | {{ #if: {{ #var: $para_release }} | -1E }} }} }})|{{ #var: $para_region_full }}]] print of ''[[{{ #var: $para_set_full }}|{{ #var: $para_pretty_set }}]]'' }}.
 +
  }} You can also view a [[Special:Prefixindex/File:{{ #var: $para_url_name }}-|list]] {{ #ifeq: {{ #var: $para_url_name }} | {{ #var: $para_old_url_name }} || <span class="cardimageoldname" style="display: none;">([[Special:Prefixindex/File:{{ #var: $para_old_url_name }}|old]])</span> }} {{ #if: {{PROTECTIONEXPIRY:edit|Card Gallery:{{ #var: $para_main_name }}}}<!-- [[wikipedia:Template:Linkless exists]] --> | and [[Card Gallery:{{ #var: $para_main_name }}|gallery]] }} of all images uploaded for "{{ #var: $para_pretty_name }}".
 
}}
 
}}
 
{{ #ifeq: {{ #var: $ns }} | {{NS:6}} |  
 
{{ #ifeq: {{ #var: $ns }} | {{NS:6}} |  
 
== Licensing ==
 
== Licensing ==
{{Fair use|{{ #ifeq: {{ #var: $para_release }} | VG | game-screenshot }}}}
+
{{Fair use|{{ #if: {{{fair_use_type|}}} | {{{fair_use_type}}} | {{ #switch: {{ #var: $para_release }} | VG = game-screenshot | Manga = comic | Anime = tv-screenshot<!-- TODO handle film screenshots too --> }} }}}}
 
+
{{ #ifeq: {{ #var: $para_release }} | VG | [[Category:{{vg|{{ #var: $para_set}}|full=1|link=1}} {{ #if: {{ #pos: {{ #var: $para_alt }} | NC }} | monster | card }} {{ #if: {{ #pos: {{ #var: $para_alt }} | artwork }} | artworks | images }}]] }} }}<!--
{{ #ifeq: {{ #var: $para_release }} | VG | [[Category:{{vg|{{ #var: $para_set}}|full=1}} {{ #ifeq: {{ #var: $para_alt }} | NC | monster | card }} images]] }} }}<!--
 
# Tracking control character:
 
-->{{ #if: {{ #pos: {{{name|}}} | }}
 
      | [[Category:((OCG-TCG card image)) instance of a control character in (((name)))]]
 
  }}<!--
 
 
# misc categories
 
# misc categories
 
-->{{ #switch: {{ #var: $para_set }}
 
-->{{ #switch: {{ #var: $para_set }}
 
       | BAN1 | BAN2 = [[Category:Bandai card images]]
 
       | BAN1 | BAN2 = [[Category:Bandai card images]]
 
   }}{{ #ifeq: {{ #var: $para_release }} | DDM | [[Category:Dungeon Dice Monsters card images]]
 
   }}{{ #ifeq: {{ #var: $para_release }} | DDM | [[Category:Dungeon Dice Monsters card images]]
   }}<noinclude>{{Documentation}}</noinclude>
+
   }}<!--
 +
# track cropped card artworks
 +
-->{{ #switch: {{ #var: $para_release }}
 +
      | CA = [[Category:Cropped card images]]
 +
  }}<!--
 +
# tracking control character
 +
-->{{ #if: {{ #pos: {{ #var: $name }} | ‎ }}
 +
      | [[Category:((OCG-TCG card image)) instance of a control character in (((name)))]]
 +
  }}<!--
 +
# other tracking
 +
-->{{ #if: {{{fair_use_type|}}}
 +
      | [[Category:((OCG-TCG card image)) transclusions using (((fair_use_type)))]]
 +
  }}<!--
 +
# unknown parameters check
 +
-->{{ #invoke: Check for unknown parameters | check
 +
  | unknown = [[Category:Pages using unknown parameter(s) for ((OCG-TCG card image))]]
 +
  | showblankpositional = 1
 +
  | preview = unknown {{tlf|OCG-TCG card image}} parameter "_VALUE_"
 +
  | name | set | region | rarity | edition | release | alt
 +
  | fair_use_type
 +
  | watermark | poor
 +
  }}<noinclude>{{Documentation}}</noinclude>

Latest revision as of 10:55, 9 February 2024

basic variables
variable parameter filename "final"
Name {{{name}}}: Blue-Eyes Ultimate Dragon $fn_name_set: BlueEyesUltimateDragon
$fn_name:
$para_name: Blue-Eyes Ultimate Dragon
$para_pretty_name: Blue-Eyes Ultimate Dragon
$para_page_name: Blue-Eyes Ultimate Dragon
$para_url_name: BlueEyesUltimateDragon
$para_old_url_name: Blue-EyesUltimateDragon
$para_main_name: Blue-Eyes Ultimate Dragon
Set {{{set}}}: $fn_name_set: BlueEyesUltimateDragon
$fn_set:
$para_set:
$para_set_full:
$para_pretty_set:
Region {{{region}}}: $fn_region: EN $para_region: EN
$para_region_full: Worldwide English
Rarity {{{rarity}}}: $fn_rarity: $para_rarity:
$para_rarity_full:
Edition {{{edition}}}: $fn_edition: $para_edition:
$para_edition_abbr:
$para_edition_full:
Release {{{release}}}: $fn_release: CA $para_release: CA
$para_release_full: Card Artwork
Alt {{{alt}}}: $fn_alt:
$fn_alt_2:
$fn_alt_3:
$para_alt:
  • {{{watermark}}}:
  • {{{poor}}}:
  • $ext: png
  • $filename: BlueEyesUltimateDragon-EN-CA
  • $good_ext: png
  • $ns: Template
  • $count: 3
  • $has_article: Blue-Eyes Ultimate Dragon
  • $para_ocg_tcg: TCG
  • $correctimgname: BlueEyesUltimateDragon-EN-CA
  • $correctpagename: BlueEyesUltimateDragon-EN-CA.png
Template documentation[view] [edit] [history] [purge]

{{OCG-TCG card image}} displays information about card images, including links to the card, set, rarity, and edition, as well as links to a prefix search for all images of that card and to the card's gallery page, if one exists. It also adds {{Fair use}} to card images, and in the future, may add categories as well.

This template is ready to use now, and should be added to all new card images as they are uploaded, if they are of a TCG or OCG card. While its functionality may change in the future, its usage will not, so there's no need to worry about current transclusions needing to be updated in the future.

Usage

{{OCG-TCG card image
| name    = 
| set     = 
| region  = 
| rarity  = 
| edition = 
| release = 
| alt     = 
}}
name
The English name of the card.
set
The set prefix as displayed in the card's set number (e.g. TAEV from "TAEV-EN040").
region
The region the card is for. The template can accept either the two-letter region code (JP) or the region name (Japanese). If there is no region code on the card, list it as NA (for "North American region").
rarity
The card's rarity. The template can accept either the rarity abbreviation (ScR) or the full name of the rarity (Secret Rare).
edition
Whether the card is 1st (1E), Unlimited (UE), or Limited (LE) Edition. This parameter should also be used for Duel Terminal Edition (DT) and Strategy (SC) cards.
release
Whether the card is an Official Proxy (OP), Giant Card (GC), Case Topper (CT), or Replica (RP). These values can also be used with the edition parameter, though using release is preferred.
alt
Whether this is an alternate artwork version of the card. This parameter should generally not be needed.

Unused parameters should be deleted.

Maintenance

This template helps automate maintenance in a few ways:

  1. If one or more required parameters isn't supplied, the template outputs an error message with the name of the parameter(s). This means you can simply add "{{OCG-TCG card image}}" to an image and click "Preview" to get a list of parameters.
  2. The template checks to make sure that the value in the "name" parameter points to an actual article, and if not, notifies that the value should be checked. It then checks to make sure the value matches the article's actual name, and notifies if the match fails (this is useful when moving pages around).
  3. When correctly filled out, this template automatically identifies, tags, and categorizes card images that should be renamed to conform with the image policy, saving the tagger (and the administrator renaming the image) some work, since {{Rename media}} doesn't have to be added to or removed from the image.
  4. The template automatically detects non-PNG images and recommends that a PNG version be uploaded and the non-PNG version be tagged for deletion, as recommended by the image policy. This message can be ignored if a PNG version is not known to exist, and the user doesn't know how to create one.

See also