User:Xavi/WikiSamples: Difference between revisions
Jump to navigation
Jump to search
(adding samples of parser functions & status of them) |
m (Walter's rectum 28/WikiSamples moved to User:Xavi/WikiSamples over redirect: revert) |
||
(7 intermediate revisions by 5 users not shown) | |||
Line 23: | Line 23: | ||
|- |
|- |
||
| small || some <font size="-1">small</font> text || <tt>some <font size="-1">small</font> text</tt> |
| small || some <font size="-1">small</font> text || <tt>some <font size="-1">small</font> text</tt> |
||
|- |
|||
| another small || some <sub>small</sub> text || <tt>some <sub>small</sub> text</tt> |
|||
|} |
|} |
||
Line 102: | Line 106: | ||
:: ''http://meta.wikimedia.org/wiki/ParserFunctions'' |
:: ''http://meta.wikimedia.org/wiki/ParserFunctions'' |
||
<table> |
<table border=1 cellspacing=0> |
||
<tr><th> wiki-text </th><th> result </th><th> note </th></tr> |
<tr style="background:lightgray; "><th> wiki-text </th><th> result </th><th> note </th></tr> |
||
<tr> |
|||
<tr style="background:green; "> |
|||
<td> <tt><nowiki>{{lc:AbCdEf}}</nowiki></tt> </td> |
<td> <tt><nowiki>{{ lc:AbCdEf }}</nowiki></tt> </td> |
||
<td> {{lc:AbCdEf}}</td> |
<td> {{ lc:AbCdEf }}</td> |
||
<td> gives abcdef. </td> |
<td> gives abcdef. </td> |
||
</tr> |
</tr> |
||
<tr> |
|||
<tr style="background:green; "> |
|||
<td> <tt><nowiki>{{ #language:da}}</nowiki></tt> </td> |
<td> <tt><nowiki>{{ #language:da }}</nowiki></tt> </td> |
||
<td> {{ #language:da}} </td> |
<td> {{ #language:da }} </td> |
||
<td> gives Dansk </td> |
<td> gives Dansk </td> |
||
</tr> |
</tr> |
||
<tr> |
|||
<tr style="background:red; "> |
|||
<td> <tt><nowiki>{{ #expr: (30 + 7) * 7 }}</nowiki></tt> </td> |
<td> <tt><nowiki>{{ #expr: (30 + 7) * 7 }}</nowiki></tt> </td> |
||
<td> {{ #expr: (30 + 7) * 7 }}</td> |
<td> {{ #expr: (30 + 7) * 7 }}</td> |
||
<td> = 259 </td> |
<td> = 259 </td> |
||
</tr> |
</tr> |
||
<tr> |
|||
<tr style="background:red; "> |
|||
<td> <tt><nowiki>{{ #ifeq: +07 | 007 | 1 | 0 }}</nowiki></tt> </td> |
<td> <tt><nowiki>{{ #ifeq: +07 | 007 | 1 | 0 }}</nowiki></tt> </td> |
||
<td> {{ #ifeq: +07 | 007 | 1 | 0 }} </td> |
<td> {{ #ifeq: +07 | 007 | 1 | 0 }} </td> |
||
<td> gives 1 </td> |
<td> gives 1 </td> |
||
</tr> |
</tr> |
||
<tr> |
|||
<tr style="background:red; "> |
|||
<td> <tt><nowiki>{{ #ifeq: "+07" | "007" | 1 | 0 }}</nowiki></tt> </td> |
<td> <tt><nowiki>{{ #ifeq: "+07" | "007" | 1 | 0 }}</nowiki></tt> </td> |
||
<td> {{ #ifeq: "+07" | "007" | 1 | 0 }} </td> |
<td> {{ #ifeq: "+07" | "007" | 1 | 0 }} </td> |
||
<td> gives 0 </td> |
<td> gives 0 </td> |
||
</tr> |
</tr> |
||
<tr> |
|||
<tr style="background:red; "> |
|||
<td> <tt><nowiki>{{ #if: {{{parameter|}}} | Parameter is defined. | Parameter is undefined, or empty }}</nowiki></tt> </td> |
<td> <tt><nowiki>{{ #if: {{{parameter|}}} | Parameter is defined. | Parameter is undefined, or empty }}</nowiki></tt> </td> |
||
<td> {{ #if: {{{parameter|}}} | Parameter is defined. | Parameter is undefined, or empty }} </td> |
<td> {{ #if: {{{parameter|}}} | Parameter is defined. | Parameter is undefined, or empty }} </td> |
||
<td> </td> |
<td> </td> |
||
</tr> |
</tr> |
||
<tr> |
|||
<tr style="background:red; "> |
|||
<td> <tt><nowiki>{{ #ifexist: Bugs|Foo|RFC 3092 }}</nowiki></tt> </td> |
<td> <tt><nowiki>{{ #ifexist: Bugs|Foo|RFC 3092 }}</nowiki></tt> </td> |
||
<td> {{ #ifexist: Bugs|Foo|RFC 3092 }} </td> |
<td> {{ #ifexist: Bugs|Foo|RFC 3092 }} </td> |
||
<td> gives RFC 3092, because Bugs doesn't exist </td> |
<td> gives RFC 3092, because Bugs doesn't exist </td> |
||
</tr> |
</tr> |
||
<tr> |
|||
<tr style="background:red; "> |
|||
<td> <tt><nowiki>{{ #switch: A | a=lower | A=UPPER }}</nowiki></tt> </td> |
<td> <tt><nowiki>{{ #switch: A | a=lower | A=UPPER }}</nowiki></tt> </td> |
||
<td> {{ #switch: A | a=lower | A=UPPER }} </td> |
<td> {{ #switch: A | a=lower | A=UPPER }} </td> |
||
<td> gives UPPER </td> |
<td> gives UPPER </td> |
||
</tr> |
</tr> |
||
<tr> |
|||
<tr style="background:red; "> |
|||
<td> <tt><nowiki>{{#time:D, j M Y H:i:s {{#time:+H:i|+0 hours}}}}</nowiki></tt> </td> |
<td> <tt><nowiki>{{ #time:D, j M Y H:i:s {{#time:+H:i|+0 hours }} }}</nowiki></tt> </td> |
||
<td> {{#time:D, j M Y H:i:s {{#time:+H:i|+0 hours}}}} </td> |
<td> {{ #time:D, j M Y H:i:s {{ #time:+H:i|+0 hours }} }} </td> |
||
<td> </td> |
<td> </td> |
||
</tr> |
</tr> |
Latest revision as of 15:30, 20 December 2009
Text
Effect | Result | Typed |
---|---|---|
italics | some italic text | some ''italic'' text |
bold | some bold text | some '''bold''' text |
bold italics | some bold & italic text | some '''''bold & italic''''' text |
color | some colored text | some <font color="red">colored</font> text |
big | some big text | some <big="red">big</big> text |
small | some small text | some <font size="-1">small</font> text |
another small | some small text | some <sub>small</sub> text
|
Tables
First header | Second header | |||||
---|---|---|---|---|---|---|
upper left | right side | |||||
lower left | lower middle | |||||
|
{| border="1" cellpadding="5" cellspacing="0" align="center" style="float:right" |+'''An [http://meta.wikimedia.org/wiki/Help:Table example table]''' |- ! style="background:#efefef;" | First header ! colspan="2" style="background:#ffdead;" | Second header |- | upper left | | rowspan=2 style="border-bottom:3px solid grey;" valign="top" | right side |- | style="border-bottom:3px solid grey;" | lower left | style="border-bottom:3px solid grey;" | lower middle |- | colspan="3" align="center" | {| border="0" |+''A table in a table'' |- | align="center" width="150px" | [[Image:Pic Xo.jpg|100px]] | align="center" width="150px" | [[Image:Pic Xo.jpg]] |- | align="center" colspan="2" style="border-top:1px solid red; border-right:1px solid red; border-bottom:2px solid red; border-left:1px solid red;" | Two XO logos |} |}
DIVs
<div style="margin:2px; border:1px solid orange; background:lightgray; padding:5px; font-size:66%; width:90%; margin-left:auto; margin-right: auto; text-align:center; " > Some text should figure here....</div>
Some text should figure here....
<div style="margin:5px; border:7px solid orange; background:#fda; padding:11px; font-size:133%; width:60%; margin-left:auto; margin-right: auto; " > Some other text is here... </div>
Some other text is here...
Parser functions & others
wiki-text | result | note |
---|---|---|
{{ lc:AbCdEf }} | abcdef | gives abcdef. |
{{ #language:da }} | dansk | gives Dansk |
{{ #expr: (30 + 7) * 7 }} | 259 | = 259 |
{{ #ifeq: +07 | 007 | 1 | 0 }} | 1 | gives 1 |
{{ #ifeq: "+07" | "007" | 1 | 0 }} | 0 | gives 0 |
{{ #if: {{{parameter|}}} | Parameter is defined. | Parameter is undefined, or empty }} | Parameter is undefined, or empty | |
{{ #ifexist: Bugs|Foo|RFC 3092 }} | RFC 3092 | gives RFC 3092, because Bugs doesn't exist |
{{ #switch: A | a=lower | A=UPPER }} | UPPER | gives UPPER |
{{ #time:D, j M Y H:i:s {{#time:+H:i|+0 hours }} }} | Mon, 25 Nov 2024 03:16:37 +03:16 |