Difference between revisions of "User:Yfmcpxpj/Sandbox"
(Add TOC.) |
(Add test for omitting 2x button.) |
||
Line 1: | Line 1: | ||
− | + | = Yfmcpxpj's Sandbox = | |
− | = 2x comic template test = | + | Sandbox for testing things. |
+ | |||
+ | == 2x comic template test == | ||
Test template: [[User:Yfmcpxpj/Template:comic 2x test]] | Test template: [[User:Yfmcpxpj/Template:comic 2x test]] | ||
Line 7: | Line 9: | ||
Experimental template, adding a "2x" button to automatically link to the double-resolution comic images on xkcd.com. | Experimental template, adding a "2x" button to automatically link to the double-resolution comic images on xkcd.com. | ||
− | == Comics up to and including [[1083]] (no 2x image) == | + | === Comics up to and including [[1083]] (no 2x image) === |
[[1084]] was the first comic to include a 2x image, so comics before that should ''not'' have a "2x" button. | [[1084]] was the first comic to include a 2x image, so comics before that should ''not'' have a "2x" button. | ||
Line 33: | Line 35: | ||
}} | }} | ||
− | == Comics as of [[1084]] == | + | === Comics as of [[1084]] === |
For comics as of [[1084]], insert a "2x" button to link directly to the higher resolution image on xkcd.com. | For comics as of [[1084]], insert a "2x" button to link directly to the higher resolution image on xkcd.com. | ||
Line 57: | Line 59: | ||
| image = server_problem.png | | image = server_problem.png | ||
| titletext = Protip: Annoy Ray Kurzweil by always referring to it as the 'Cybersingularity'. | | titletext = Protip: Annoy Ray Kurzweil by always referring to it as the 'Cybersingularity'. | ||
+ | }} | ||
+ | |||
+ | === Omitting 2x button === | ||
+ | |||
+ | If the 2x button is broken or needs to be omitted for whatever reason, that can be done with the new <code>omit2x</code> parameter. | ||
+ | |||
+ | Code: | ||
+ | |||
+ | <pre> | ||
+ | {{comic | ||
+ | | number = 1085 | ||
+ | | date = July 23, 2012 | ||
+ | | title = ContextBot | ||
+ | | image = contextbot.png | ||
+ | | titletext = If you read all vaguebooking/vaguetweeting with the assumption that they're saying everything they can without revealing classified military information, the internet gets way more exciting. | ||
+ | | omit2x = true | ||
+ | }} | ||
+ | </pre> | ||
+ | |||
+ | Result: | ||
+ | |||
+ | {{comic | ||
+ | | number = 1085 | ||
+ | | date = July 23, 2012 | ||
+ | | title = ContextBot | ||
+ | | image = contextbot.png | ||
+ | | titletext = If you read all vaguebooking/vaguetweeting with the assumption that they're saying everything they can without revealing classified military information, the internet gets way more exciting. | ||
+ | | omit2x = true | ||
}} | }} |
Revision as of 22:03, 11 October 2020
Contents
Yfmcpxpj's Sandbox
Sandbox for testing things.
2x comic template test
Test template: User:Yfmcpxpj/Template:comic 2x test
Experimental template, adding a "2x" button to automatically link to the double-resolution comic images on xkcd.com.
Comics up to and including 1083 (no 2x image)
1084 was the first comic to include a 2x image, so comics before that should not have a "2x" button.
Code:
{{User:Yfmcpxpj/Template:comic 2x test | number = 1083 | date = July 18, 2012 | title = Writing Styles | image = writing_styles.png | titletext = I liked the idea, suggested by h00k on bash.org, of a Twitter bot that messages prominent politicians to tell them when they've unnecessarily used sms-speak abbreviations despite having plenty of characters left. }}
Result:
Comics as of 1084
For comics as of 1084, insert a "2x" button to link directly to the higher resolution image on xkcd.com.
Code:
{{User:Yfmcpxpj/Template:comic 2x test | number = 1084 | date = July 20, 2012 | title = Server Problem | image = server_problem.png | titletext = Protip: Annoy Ray Kurzweil by always referring to it as the 'Cybersingularity'. }}
Result:
Server Problem |
Title text: Protip: Annoy Ray Kurzweil by always referring to it as the 'Cybersingularity'. |
Omitting 2x button
If the 2x button is broken or needs to be omitted for whatever reason, that can be done with the new omit2x
parameter.
Code:
{{comic | number = 1085 | date = July 23, 2012 | title = ContextBot | image = contextbot.png | titletext = If you read all vaguebooking/vaguetweeting with the assumption that they're saying everything they can without revealing classified military information, the internet gets way more exciting. | omit2x = true }}
Result:
Warning: Default sort key "1085" overrides earlier default sort key "1083".