Difference between revisions of "Template:series"

Explain xkcd: It's 'cause you're dumb.
Jump to: navigation, search
(new feature)
Line 22: Line 22:
 
{{!}}<!--
 
{{!}}<!--
  
  - Add to cat   --> {{#ifeq:{{NAMESPACE}}|{{ns:0}}|[[Category:April Fools' Day comics]]}}<!--
+
  - Add to cat                 --> {{#ifeq:{{NAMESPACE}}|{{ns:0}}|[[Category:April Fools' Day comics]]}}<!--
  
  - Start        --><center>This is the {{ordinal|{{{number|}}}}} [[xkcd]] [[April Fools' Day comics|April Fools' Day comic]], released by [[Randall Munroe|Randall]]{{#if:{{{date|}}}|&nbsp;on {{{date}}}|}}. {{#if:{{{day_category|}}}|It was {{#if:{{{days_late|}}}|published {{{days_late}}} days late|}} [[:Category:{{{day_category}}} comics|{{#if:{{{days_late|}}}||published}} on a {{{day_category}}}]]{{#switch: {{{day_category}}}
+
  - Optional replace text      --><center>{{#if:{{{replace_text|}}}|{{#ifeq:{{{replace_text}}}|default|This is the default text of the template|{{{replace_text}}}}}|<!--
 +
 
 +
- Start                      -->This is the {{ordinal|{{{number|}}}}} [[xkcd]] [[April Fools' Day comics|April Fools' Day comic]], released by [[Randall Munroe|Randall]]{{#if:{{{date|}}}|&nbsp;on {{{date}}}|}}. {{#if:{{{day_category|}}}|It was {{#if:{{{days_late|}}}|published {{{days_late}}} days late|}} [[:Category:{{{day_category}}} comics|{{#if:{{{days_late|}}}||published}} on a {{{day_category}}}]]{{#switch: {{{day_category}}}
 
  | Monday  = , following the [[:Category:Comics by weekday|standard release schedule]]
 
  | Monday  = , following the [[:Category:Comics by weekday|standard release schedule]]
 
  | Wednesday= , following the [[:Category:Comics by weekday|standard release schedule]]
 
  | Wednesday= , following the [[:Category:Comics by weekday|standard release schedule]]
Line 68: Line 70:
 
  | #default      = }}}}}}.|<!--  
 
  | #default      = }}}}}}.|<!--  
  
  - Explain the previous/next            --> The {{#if:{{{prev_title|}}}|previous one ([[{{{prev_title}}}]]) was released on {{{prev_date}}}{{#if:{{{next_title|}}}|, while the|.}}|}} {{#if:{{{next_title|}}}| next one ([[{{{next_title}}}]]) was released on {{{next_date}}}.}}|}} {{#if:{{{extra_text|}}}|{{{extra_text}}} }} You can [[:Category:April Fools' Day comics|view&nbsp;all&nbsp;April&nbsp;Fools'&nbsp;Day&nbsp;comics]] or [[April Fools' Day comics|learn&nbsp;more&nbsp;about&nbsp;them]]!<!--
+
  - Explain the previous/next            --> The {{#if:{{{prev_title|}}}|previous one ([[{{{prev_title}}}]]) was released on {{{prev_date}}}{{#if:{{{next_title|}}}|, while the|.}}|}} {{#if:{{{next_title|}}}| next one ([[{{{next_title}}}]]) was released on {{{next_date}}}.}}|}} {{#if:{{{extra_text|}}}|{{{extra_text}}} }} You can [[:Category:April Fools' Day comics|view&nbsp;all&nbsp;April&nbsp;Fools'&nbsp;Day&nbsp;comics]] or [[April Fools' Day comics|learn&nbsp;more&nbsp;about&nbsp;them]]!}}<!--
  
 
-->
 
-->
Line 91: Line 93:
 
| next_date    = April 1, 2010
 
| next_date    = April 1, 2010
 
| extra_text    = Hello!
 
| extra_text    = Hello!
 +
| replace_text  = default
 
}}
 
}}
  
Line 105: Line 108:
 
| next_date    = April 1, 2010
 
| next_date    = April 1, 2010
 
| extra_text    = Hello!
 
| extra_text    = Hello!
 +
| replace_text  = default
 
}}</nowiki></pre>
 
}}</nowiki></pre>
 
==Documentation==
 
==Documentation==
Line 119: Line 123:
 
| next_date    = April 1, 2009
 
| next_date    = April 1, 2009
 
| extra_text    = Hello!
 
| extra_text    = Hello!
 +
| replace_text  = no
 
}}
 
}}
 
</pre>
 
</pre>
; series
+
; series: Specifies which series this comic belongs to. Currently, only '''<code>April</code>''' is supported, which refers to the [[April Fools' Day comics]] by Randall.
 
 
: Specifies which series this comic belongs to. Currently, only '''<code>April</code>''' is supported, which refers to the [[April Fools' Day comics]] by Randall.
 
 
 
; date
 
 
 
: The release date of this comic, e.g., '''<code>April 1, 2008</code>'''. This is shown after Randall Munroe's name. Optional.
 
 
 
; number
 
 
 
: The ordinal number of this comic in the series. For example, '''<code>4</code>''' if it's the fourth April Fools' Day comic. Must be a number.
 
 
 
; days_late
 
 
 
: The number of days this comic was released after its intended date. If provided alone, the text will say it was released that many days late. Optional.
 
 
 
; day_category
 
 
 
: A category label such as '''<code>Monday</code>''' or '''<code>Friday</code>''' (without the word "comics") used to link to a category like [[:Category:Friday comics]]. If given in addition to '''<code>days_late</code>''', it will say the comic was released '''<code>X days late on a Y</code>'''.
 
  
; prev_title
+
; date: The release date of this comic, e.g., '''<code>April 1, 2008</code>'''. This is shown after Randall Munroe's name. Optional.
  
: The title of the previous comic in the series, e.g., '''<code>2915: Lab Report</code>'''. This will be linked as the prior entry in the sequence. Optional.
+
; number: The ordinal number of this comic in the series. For example, '''<code>4</code>''' if it's the fourth April Fools' Day comic. Must be a number.
  
; prev_date
+
; days_late: The number of days this comic was released after its intended date. If provided alone, the text will say it was released that many days late. Optional.
  
: The release date of the previous comic. Required if '''<code>prev_title</code>''' is provided, to show when it came out.
+
; day_category: A category label such as '''<code>Monday</code>''' or '''<code>Friday</code>''' (without the word "comics") used to link to a category like [[:Category:Friday comics]]. If given in addition to '''<code>days_late</code>''', it will say the comic was released '''<code>X days late on a Y</code>'''.
  
; next_title
+
; prev_title: The title of the previous comic in the series, e.g., '''<code>2915: Lab Report</code>'''. This will be linked as the prior entry in the sequence. Optional.
  
: The title of the next comic in the series, e.g., '''<code>2917: AI Future</code>'''. Optional. Adds a forward navigation link.
+
; prev_date: The release date of the previous comic. Required if '''<code>prev_title</code>''' is provided, to show when it came out.
  
; next_date
+
; next_title: The title of the next comic in the series, e.g., '''<code>2917: AI Future</code>'''. Optional. Adds a forward navigation link.
  
: The release date of the next comic. Required if '''<code>next_title</code>''' is provided, to show when it came out.
+
; next_date: The release date of the next comic. Required if '''<code>next_title</code>''' is provided, to show when it came out.
  
; extra_text
+
; extra_text: Any additional sentences to be display at the end of the main description, such as the text '''<code>Hello!</code>''' in the example above. Optional.
  
: Any additional sentences to be display at the end of the main description, such as the text '''<code>Hello!</code>''' in the example above. Optional.
+
; replace_text: Only if set to '''<code>yes</code>''', it will replace the text with what
  
 
[[Category:Templates]]</noinclude>
 
[[Category:Templates]]</noinclude>

Revision as of 14:52, 31 July 2025

This template is used on all the comics in Category:April Fools' Day comics. It allows you to browse the April Fools' Day comics comics in order and contains detailed information about their release. You can learn more about the April Fools' Day comics here. An aexmaple of such a comic is 3074: Push Notifications. Here's the template for 404: Not Found as an example:

< Previous                 April Fools' Day comics                 Next >      
This is the default text of the template

The example above was generated by:

{{series
| series        = April
| number        = 2
| date          = April 1, 2008
| days_late     = 4
| day_category  = Tuesday
| prev_title    = Syndication
| prev_date     = April 1, 2007
| next_title    = unixkcd
| next_date     = April 1, 2010
| extra_text    = Hello!
| replace_text  = default
}}

Documentation

{{series
| series        = April
| date          = April 1, 2007
| number        = 2
| days_late     = 55
| day_category  = Sunday
| prev_title    = Syndication
| prev_date     = April 1, 2007
| next_title    = 404: Not Found
| next_date     = April 1, 2009
| extra_text    = Hello!
| replace_text  = no
}}
series
Specifies which series this comic belongs to. Currently, only April is supported, which refers to the April Fools' Day comics by Randall.
date
The release date of this comic, e.g., April 1, 2008. This is shown after Randall Munroe's name. Optional.
number
The ordinal number of this comic in the series. For example, 4 if it's the fourth April Fools' Day comic. Must be a number.
days_late
The number of days this comic was released after its intended date. If provided alone, the text will say it was released that many days late. Optional.
day_category
A category label such as Monday or Friday (without the word "comics") used to link to a category like Category:Friday comics. If given in addition to days_late, it will say the comic was released X days late on a Y.
prev_title
The title of the previous comic in the series, e.g., 2915: Lab Report. This will be linked as the prior entry in the sequence. Optional.
prev_date
The release date of the previous comic. Required if prev_title is provided, to show when it came out.
next_title
The title of the next comic in the series, e.g., 2917: AI Future. Optional. Adds a forward navigation link.
next_date
The release date of the next comic. Required if next_title is provided, to show when it came out.
extra_text
Any additional sentences to be display at the end of the main description, such as the text Hello! in the example above. Optional.
replace_text
Only if set to yes, it will replace the text with what