Permanently protected template

Difference between revisions of "Template:Card table sets"

From Yugipedia
Jump to: navigation, search
(fix region for Korean)
(try out some expansion depth minification and other (hopefully) improvements)
Line 69: Line 69:
 
-->{{ #vardefine: $cts-name    | {{unlink|{{ #explode: $cts-release | ; | 1 }}}} }}<!--
 
-->{{ #vardefine: $cts-name    | {{unlink|{{ #explode: $cts-release | ; | 1 }}}} }}<!--
 
-->{{ #vardefine: $cts-rarities | {{ #explode: $cts-release | ; | 2 }} }}<!--
 
-->{{ #vardefine: $cts-rarities | {{ #explode: $cts-release | ; | 2 }} }}<!--
 +
 +
-->{{ #vardefine: $cts-number | {{ #if: {{ #pos: {{ #var: $cts-number }} | ? }}
 +
  | {{ #var: $cts-number }}
 +
  | {{ #ifeq: {{ uc: {{ #var: $cts-number }} }} | N/A || [[{{ #var: $cts-number }}]] }}
 +
  }}
 +
}}<!--
  
 
-->{{ #vardefine: $cts-rarities | {{ #if: {{ #pos: {{ #var: $cts-rarities }} | , }}
 
-->{{ #vardefine: $cts-rarities | {{ #if: {{ #pos: {{ #var: $cts-rarities }} | , }}
Line 78: Line 84:
 
}}<!--
 
}}<!--
  
-->{{ #ifeq: {{ #var: $cts-ln }} | en
+
-->{{ #switch: {{ #var: $cts-rg }}
| {{ #ifeq: {{ #var: $cts-region }} | Asian-English
+
| en | na | eu | au = {{ #vardefine: $cts-region
  || {{ #vardefine: $cts-region
+
  | {{ #switch: {{ #sub: {{ #sub: {{ #explode: {{ #var: $cts-number }} | - | 1 }} | 0 | -3 }} || 2 }}
    | {{ #switch: {{ #sub: {{ #sub: {{ #explode: {{ #var: $cts-number }} | - | 1 }} | 0 | -3 }} || 2 }}
+
    | EN = English (EN)
      | EN = English (EN)
+
    | E  = English (E)
      | E  = English (E)
+
    | A  = English (A)
      | A  = English (A)
+
    |    = English (NA)
      |    = English (NA)
+
    | #default = {{ #var: $cts-region }}
      | #default = {{ #var: $cts-region }}
 
      }}
 
 
     }}
 
     }}
 
   }}
 
   }}
Line 106: Line 110:
 
}}-->
 
}}-->
 
  <tr>
 
  <tr>
   <td title="{{ #ifeq: {{ #var: $cts-name }} | ??? || {{ #if: {{ #var: $cts-date }} | {{ #time: F j, Y | {{ #var: $cts-date }} }} }} }}"><!--
+
   <td title="{{ #if: {{ #var: $cts-date }} | {{ #time: F j, Y | {{ #var: $cts-date }} }} }}">{{ #var: $cts-date }} </td>
  -->{{ #ifeq: {{ #var: $cts-name }} | ??? || {{ #var: $cts-date }} }} </td>
+
   <td>{{ #var: $cts-number }} </td>
   <td>{{ #if: {{ #pos: {{ #var: $cts-number | ? }} | ? }}{{ #ifeq: {{ uc: {{ #var: $cts-number }} }} | N/A | 1 }} | {{ #var: $cts-number }} | [[{{ #var: $cts-number }}]] }} </td>
 
 
   <td>{{ #if: {{ #var: $cts-name }} | {{ #ifeq: {{ #var: $cts-name }} | ??? | ??? | [[{{ #var: $cts-name }}|{{ #var: $cts-en-name | {{ #var: $cts-trans-name | {{ #var: $cts-name }} }} }}]] }} }}</td>
 
   <td>{{ #if: {{ #var: $cts-name }} | {{ #ifeq: {{ #var: $cts-name }} | ??? | ??? | [[{{ #var: $cts-name }}|{{ #var: $cts-en-name | {{ #var: $cts-trans-name | {{ #var: $cts-name }} }} }}]] }} }}</td>
 
{{ #ifeq: {{ #var: $cts-lang }} | English ||
 
{{ #ifeq: {{ #var: $cts-lang }} | English ||
   <td lang="{{ #var: $cts-ln }}">{{ #ifeq: {{ #var: $cts-name }} | ??? || {{ #var: $cts-local-name }} }} </td>
+
   <td lang="{{ #var: $cts-ln }}">{{ #var: $cts-local-name }} </td>
 
}}
 
}}
 
   <td>{{ #var: $cts-rarities }}</td>
 
   <td>{{ #var: $cts-rarities }}</td>

Revision as of 04:59, 22 January 2019

English
Release Number Set Rarity
[[{{{1}}}]] [[Cite error: Invalid <ref> tag; refs with no name must have content]]