Permanently protected template

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

From Yugipedia
Jump to: navigation, search
m (Protected "Template:Card table anime and manga appearances": High traffic page ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite)))
(store the earliest date from all "card table anime and manga appearances" on a page in the $debut_date variable.)
 
Line 8: Line 8:
 
   | {{ #set: {{ #var: $ctaama-series }} {{ #var: $ctaama-type }} appearances (linked) | [[{{ #ifexpr: {{ #len: $episode }} < 4 | Yu-Gi-Oh! {{{series|}}} - {{{type}}} }} $episode|$episode]] }}[[{{ #var: $ctaama-series }} {{ #var: $ctaama-type }} appearances::$episode| ]]
 
   | {{ #set: {{ #var: $ctaama-series }} {{ #var: $ctaama-type }} appearances (linked) | [[{{ #ifexpr: {{ #len: $episode }} < 4 | Yu-Gi-Oh! {{{series|}}} - {{{type}}} }} $episode|$episode]] }}[[{{ #var: $ctaama-series }} {{ #var: $ctaama-type }} appearances::$episode| ]]
 
   }}
 
   }}
}}<noinclude>
+
}}<!--
 +
 
 +
** 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! {{{series|}}}}} - {{{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
 +
  }}
 +
}}<!--
 +
# 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 }} }}
 +
  }}
 +
}}<!--
 +
 
 +
--><noinclude>
 
{{Documentation}}
 
{{Documentation}}
 
</noinclude>
 
</noinclude>

Latest revision as of 22:31, 1 December 2019

Template documentation[view] [edit] [history] [purge]

This template is the root of the "anime and manga appearances" template series, and should not be used directly on articles.

Usage

It accepts two named parameters ({{{series}}} and {{{type}}}) and one comma-delimited, unnamed parameter (input might be e.g. 022, 054, 055, 056, 071).

  • {{{series}}} is the name of the series, minus the standard "Yu-Gi-Oh!" prefix, and must be spelled and capitalized the same way it is in article titles for that series' episode/chapter articles.
  • {{{type}}} should reflect the word used to describe episodes or chapters for that series - for most anime, this should be "Episode", but for manga, it might be "Duel" or something else.

See also

Manga Anime
Metatemplate {{Card table anime and manga appearances}}
General links to articles {{Chapter}}/{{Volume}} {{Episode}}
{{Video game chapter}}