Difference between revisions of "Template:series"

Explain xkcd: It's 'cause you're dumb.
Jump to: navigation, search
(Undo revision 377560 by FaviFake (talk))
(Documentation)
 
(64 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>{{#ifeq: {{{series}}} | April |{{{!}} class="wikitable"
+
<includeonly>{{#ifeq: {{{series}}} | April |<!--
 +
 
 +
- APRIL SERIES -->{{{!}} {{{!}} class="wikitable" style="margin-left: 13px; margin-right: 13px;"
 
{{!}}-
 
{{!}}-
{{!}} style="background-color: #ddeeff;"{{!}}<!--
+
! style="background-color: #ddeeff;" {{!}}<span style="font-size: 16px; font-variant: small-caps; font-weight: 600;">{{#if:{{{prev_title|}}}|[[{{{prev_title|}}}|<&nbsp;Previous]]|<!--
 +
 
 +
--> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <!--
 +
 
 +
--> }}<!--
 +
                            --> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <!--
 +
 
 +
                            -->[[:Category:April Fools' Day comics|April&nbsp;Fools'&nbsp;Day&nbsp;comics]]<!--
 +
 
 +
                            --> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {{#if:{{{next_title|}}}|<!--
 +
 
 +
                            -->[[{{{next_title|}}}|Next&nbsp;>]] &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}}</span>
 +
{{!}}-<!--
 +
 
 +
 
 +
 
 +
SECOND ROW-->
 +
{{!}}<!--
 +
 
 +
- Add to cat                  --> {{#ifeq:{{NAMESPACE}}|{{ns:0}}|[[Category:April Fools' Day comics]]}}<!--
 +
 
 +
- Optional replace text      --><center>{{#if:{{{replace_text|}}}|{{#ifeq:{{{replace_text}}}|default|This is the default text of the template|{{{replace_text}}}}}|<!--
  
  - 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}}}
+
  - 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 40: Line 63:
 
  | April 1, 2033 = to honor {{w|April Fools' Day}}
 
  | April 1, 2033 = to honor {{w|April Fools' Day}}
 
  | April 1, 2034 = to honor {{w|April Fools' Day}}
 
  | April 1, 2034 = to honor {{w|April Fools' Day}}
  | #default      = }}}}}}.|}}<!--
+
  | April 1, 2035 = to honor {{w|April Fools' Day}}
 
+
  | April 1, 2036 = to honor {{w|April Fools' Day}}
  - 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 [[April Fools' Day comics|view all April Fools' Day comics]] or [[:Category:April Fools' Day comics|learn more about them]].
+
| April 1, 2038 = to honor {{w|April Fools' Day}}
{{!}}-
+
| April 1, 2039 = to honor {{w|April Fools' Day}}
! <ul style="text-align: center; margin-top:2px; margin-bottom:{{#if:{{{ognumber|}}}|20px|10px}};" class="no-link-underline"><!--
+
| April 1, 2040 = to honor {{w|April Fools' Day}}
 
+
| #default      = }}}}}}.|<!--  
        {{{ognumber}}} is given and not 1, so make a list item and put a button in it that links to #7
 
      -->|<li style="background-color: #FFFFF;
 
              border: 1.5px solid #333333; border-radius: 3px 3px 3px 3px; box-shadow: 0 0 5px 0 gray;
 
              display: inline; font-size: 16px; font-variant: small-caps; font-weight: 600;
 
              margin: 0 4px; padding: 1.5px 0;"><!--
 
 
 
              Now link to #7. Why #7 and not #1? → see [[LiveJournal]]
 
        -->[[7: Girl sleeping (Sketch -- 11th grade Spanish class)|<span style="color: #6E7B91; padding: 0 12px; white-space: nowrap;" title="">&#124;&lt;</span>]]</li><!--
 
 
 
        Let's make the back button!
 
PIPE REMOVED--><li style="background-color: #FFFFF;
 
              border: 1.5px solid #333333; border-radius: 3px 3px 3px 3px; box-shadow: 0 0 5px 0 gray;
 
              display: inline; font-size: 16px; font-variant: small-caps; font-weight: 600;
 
              margin: 0 4px; padding: 1.5px 0;"><!--
 
 
 
              Link to the previous comic
 
          -->[[{{{ogprev|<span style="color:red">ERROR: PREVIOUS NUMBER MISSING.<br><br>PLEASE ADD <code><nowiki>|OGPREV=NUMBER</nowiki></code> TO THE PAGE!<br><br>&nbsp;&nbsp;&nbsp;</span>}}}|<span style="color: #6E7B91; padding: 0 12px;" title="">&lt;&nbsp;Prev&nbsp;&#35;{{{ogprev}}}</span>]]</li><!--
 
 
 
              {{{ognumber}}} is 1, so let's put non-breaking spaces here
 
              -->|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<!--
 
 
 
          Close up shop-->}}}}<!--
 
 
 
          Since we have {{{ognumber}}}, we need to say the original comic number at the center.
 
      -->{{#if:{{{ognumber|}}}|<!--{{#ifexpr:{{{ognumber|1}}}!=1|--><!--
 
 
 
          Ok {{ognumber}} is not 1, go wild!
 
      --><li style="background-color: #FFFFFF;
 
          border: 1.5px solid #333333; border-radius: 3px 3px 3px 3px; box-shadow: 0 0 5px 0 gray;
 
          display: inline; font-size: 16px; font-variant: small-caps; font-weight: 600;
 
          margin: 0 4px; padding: 1.5px 0;" class="plainlinks"><!--
 
 
 
          Depending on whether {{{ognumber}}} is 1 or not, toggle between using wide link mode or number link mode.
 
          Wide link mode requires {{{lappend}}} to be set, while {{{ldomain}}} can default to www
 
          --><!--
 
          NOT USING THESE - [{{#ifexpr:{{{number|-1}}}>=1
 
          NOT USING THESE - Comic number is probably valid, use number link mode
 
          |https://xkcd.com/{{{number}}}
 
          NOT USING THESE - Comic number is invalid or doesn't exist, use wide link mode
 
          |https://{{{ldomain|www}}}.xkcd.com/{{{lappend}}}}}      (This would need another two curly because added another IF statement)
 
 
 
          Ok now generate the number, with ognote if it exists, or else it defaults to "(Original Order)"
 
          -->[[LiveJournal#G|<span style="color: #6E7B91; padding: 0 12px;" title="Click to learn why the original xkcd comics were in a different order!"><!--
 
         
 
          Add ognote in parenthesis
 
          -->&#35;{{{ognumber|}}}&nbsp;{{#if:{{{ognote|}}}|({{#replace:{{{ognote}}}| |&nbsp;}})|(Original&nbsp;Order)}}<!-- Comic&nbsp;&#35;{{{ognumber|}}}&nbsp;<u>(Original&nbsp;order)</u>
 
          --></span>]]}}</li><!--
 
 
 
        Now make the next and >| buttons, provided the {{{ognumber}}} exists
 
      -->{{#ifexist:{{#expr:{{{ognumber|-2}}}+1}}<!--
 
 
 
        Check if this is 55 (which is the latest LiveJournal comic). If it is 55, then don't display the "Next" and >| buttons.
 
        Why #52 and not #LATESTCOMIC? → see [[LiveJournal]]
 
        -->|{{#ifexpr:52-{{{ognumber|1}}}>0<!--
 
  
        {{ognumber}} IS NOT 52, generate the Next and >| buttons
+
- 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]]!}}<!--
        -->|<li style="background-color: #FFFFF;
 
              border: 1.5px solid #333333; border-radius: 3px 3px 3px 3px; box-shadow: 0 0 5px 0 gray;
 
              display: inline; font-size: 16px; font-variant: small-caps; font-weight: 600;
 
              margin: 0 4px; padding: 1.5px 0;"><!--
 
        -->[[{{{ognext|<span style="color:red"><br><br>ERROR: NEXT NUMBER MISSING.<br><br>PLEASE ADD <code><nowiki>|OGNEXT=NUMBER</nowiki></code> TO THE PAGE!<br><br>&nbsp;&nbsp;&nbsp;</span>}}}|<span style="color: #6E7B91; padding: 0 12px;" title="">&#35;{{{ognext}}}&nbsp;Next&nbsp;&gt;</span>]]</li><!--
 
  
        Make a button that points to 55 (which is the latest LiveJournal comic)
+
-->
        --><li style="background-color: #FFFFF;
+
{{!}}}}}</includeonly><noinclude><!--
              border: 1.5px solid #333333; border-radius: 3px 3px 3px 3px; box-shadow: 0 0 5px 0 gray;
 
              display: inline; font-size: 16px; font-variant: small-caps; font-weight: 600;
 
              margin: 0 4px; padding: 1.5px 0;"><!--
 
              -->[[55: Useless{{!}}<span style="color: #6E7B91; padding: 0 12px; white-space: nowrap;" title="">&gt;&#124;</span>]]</li><!--
 
  
        Comic number (plus one) is the latest, so don't show the buttons
 
        The spaces below are needed to make the other buttons look like they're centered even if a portion of the buttons are missing
 
-->|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;              }}|}}</ul>}}</span></center>
 
{{!}}}</includeonly><noinclude><!--
 
  
  
  
  
 +
DOCUMENTATION
  
DOCUMENTATION-->
+
-->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 [[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:
This template is used in the [[:Category:April Fools' Day comics|April Fools' Day comics]] such as [[3074: Push Notifications]]. Example:
 
 
{{series
 
{{series
 
| series        = April
 
| series        = April
| date          = April 1, 2007
 
 
| number        = 2
 
| number        = 2
| days_late    = 55
+
| date          = April 1, 2008
| day_category  = Sunday
+
| days_late    = 4
 +
| day_category  = Tuesday
 
| prev_title    = Syndication
 
| prev_title    = Syndication
 
| prev_date    = April 1, 2007
 
| prev_date    = April 1, 2007
| next_title    = 404: Not Found
+
| next_title    = unixkcd
| next_date    = April 1, 2009
+
| next_date    = April 1, 2010
 
| extra_text    = Hello!
 
| extra_text    = Hello!
 +
| replace_text  =
 
}}
 
}}
  
Line 142: Line 99:
 
<pre><nowiki>{{series
 
<pre><nowiki>{{series
 
| series        = April
 
| series        = April
| date          = April 1, 2007
 
 
| number        = 2
 
| number        = 2
| days_late    = 55
+
| date          = April 1, 2008
| day_category  = Sunday
+
| days_late    = 4
 +
| day_category  = Tuesday
 
| prev_title    = Syndication
 
| prev_title    = Syndication
 
| prev_date    = April 1, 2007
 
| prev_date    = April 1, 2007
| next_title    = 404: Not Found
+
| next_title    = unixkcd
| next_date    = April 1, 2009
+
| next_date    = April 1, 2010
 
| extra_text    = Hello!
 
| extra_text    = Hello!
 +
| replace_text  =
 
}}</nowiki></pre>
 
}}</nowiki></pre>
 
==Documentation==
 
==Documentation==
Line 165: Line 123:
 
| next_date    = April 1, 2009
 
| next_date    = April 1, 2009
 
| extra_text    = Hello!
 
| extra_text    = Hello!
 +
| replace_text  = optional
 
}}
 
}}
 
</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: If not empty, it will replace the entire text with the custom text given. If set to '''<code>default</code>''', it will replace the text with the default for the series. Optional.
  
 
[[Category:Templates]]</noinclude>
 
[[Category:Templates]]</noinclude>

Latest revision as of 14:55, 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 2nd xkcd April Fools' Day comic, released by Randall on April 1, 2008. It was published 4 days late on a Tuesday, deviating from the standard release schedule to honor April Fools' Day. Hello! You can view all April Fools' Day comics or learn more about them!

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  = 
}}

Documentation[edit]

{{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  = optional
}}
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
If not empty, it will replace the entire text with the custom text given. If set to default, it will replace the text with the default for the series. Optional.