Difference between revisions of "Template:book"

Explain xkcd: It's 'cause you're dumb.
Jump to: navigation, search
(Readability of template restored, for easier future expansion, I think. Don't want to 'fix' what aint broke, though...)
(short-video=yes</code>''' is optional and is use for shorts to remove the number and change background color.)
 
(33 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<includeonly>{{#if:{{{5|}}}|{{yt|{{{1}}}|{{{2}}}|{{{3}}}|{{{4}}}|{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{{5}}}|youtu.be/}}|youtube.com/watch?v=}}|www.}}|http://}}|https://}}|{{{6|}}}}}|
+
<includeonly> {{#if:{{{5|}}}<!--
data-sort-value="{{#expr: 10000*{{formatnum:{{{1|0}}}|R}}+{{formatnum:{{{2|0}}}|R}} }}" style={{#switch:{{{1|}}}
 
|1={{#expr:10000+{{{1|0}}}}}" style="background-color:#9eff9e;"{{!}}Featured in ''[[What If? (book)|What&nbsp;If?]]''
 
|2={{#expr:20000+{{{1|0}}}}}" style="background-color:#ffff88;"{{!}}Featured in ''[[What If? 2|What&nbsp;If?&nbsp;2]]''
 
|3={{#expr:30000+{{{1|0}}}}}" style="background-color:#ffccee;"{{!}}Featured in ''[[What If? 10th Anniversary Edition|What&nbsp;If? 10th Anniversary Edition]]''
 
|4={{#expr:40000+{{{1|0}}}}}" style="background-color:#ffccee;"{{!}}Featured in ''[[What If? Future Edition|What&nbsp;If? Future Edition]]''
 
|#default=-999" style="background-color:#000000;"{{!}}<span class="error">Template used incorrectly. [[Template:book|Click here]] for instructions.</span>}}, '''Chapter&nbsp;{{{2|unknown}}}{{#if:{{{3|}}}|<nowiki>:</nowiki> {{{3}}}}}'''}}</includeonly><noinclude><!--
 
  
-->Used in [[What If? chapters|the ''what if?'' index]]. The title is only needed when different from the blog's.
+
1ST YOUTUBE CASE, TITLE PROVIDED              --> |data-sort-value="{{formatnum:{{#if:{{{1|}}}|{{#if:{{{short-video|}}}|0|{{{1|}}}|0}}|R}}}}" style="background-color: #{{#if:{{{short-video|}}}|ffe3e3|ffc7c7}};"{{!}}{{#if: {{{6|}}}|<!--
  
===Usage===
+
Anchor                                        --><span id="{{#if:{{{short-video|}}}|S|Y}}{{{1|}}}"></span><span id="{{{6|}}}"></span><!--
 +
<!--
 +
- Video number                                -->'''{{#if:{{{short-video|}}}|Short|{{ordinal|{{{1|}}}}}}}'''&nbsp;video,<!--
 +
- Date YYYY-MM-DD                              --> on {{#time:Y&#8209;m&#8209;d|{{{2|}}}-{{{3|}}}-{{{4|}}}}}:<!--
 +
- Hyperlinked YouTube title because provided  --> <span class="plainlinks">'''[https://www.youtube.com/watch?v={{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{{5|dQw4w9WgXcQ}}}|youtu.be/}}|youtube.com/watch?v=}}|www.}}|http://}}|https://}} {{{6|}}}]'''</span>|<!--
 +
 
 +
2ND CASE, TITLE NOT PROVIDED
 +
 
 +
Anchor                                        --><span id="{{#if:{{{short-video|}}}|S|Y}}{{{1|}}}"></span><span id="{{{6|}}}"></span><!--
 +
- Start everything hyperlinked when no title  --><span class="plainlinks">[https://www.youtube.com/watch?v={{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{{5|dQw4w9WgXcQ}}}|youtu.be/}}|youtube.com/watch?v=}}|www.}}|http://}}|https://}}<!--
 +
- Video number                                --> '''{{ordinal|{{{1|}}}}}''' video,<!--
 +
- Date YYYY-MM-DD                              --> on {{#time:Y&#8209;m&#8209;d|{{{2|}}}-{{{3|}}}-{{{4|}}}}}]</span>}}<!--
 +
 
 +
 
 +
BOOKS          --> |data-sort-value="{{#expr: 10000*{{formatnum:{{{1|0}}}|R}}+{{formatnum:{{{2|0}}}|R}} }}" style={{#switch:{{{1|}}}<!--
 +
 
 +
1st book        -->|1="background-color:#9eff9e;"{{!}}<span id="1-{{{2|}}}"></span><span id="1-{{{3|}}}"></span>
 +
''[[What If? (book)|What&nbsp;If?]]''<!--
 +
 
 +
2nd book        -->|2="background-color:#ffff88;"{{!}}<span id="2-{{{2|}}}"></span><span id="2-{{{3|}}}"></span>
 +
''[[What If? 2|What&nbsp;If?&nbsp;2]]''<!--
 +
 
 +
3rd book        -->|3="background-color:#ffccee;"{{!}}<span id="3-{{{2|}}}"></span><span id="3-{{{3|}}}"></span>
 +
Available '''[[What If? 10th Anniversary Edition|exclusively]]''' on ''[[What If? 10th Anniversary Edition|What&nbsp;If? 10th Anniversary Edition]]''<!--
 +
 
 +
4th book?      -->|4="background-color:#bbffee;"{{!}}<span id="4-{{{2|}}}"></span><span id="4-{{{3|}}}"></span>
 +
''[[What If? Future Edition|What&nbsp;If? Future Edition]]''<!--
 +
 
 +
ERROR          -->|#default= "background-color:#000000;"{{!}}<span style="color:#FFFFFF; background:#FF0000">'''[[Template:book#Usage|&nbsp;Template used incorrectly. Click here for instructions.&nbsp;]]'''</span>'''}}<!--
 +
 
 +
Chapter nr.    -->{{#if:{{{3|}}}|, with a different title}}, '''Chapter&nbsp;{{{2|unknown}}}{{#if:{{{3|}}}|<nowiki>:</nowiki> {{{3}}}}}'''}}</includeonly><noinclude><!--
 +
 
 +
 
 +
 
 +
DOCUMENTATION
 +
-->Used in [[What If? chapters|the ''what if?'' index]] for articles featured in one of the books and for YouTube videos. The title is only needed when different from the blog's. See also the {{tl|blog}} template.
 +
 
 +
==Usage==
 
For articles featured in a book:
 
For articles featured in a book:
 
  <nowiki>{{book|WHICH-BOOK|CHAPTER-NUMBER|OPTIONAL-CHAPTER-TITLE}}</nowiki>
 
  <nowiki>{{book|WHICH-BOOK|CHAPTER-NUMBER|OPTIONAL-CHAPTER-TITLE}}</nowiki>
  
 
and for YouTube videos:
 
and for YouTube videos:
  <nowiki>{{yt|YT-NUMBER|YYYY|MM|DD|VIDEO-ID/VIDEO-URL|VIDEO-TITLE-RECOMMENDED}}</nowiki>
+
  <nowiki>{{book|YT-NUMBER|YYYY|MM|DD|</nowiki><font color="SeaGreen">'''''<nowiki>https://youtube.link (or video-ID)</nowiki>'''''</font>|VIDEO-TITLE|short-video=yes}}
  
===Examples===
+
'''<code>short-video=yes</code>''' is optional and is use for shorts to remove the number and change background color.
For articles featured in a book:
 
  
 +
==Examples book chapters==
 
  <nowiki>{{book|2|69}}</nowiki>
 
  <nowiki>{{book|2|69}}</nowiki>
 
   
 
   
Line 24: Line 55:
 
   
 
   
 
  {{book|2|69}}
 
  {{book|2|69}}
 
 
and
 
and
 +
<nowiki>{{book|1|69|Lightning Stike}}</nowiki>
 +
 +
'''''Produces:'''''
 +
 +
{{book|1|69|Lightning Stike}}
 +
and
 +
<nowiki>{{book}}</nowiki>
 +
 +
'''''Produces:'''''
 +
 +
{{book}}
  
  <nowiki>{{book|1|69|Different Title in the Books}}</nowiki>
+
==Examples for a YouTube video==
 +
  <nowiki>{{book|</nowiki><font color="SeaGreen">'''''2'''''</font>|<font color="SeaGreen">'''''2022'''''</font>|<font color="SeaGreen">'''''12'''''</font>|<font color="SeaGreen">'''''31'''''</font>|<font color="SeaGreen">'''''https://www.youtube.com/watch?v=2LSyNhb5Y'''''</font>|<font color="SeaGreen">'''''What if everyone pointed a laser at the moon?'''''</font>}}
 
   
 
   
 
  '''''Produces:'''''
 
  '''''Produces:'''''
 
   
 
   
  {{book|1|69|Different Title in the Books}}
+
  {{book|2|2022|12|31|https://www.youtube.com/watch?v=2LSyNhb5Y|What if everyone pointed a laser at the moon?}}
 +
 
 +
<u>'''If you want, for a YouTube video you can also use the <font color="SeaGreen">VIDEO-ID</font> instead of the link.''' The link is usually enough. Here's how to get the '''<font color="SeaGreen">VIDEO-ID</font>'''</u>
  
and, for YouTube videos:
+
1. Open the YouTube video and look at the link. it will look something like this:
  <nowiki>{{book|12|2022|12|31|https://youtu.be/JqFSGkFPipM|What if everyone pointed a laser at the moon?}}</nowiki>
+
<span class="plainlinks">https://www.youtube.com/watch?v=<font color="SeaGreen">'''''3EI08o-IGYk'''''</font>
 +
<span class="plainlinks">https://youtu.be/<font color="SeaGreen">'''''3EI08o-IGYk'''''</font></span>
 +
<span class="plainlinks">https://youtu.be/<font color="SeaGreen">'''''3EI08o-IGYk'''''</font>?si=gdSF3nIlctPPFbd2</span>
 +
 
 +
2. The green part is the <font color="SeaGreen">'''''VIDEO-ID'''''</font> you can use. Example
 +
  <nowiki>{{book|</nowiki><font color="SeaGreen">'''''2'''''</font>|<font color="SeaGreen">'''''2022'''''</font>|<font color="SeaGreen">'''''12'''''</font>|<font color="SeaGreen">'''''31'''''</font>|<font color="SeaGreen">'''''2LSyNhb5Y'''''</font>|<font color="SeaGreen">'''''What if everyone pointed a laser at the moon?'''''</font>}}
 
   
 
   
  '''''Produces:'''''
+
  '''Produces:'''
 
   
 
   
  {{book|12|2023|12|31|https://youtu.be/JqFSGkFPipM|What if everyone pointed a laser at the moon?}}
+
  {{book|2|2022|12|31|2LSyizrk8-0|What if everyone pointed a laser at the moon?}}
  
  
Line 52: Line 101:
 
|-
 
|-
 
!1
 
!1
| 2012‑07‑10 || [[File:Relativistic Baseball.png|100px]] || '''{{what if|1|Relativistic Baseball}}''' || ''"What would happen if you tried to hit a baseball pitched at 90% the speed of light?"'' || The result would be some kind of nuclear explosion, and possibly a ruling of "hit by pitch". || {{book|1|9|Jellyfish Power}} ||
+
| 2012‑07‑10 || [[File:Relativistic Baseball.png|100px]] || '''{{what if|1|Relativistic Baseball}}''' || ''"What would happen if you tried to hit a baseball pitched at 90% the speed of light?"'' || The result would be some kind of nuclear explosion, and possibly a ruling of "hit by pitch". || {{book|1|9}} ||
 
|-
 
|-
 
!2
 
!2
| 2012‑07‑10<br>0w later || [[File:SAT Guessing.png|100px]] || '''{{what if|2|SAT Guessing}}''' || ''"What if everyone who took the SAT guessed on every multiple‑choice question? How many perfect scores would there be?"'' || No one would get a perfect score. No one would get a perfect score. No one would get a perfect score. No one would get a perfect score. No one would get a perfect scoNo one would get a perfect score. No one would get a perfect score. No one would get a perfect score. || {{book|2|69|Jellyfish Power}} ||
+
| 2012‑07‑10<br>0w later || [[File:SAT Guessing.png|100px]] || '''{{what if|2|SAT Guessing}}''' || ''"What if everyone who took the SAT guessed on every multiple‑choice question? How many perfect scores would there be?"'' || No one would get a perfect score. No one would get a perfect score. No one would get a perfect score. No one would get a perfect score. No one would get a perfect scoNo one would get a perfect score. No one would get a perfect score. No one would get a perfect score. || {{book|2|69}} ||
 
|-
 
|-
 
!3
 
!3
| 2012‑07‑17<br>1w later || [[File:Yoda.png|100px]] || '''{{what if|3|Yoda}}''' || ''"How much Force power can Yoda output?"'' || First regular release. From here on standard release day was Tuesday. It's about 19.2 kilowatts, or 25 horsepower. || {{book|3|420|I three disagree!}} ||{{yt|8|2032|9|22|JqFSGkFPipM}}
+
| 2012‑07‑17<br>1w later || [[File:Yoda.png|100px]] || '''{{what if|3|Yoda}}''' || ''"How much Force power can Yoda output?"'' || First regular release. From here on standard release day was Tuesday, it's about 19.2 kilowatts, or 25 horsepower. || {{book|3|420!}} ||{{book|8|2032|9|22|JqFSGkFPipM}}
 
|-
 
|-
 
!4
 
!4
| 2012‑07‑24<br>1w later || [[File:A Moles of Moles.png|100px]] || '''{{what if|4|A Mole of Moles}}''' || ''"What would happen if you were to gather a mole (unit of measurement) of moles (the small furry critter) in one place?"'' || As a mole is such a high number this would be tricky. They would condense into a pressurized sphere of meat that would freeze and occasionally explode from gases. || {{book|4|64|Jellyfish Power}} || {{book|145|2019|4|2|https://youtu.be/dQw4w9WgXcQ|Jellyfish Power}}
+
| 2012‑07‑24<br>1w later || [[File:A Moles of Moles.png|100px]] || '''{{what if|4|A Mole of Moles}}''' || ''"What would happen if you were to gather a mole (unit of measurement) of moles (the small furry critter) in one place?"'' || As a mole is such a high number this would be tricky. They would condense into a pressurized sphere of meat that would freeze and occasionally explode from gases. || {{book|4|64}} || {{book|145|2019|4|2|https://youtu.be/dQw4w9WgXcQ|Jellyfish Power}}
 
|-
 
|-
 
!5
 
!5
| 2012‑07‑31<br>1w later || [[File:Robot Apocalypse.png|100px]] || '''{{what if|5|Robot Apocalypse}}''' || ''"What if there was a robot apocalypse? How long would humanity. What if there was a robot apocalypse? How long would humanity last?"'' || Humanity would survive if the robots cared about keeping themselves alive as well. If not, then we all die. || || {{book|11|2023|12|31|JqFSGkFPipM}}
+
| 2012‑07‑31<br>1w later || [[File:Robot Apocalypse.png|100px]] || '''{{what if|5|Robot Apocalypse}}''' || ''"What if there was a robot apocalypse? How long would humanity. What if there was a robot apocalypse? How long would humanity last?"'' || Humanity would survive if the robots cared about keeping themselves alive as well. If not, then we all die. || {{book|1|9|Jellyfish Power}}|| {{book|11|2023|12|31|JqFSGkFPipM}}
 
|-
 
|-
 
!6
 
!6
| 2012‑08‑07<br>1w later || [[File:Glass Half Empty.png|100px]] || '''{{what if|6|Glass Half Empty}}''' || ''"What if a glass of water was, all of a sudden, literally half empty?"'' || As in a vacuum? Which half are you talking about? If the vacuum is on the bottom, it would explode, but if it's on the top, the air rushes in and it becomes normal water. || || {{book|3|2023|12|31|JqFSGkFPipM}}
+
| 2012‑08‑07<br>1w later || [[File:Glass Half Empty.png|100px]] || '''{{what if|6|Glass Half Empty}}''' || ''"What if a glass of water was, all of a sudden, literally half empty?"'' || As in a vacuum? Which half are you talking about? If the vacuum is on the bottom, it would explode, but if it's on the top, the air rushes in and it becomes normal water. || {{book|2|69|Jellyfish Power}} || {{book|3|2023|12|31|JqFSGkFPipM}}
 
|-
 
|-
 
!7
 
!7
| 2012‑08‑14<br>1w later || [[File:Everybody Out.png|100px]] || '''{{what if|7|Everybody Out}}''' || ''"Is there enough energy to move the entire current human population off‑planet?"'' || No, at least not without starving to death quickly and leaving our pets, belongings No, at least not without No, at least not without starving to death quickly and leaving our pets, belongings, and everything else behind. || || {{book|3|2023|12|31|https://youtu.be/JqFSGkFPipM|abc}}
+
| 2012‑08‑14<br>1w later || [[File:Everybody Out.png|100px]] || '''{{what if|7|Everybody Out}}''' || ''"Is there enough energy to move the entire current human population off‑planet?"'' || No, at least not without starving to death quickly and leaving our pets, belongings No, at least not without No, at least not without starving to death quickly and leaving our pets, belongings, and everything else behind. || {{book|4|64|Jellyfish Power}} || {{book|3|2023|12|31|https://youtu.be/JqFSGkFPipM|abc}}
 
|-
 
|-
 
!8
 
!8
| 2012‑08‑21<br>1w later || [[File:Everybody Jump.png|100px]] || '''{{what if|8|Everybody Jump}}''' || ''"What would happen if everyone on earth stood as close to each other as they could and jumped, everyone landing on the ground at the same instant?"'' || Earth would be unaffected but the human race would probably be wiped out due to everyone trying to get home at the same time. ERROR EXPECTED: || {{book|Error}}||
+
| 2012‑08‑21<br>1w later || [[File:Everybody Jump.png|100px]] || '''{{what if|8|Everybody Jump}}''' || ''"What would happen if everyone on earth stood as close to each other as they could and jumped, everyone landing on the ground at the same instant?"'' || Earth would be unaffected but the human race would probably be wiped out due to everyone trying to get home at the same time. ERROR MESSAGE EXPECTED. || {{book}} || {{book|2|2022|12|31|https://www.youtube.com/watch?v=2LSyNhb5Y|What if everyone pointed a laser at the moon?}}
 
|-
 
|-
 
[[Category:Templates]]</noinclude>
 
[[Category:Templates]]</noinclude>

Latest revision as of 10:26, 27 July 2025

Used in the what if? index for articles featured in one of the books and for YouTube videos. The title is only needed when different from the blog's. See also the {{blog}} template.

Usage[edit]

For articles featured in a book:

{{book|WHICH-BOOK|CHAPTER-NUMBER|OPTIONAL-CHAPTER-TITLE}}

and for YouTube videos:

{{book|YT-NUMBER|YYYY|MM|DD|https://youtube.link (or video-ID)|VIDEO-TITLE|short-video=yes}}

short-video=yes is optional and is use for shorts to remove the number and change background color.

Examples book chapters[edit]

{{book|2|69}}

Produces:

 data-sort-value="20069" style="background-color:#ffff88;"|

What If? 2, Chapter 69 and

{{book|1|69|Lightning Stike}}

Produces:

 data-sort-value="10069" style="background-color:#9eff9e;"|

What If?, with a different title, Chapter 69: Lightning Stike and

{{book}}

Produces:

 data-sort-value="0" style="background-color:#000000;"| Template used incorrectly. Click here for instructions. , Chapter unknown

Examples for a YouTube video[edit]

{{book|2|2022|12|31|https://www.youtube.com/watch?v=2LSyNhb5Y|What if everyone pointed a laser at the moon?}}

Produces:

 data-sort-value="2" style="background-color: #ffc7c7;"|if everyone pointed a laser at the moon? 2nd video, on 2022‑12‑31

If you want, for a YouTube video you can also use the VIDEO-ID instead of the link. The link is usually enough. Here's how to get the VIDEO-ID

1. Open the YouTube video and look at the link. it will look something like this:

https://www.youtube.com/watch?v=3EI08o-IGYk
https://youtu.be/3EI08o-IGYk
https://youtu.be/3EI08o-IGYk?si=gdSF3nIlctPPFbd2

2. The green part is the VIDEO-ID you can use. Example

{{book|2|2022|12|31|2LSyNhb5Y|What if everyone pointed a laser at the moon?}}

Produces:

 data-sort-value="2" style="background-color: #ffc7c7;"|2nd video, on 2022‑12‑31: What if everyone pointed a laser at the moon?


N Date Thumbnail Title Reader's question Randall's answer Book YouTube
1 2012‑07‑10 Relativistic Baseball.png Relativistic Baseball "What would happen if you tried to hit a baseball pitched at 90% the speed of light?" The result would be some kind of nuclear explosion, and possibly a ruling of "hit by pitch".

What If?, Chapter 9 ||

2 2012‑07‑10
0w later
SAT Guessing.png SAT Guessing "What if everyone who took the SAT guessed on every multiple‑choice question? How many perfect scores would there be?" No one would get a perfect score. No one would get a perfect score. No one would get a perfect score. No one would get a perfect score. No one would get a perfect scoNo one would get a perfect score. No one would get a perfect score. No one would get a perfect score.

What If? 2, Chapter 69 ||

3 2012‑07‑17
1w later
Yoda.png Yoda "How much Force power can Yoda output?" First regular release. From here on standard release day was Tuesday, it's about 19.2 kilowatts, or 25 horsepower.

Available exclusively on What If? 10th Anniversary Edition, Chapter 420! || data-sort-value="8" style="background-color: #ffc7c7;"|8th video, on 2032‑09‑22

4 2012‑07‑24
1w later
A Moles of Moles.png A Mole of Moles "What would happen if you were to gather a mole (unit of measurement) of moles (the small furry critter) in one place?" As a mole is such a high number this would be tricky. They would condense into a pressurized sphere of meat that would freeze and occasionally explode from gases.

What If? Future Edition, Chapter 64 || data-sort-value="145" style="background-color: #ffc7c7;"|145th video, on 2019‑04‑02: Jellyfish Power

5 2012‑07‑31
1w later
Robot Apocalypse.png Robot Apocalypse "What if there was a robot apocalypse? How long would humanity. What if there was a robot apocalypse? How long would humanity last?" Humanity would survive if the robots cared about keeping themselves alive as well. If not, then we all die.

What If?, with a different title, Chapter 9: Jellyfish Power|| data-sort-value="11" style="background-color: #ffc7c7;"|11th video, on 2023‑12‑31

6 2012‑08‑07
1w later
Glass Half Empty.png Glass Half Empty "What if a glass of water was, all of a sudden, literally half empty?" As in a vacuum? Which half are you talking about? If the vacuum is on the bottom, it would explode, but if it's on the top, the air rushes in and it becomes normal water.

What If? 2, with a different title, Chapter 69: Jellyfish Power || data-sort-value="3" style="background-color: #ffc7c7;"|3rd video, on 2023‑12‑31

7 2012‑08‑14
1w later
Everybody Out.png Everybody Out "Is there enough energy to move the entire current human population off‑planet?" No, at least not without starving to death quickly and leaving our pets, belongings No, at least not without No, at least not without starving to death quickly and leaving our pets, belongings, and everything else behind.

What If? Future Edition, with a different title, Chapter 64: Jellyfish Power || data-sort-value="3" style="background-color: #ffc7c7;"|3rd video, on 2023‑12‑31: abc

8 2012‑08‑21
1w later
Everybody Jump.png Everybody Jump "What would happen if everyone on earth stood as close to each other as they could and jumped, everyone landing on the ground at the same instant?" Earth would be unaffected but the human race would probably be wiped out due to everyone trying to get home at the same time. ERROR MESSAGE EXPECTED.  Template used incorrectly. Click here for instructions. , Chapter unknown if everyone pointed a laser at the moon? 2nd video, on 2022‑12‑31