Editing User:Yfmcpxpj/Sandbox
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
+ | = Yfmcpxpj's Sandbox = | ||
+ | |||
Sandbox for testing things. | Sandbox for testing things. | ||
− | = 2x comic template test = | + | == 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 | + | === 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: | Code: | ||
Line 59: | Line 35: | ||
}} | }} | ||
− | == Comics | + | === 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: | Code: | ||
Line 67: | Line 43: | ||
<pre> | <pre> | ||
{{User:Yfmcpxpj/Template:comic 2x test | {{User:Yfmcpxpj/Template:comic 2x test | ||
− | | date = | + | | number = 1084 |
− | | title = | + | | date = July 20, 2012 |
− | | image = | + | | title = Server Problem |
− | | | + | | image = server_problem.png |
− | + | | titletext = Protip: Annoy Ray Kurzweil by always referring to it as the 'Cybersingularity'. | |
− | |||
− | |||
− | |||
}} | }} | ||
</pre> | </pre> | ||
Line 81: | Line 54: | ||
{{User:Yfmcpxpj/Template:comic 2x test | {{User:Yfmcpxpj/Template:comic 2x test | ||
− | | date = | + | | number = 1084 |
− | | title = | + | | date = July 20, 2012 |
− | | image = | + | | title = Server Problem |
− | | | + | | image = server_problem.png |
− | + | | titletext = Protip: Annoy Ray Kurzweil by always referring to it as the 'Cybersingularity'. | |
− | |||
− | |||
− | |||
}} | }} | ||
− | == Omitting 2x button == | + | === Omitting 2x button === |
− | If the | + | 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: | Code: | ||
Line 99: | Line 69: | ||
<pre> | <pre> | ||
{{User:Yfmcpxpj/Template:comic 2x test | {{User:Yfmcpxpj/Template:comic 2x test | ||
− | | number = | + | | number = 1085 |
− | | date = July | + | | date = July 23, 2012 |
− | | title = | + | | title = ContextBot |
− | | image = | + | | image = contextbot.png |
− | | titletext = | + | | 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 | | omit2x = true | ||
}} | }} | ||
Line 111: | Line 81: | ||
{{User:Yfmcpxpj/Template:comic 2x test | {{User:Yfmcpxpj/Template:comic 2x test | ||
− | | number = | + | | number = 1085 |
− | | date = July | + | | date = July 23, 2012 |
− | | title = | + | | title = ContextBot |
− | | image = | + | | image = contextbot.png |
− | | titletext = | + | | 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 | | omit2x = true | ||
}} | }} | ||
− | == Overriding 2x target == | + | === Overriding 2x target === |
− | + | If the 2x button needs to link to a different file (for example, if the filename on xkcd.com doesn't match the filename on explainxkcd.com), the alternate filename can be specified in the <code>override2x</code> parameter. | |
Code: | Code: | ||
Line 127: | Line 97: | ||
<pre> | <pre> | ||
{{User:Yfmcpxpj/Template:comic 2x test | {{User:Yfmcpxpj/Template:comic 2x test | ||
− | | number = | + | | number = 1085 |
− | | date = July | + | | date = July 23, 2012 |
− | | title = | + | | title = ContextBot |
− | | image = | + | | image = contextbot.png |
− | | titletext = | + | | 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. |
− | | override2x= | + | | override2x= server_problem_2x.png |
}} | }} | ||
</pre> | </pre> | ||
Line 139: | Line 109: | ||
{{User:Yfmcpxpj/Template:comic 2x test | {{User:Yfmcpxpj/Template:comic 2x test | ||
− | | number = | + | | number = 1085 |
− | | date = July | + | | date = July 23, 2012 |
− | | title = | + | | title = ContextBot |
− | | image = | + | | image = contextbot.png |
− | | titletext = | + | | 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. |
− | | override2x= | + | | override2x= server_problem_2x.png |
}} | }} | ||
Line 158: | Line 128: | ||
| image = barrel_cropped_(1).jpg | | image = barrel_cropped_(1).jpg | ||
| titletext = Don't we all. | | titletext = Don't we all. | ||
− | | override2x= | + | | override2x= server_problem_2x.png |
}} | }} | ||
</pre> | </pre> | ||
Line 170: | Line 140: | ||
| image = barrel_cropped_(1).jpg | | image = barrel_cropped_(1).jpg | ||
| titletext = Don't we all. | | titletext = Don't we all. | ||
− | | override2x= | + | | override2x= server_problem_2x.png |
}} | }} | ||
Line 179: | Line 149: | ||
<pre> | <pre> | ||
{{User:Yfmcpxpj/Template:comic 2x test | {{User:Yfmcpxpj/Template:comic 2x test | ||
− | | number = | + | | number = 1085 |
− | | date = July | + | | date = July 23, 2012 |
− | | title = | + | | title = ContextBot |
− | | image = | + | | image = contextbot.png |
− | | titletext = | + | | 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. |
− | | override2x= | + | | override2x= server_problem_2x.png |
| omit2x = true | | omit2x = true | ||
}} | }} | ||
Line 192: | Line 162: | ||
{{User:Yfmcpxpj/Template:comic 2x test | {{User:Yfmcpxpj/Template:comic 2x test | ||
− | | number = | + | | number = 1085 |
− | | date = July | + | | date = July 23, 2012 |
− | | title = | + | | title = ContextBot |
− | | image = | + | | image = contextbot.png |
− | | titletext = | + | | 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. |
− | | override2x= | + | | override2x= server_problem_2x.png |
| omit2x = true | | omit2x = true | ||
}} | }} | ||
− | == Reference documentation == | + | === Reference documentation === |
* [https://www.mediawiki.org/wiki/Help:Extension:ParserFunctions MediaWiki: ParserFunctions Extension] | * [https://www.mediawiki.org/wiki/Help:Extension:ParserFunctions MediaWiki: ParserFunctions Extension] | ||
− | ** [https://www.mediawiki.org/wiki/Help:Extension:ParserFunctions##expr | + | ** [https://www.mediawiki.org/wiki/Help:Extension:ParserFunctions##expr #expr] – evaluate an expression. |
− | ** [https://www.mediawiki.org/wiki/Help:Extension:ParserFunctions##if | + | ** [https://www.mediawiki.org/wiki/Help:Extension:ParserFunctions##if #if] – conditional inclusion. |
− | ** [https://www.mediawiki.org/wiki/Help:Extension:ParserFunctions##ifeq | + | ** [https://www.mediawiki.org/wiki/Help:Extension:ParserFunctions##ifeq #ifeq] – conditional inclusion from string equality/inequality. |
− | ** [https://www.mediawiki.org/wiki/Help:Extension:ParserFunctions##ifexpr | + | ** [https://www.mediawiki.org/wiki/Help:Extension:ParserFunctions##ifexpr #ifexpr] – conditional from the result of an expression. |
** [https://www.mediawiki.org/wiki/Help:Extension:ParserFunctions#StringFunctions StringFunctions] | ** [https://www.mediawiki.org/wiki/Help:Extension:ParserFunctions#StringFunctions StringFunctions] | ||
− | *** [https://www.mediawiki.org/wiki/Help:Extension:ParserFunctions##rpos | + | *** [https://www.mediawiki.org/wiki/Help:Extension:ParserFunctions##rpos #rpos] – return the ''last'' position of the specified text within a string. |
− | *** [https://www.mediawiki.org/wiki/Help:Extension:ParserFunctions##sub | + | *** [https://www.mediawiki.org/wiki/Help:Extension:ParserFunctions##sub #sub] – return a sub-string. |
* [https://www.mediawiki.org/wiki/Help:Parser_functions_in_templates MediaWiki: Parser functions in templates] | * [https://www.mediawiki.org/wiki/Help:Parser_functions_in_templates MediaWiki: Parser functions in templates] | ||
− |