User:Xavi/WikiSamples: Difference between revisions

From OLPC
Jump to navigation Jump to search
(FIELD_OTHER)
m (Walter's rectum 28/WikiSamples moved to User:Xavi/WikiSamples over redirect: revert)
 
(5 intermediate revisions by 3 users not shown)
Line 23: Line 23:
|-
|-
| small || some <font size="-1">small</font> text || <tt>some &lt;font size="-1"&gt;small&lt;/font&gt; text</tt>
| small || some <font size="-1">small</font> text || <tt>some &lt;font size="-1"&gt;small&lt;/font&gt; text</tt>

|-
| another small || some <sub>small</sub> text || <tt>some &lt;sub&gt;small&lt;/sub&gt; text</tt>



|}
|}
Line 98: Line 102:
----
----


== Parser functions & others ==
FIELD_MESSAGE_coreldelzel
:''see http://meta.wikimedia.org/wiki/Help:Parser_function''
:: ''http://meta.wikimedia.org/wiki/ParserFunctions''

<table border=1 cellspacing=0>
<tr style="background:lightgray; "><th> wiki-text </th><th> result </th><th> note </th></tr>
<tr>
<td> <tt><nowiki>{{ lc:AbCdEf }}</nowiki></tt> </td>
<td> {{ lc:AbCdEf }}</td>
<td> gives abcdef. </td>
</tr>
<tr>
<td> <tt><nowiki>{{ #language:da }}</nowiki></tt> </td>
<td> {{ #language:da }} </td>
<td> gives Dansk </td>
</tr>
<tr>
<td> <tt><nowiki>{{ #expr: (30 + 7) * 7 }}</nowiki></tt> </td>
<td> {{ #expr: (30 + 7) * 7 }}</td>
<td> = 259 </td>
</tr>
<tr>
<td> <tt><nowiki>{{ #ifeq: +07 | 007 | 1 | 0 }}</nowiki></tt> </td>
<td> {{ #ifeq: +07 | 007 | 1 | 0 }} </td>
<td> gives 1 </td>
</tr>
<tr>
<td> <tt><nowiki>{{ #ifeq: "+07" | "007" | 1 | 0 }}</nowiki></tt> </td>
<td> {{ #ifeq: "+07" | "007" | 1 | 0 }} </td>
<td> gives 0 </td>
</tr>
<tr>
<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> </td>
</tr>
<tr>
<td> <tt><nowiki>{{ #ifexist: Bugs|Foo|RFC 3092 }}</nowiki></tt> </td>
<td> {{ #ifexist: Bugs|Foo|RFC 3092 }} </td>
<td> gives RFC 3092, because Bugs doesn't exist </td>
</tr>
<tr>
<td> <tt><nowiki>{{ #switch: A | a=lower | A=UPPER }}</nowiki></tt> </td>
<td> {{ #switch: A | a=lower | A=UPPER }} </td>
<td> gives UPPER </td>
</tr>
<tr>
<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> </td>
</tr>
</table>

Latest revision as of 15:30, 20 December 2009

Text

See WikiMedia Help:Wikitext
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

See WikiMedia Help:Table
An example table
First header Second header
upper left   right side
lower left lower middle
A table in a table
Pic Xo.jpg Pic Xo.jpg
Two XO logos
{| 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

See WikiMedia Help:HTML in wikitext

<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

see http://meta.wikimedia.org/wiki/Help:Parser_function
http://meta.wikimedia.org/wiki/ParserFunctions
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 }} }} Fri, 22 Nov 2024 03:26:38 +03:26