This site is supported by donations to The OEIS Foundation.
User:Daniel Forgues/Testcases
From OeisWiki
(Put code for template under test in /Sandbox.)
To get to the source wikitext code of a page or revision, use index.php
thus
Manual:Parameters_to_index.php—MediaWiki.org. (Passing action=raw
returns the source wikitext code of a page or revision.)
Contents
Conditional comments
From: http://www.quirksmode.org/css/condcom.html
Conditional comments only work in IE, and are thus excellently suited to give special instructions meant only for IE. They are supported from IE 5 onwards.
The code:
:<span> <!--[if IE]> According to the conditional comment this is IE<br /> <![endif]--> <!--[if IE 6]> According to the conditional comment this is IE 6<br /> <![endif]--> <!--[if IE 7]> According to the conditional comment this is IE 7<br /> <![endif]--> <!--[if IE 8]> According to the conditional comment this is IE 8<br /> <![endif]--> <!--[if IE 9]> According to the conditional comment this is IE 9<br /> <![endif]--> <!--[if gte IE 8]> According to the conditional comment this is IE 8 or higher<br /> <![endif]--> <!--[if lt IE 9]> According to the conditional comment this is IE lower than 9<br /> <![endif]--> <!--[if lte IE 7]> According to the conditional comment this is IE lower or equal to 7<br /> <![endif]--> <!--[if gt IE 6]> According to the conditional comment this is IE greater than 6<br /> <![endif]--> <!--[if !IE]> --> According to the conditional comment this is not IE<br /> <!-- <![endif]--> </span>
yields:
According to the conditional comment this is not IE
Magic words
Cf. Help:Magic words—MediaWiki.org.
Cf. http://meta.wikimedia.org/wiki/Magic_word
Code Result Comment {{SERVERNAME}} oeis.org {{SITENAME}} OeisWiki {{DISPLAYTITLE: User:Daniel Forgues/sandbox }} ("sandbox" in page title should show all in lowercase) {{NAMESPACE}} User {{PAGENAME}} Daniel Forgues/Testcases {{BASEPAGENAME}} Daniel Forgues {{SUBPAGENAME}} Testcases
Finding the User Agent?
Finding the User Agent via a magic word?
Code Result Comment {{USERAGENT}} Template:USERAGENT (I wished, see Template:Vertical bar graph/bar#Bug.) {{USER_AGENT}} Template:USER AGENT (I wished, see Template:Vertical bar graph/bar#Bug.)
Finding the User Agent via a conditional comment?
Parser functions
Code Result {{lc: one TWO three}} one two three {{lc: one Two three}} one two three {{uc: one TWO three}} ONE TWO THREE {{uc: one Two three}} ONE TWO THREE
{{PLURAL}}
Code Result Comments a {{PLURAL: a|mouse|mice}} a mice WRONG! the {{PLURAL: the|mouse|mice}} the mice WRONG! many {{PLURAL: many|mouse|mice}} many mice -7 {{PLURAL: -7|mouse|mice}} -7 mice -1.7 {{PLURAL: -1.7|mouse|mice}} -1.7 mice -1 {{PLURAL: -1|mouse|mice}} -1 mouse -0.6 {{PLURAL: -0.6|mouse|mice}} -0.6 mice 0 {{PLURAL: 0|mouse|mice}} 0 mice 0.6 {{PLURAL: 0.6|mouse|mice}} 0.6 mice 1 {{PLURAL: 1|mouse|mice}} 1 mouse 1.0 {{PLURAL: 1.0|mouse|mice}} 1.0 mouse +1.0 {{PLURAL: +1.0|mouse|mice}} +1.0 mouse 1.7 {{PLURAL: 1.7|mouse|mice}} 1.7 mice 7 {{PLURAL: 7|mouse|mice}} 7 mice
Extensions
Extension:StringFunctions
Extension:StringFunctions—MediaWiki.org.
Code Result {{#len: one Two three}} 13 {{#len: one Two three }} 13 {{#pos: one Two three Two|Two}} 4 {{#pos: one Two three Two|Two|5}} 14 {{#pos: one Two three Two|one}} 0 {{#rpos: one Two three Two|Two}} 14