Permanently protected template

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

From Yugipedia
Jump to: navigation, search
(fix for stuff like Akiza Izinski (card) (though note it'll still break horribly when SMW is down, since there's no clean, easy way to fix it in that case))
(fix property names when no series name is given)
 
(20 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{IfSemantics
+
{{ #varexists: $smw || {{ #vardefine: $smw | {{ #if: {{ #set: }} || 1 }} }} }}<!-- standard implementation
| {{
+
-->{{ #vardefine: $ctaama-type | {{ #ifeq: {{{type}}} | Episode | episode | chapter }} }}<!--
    #arraymap: {{{1}}} | , | $x$ | {{
+
-->{{ #vardefine: $ctaama-series | {{{series|}}} }}<!--
      #if: {{ #pos: $x$ | ]] }}
+
-->{{ #vardefine: $ctaama-series-property | {{ #var: $ctaama-series | DM }} }}<!--
      | $x$
+
-->{{ #vardefine: $ctaama-series-suffix | {{ #if: {{{series_page_suffix|}}}
      | [[Yu-Gi-Oh! {{ #if: {{{series|}}} | {{{series}}} }} - {{{type}}} $x$|$x$]]
+
  | {{ #explode: {{{series_page_suffix|}}} | ( }}
    }}
+
  | {{{series|}}}
 
   }}
 
   }}
| {{
+
}}<!--
    #ifexpr: {{ #len: {{{1}}} }} * 35 < 1000
+
-->{{ #arraydefine: @ctaama-episodes | {{{1|}}} | , }}{{ #arrayunique: @ctaama-episodes }}{{ #arrayprint: @ctaama-episodes
    | [[Yu-Gi-Oh! {{ #if: {{{series|}}} | {{{series}}} }} - {{{type}}} {{
+
| ,&#32;
      #replace: {{
+
| $episode
        #replace: {{{1}}}
+
| [[{{ #ifexpr: {{ #len: $episode }} < 4 | Yu-Gi-Oh! {{ #var: $ctaama-series-suffix }} - {{{type}}} }} $episode|$episode]]{{ #if: {{ #var: $smw }}
          | , | @], [$Yu-Gi-Oh! {{ #if: {{{series|}}} | {{{series}}} }} - {{{type}}}&#32;
+
  | {{ #set: {{ #var: $ctaama-series-property }} {{ #var: $ctaama-type }} appearances (linked) | [[{{ #ifexpr: {{ #len: $episode }} < 4 | Yu-Gi-Oh! {{ #var: $ctaama-series-suffix }} - {{{type}}} }} $episode|$episode]] }}[[{{ #var: $ctaama-series-property }} {{ #var: $ctaama-type }} appearances::$episode| ]]
        }}
+
  }}
        | $ | [
+
}}<!--
 +
** Get the earlier date of all appearances **
 +
# Get the first item in the list
 +
-->{{ #vardefine: $ctaama-first | {{ #explode: {{{1}}} | , }} }}<!--
 +
# Get its page
 +
-->{{ #vardefine: $ctaama-first-page
 +
| {{ #ifexpr: {{ #len: {{ #var: $ctaama-first }} }} < 4
 +
  | {{trim|Yu-Gi-Oh! {{ #var: $ctaama-series-suffix }}}} - {{{type}}} {{ #var: $ctaama-first }}
 +
  | {{ #var: $ctaama-first }}
 +
  }}
 +
}}<!--
 +
# Get its release date
 +
-->{{ #vardefine: $ctaama-first-date
 +
| {{ #show: {{ #var: $ctaama-first-page }}
 +
  |?{{ #ifeq: {{{series}}} | Capsule Monsters
 +
    | English air date
 +
    | {{ #ifeq: {{ #var: $ctaama-type }} | episode
 +
      | Japanese air date
 +
      | Japanese release date
 
       }}
 
       }}
      | @ | ]
+
    }}#ISO
    }}]]
+
  }}
    | {{{1}}}
+
}}<!--
 +
# If there is no previously-declared debut date, set this as the debut date
 +
-->{{ #vardefine: $debut_date | {{ #var: $debut_date | {{ #var: $ctaama-first-date | unknown }} }} }}<!--
 +
# Otherwise compare the two dates to see which came first. If previously-declared debut date is unknown, we can't compare.
 +
-->{{ #ifeq: {{ #var: $debut_date }} | unknown
 +
|
 +
|  {{ #ifexpr: {{ #time: U | {{ #var: $ctaama-first-date }} }} < {{ #time: U | {{ #var: $debut_date }} }}
 +
  | {{ #vardefine: $debut_date | {{ #var: $ctaama-first-date }} }}
 
   }}
 
   }}
}}{{
+
}}<!--
  #if: {{{extra|}}} | , {{{extra}}}[[Category:Anime and manga appearances transclusions using extra|{{PAGENAME}}{{NAMESPACE}}]]
+
--><noinclude>
}}{{
 
  #if: {{{extra2|}}} | , {{{extra2}}}[[Category:Anime and manga appearances transclusions using extra2|{{PAGENAME}}{{NAMESPACE}}]]
 
}}<noinclude>
 
 
{{Documentation}}
 
{{Documentation}}
 
</noinclude>
 
</noinclude>

Latest revision as of 17:36, 10 September 2023