]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - pgsrc/Help%2FMediawikiTablePlugin
See Also
[SourceForge/phpwiki.git] / pgsrc / Help%2FMediawikiTablePlugin
1 Date: Sat, 25 Jan 2009 15:18:24 +0100
2 Mime-Version: 1.0 (Produced by PhpWiki 1.3.14-20080124)
3 X-Rcs-Id: $Id$
4 Content-Type: application/x-phpwiki;
5   pagename=Help%2FMediawikiTablePlugin;
6   flags=PAGE_LOCKED;
7   markup=2;
8   charset=iso-8859-1
9 Content-Transfer-Encoding: binary
10
11 The *~MediawikiTable* [[Help:WikiPlugin|plugin]] allows a user to specify a ##<table>## with (a subset of) the syntax used by Mediawiki.
12 The plugin is not meant to be called directly, just use the syntax below to insert your table.
13
14 == Mediawiki table syntax
15
16 * The table starts with a line <b>{~|</b> and ends with a line <b>|~}</b>.
17 * An optional table caption is made with a line starting with a pipe and a plus sign <b>|+</b> followed by the caption.
18 * An optional table summary is made with a line starting with a pipe and an equal sign <b>|=</b> followed by the summary.
19 * A table row starts with a pipe and a hyphen: <b>|-</b>.
20 * A table cell starts with a pipe on a new line, or a double bar <b>||</b> on the same line.
21 * A header table cell starts with an exclamation mark, or a double exclamation mark <b>!!</b> on the same line (works only with an explicit plugin call).
22
23 The summary syntax is an extension to the Mediawiki syntax. 
24 You can also simply put the summary as an attribute to the table.
25 The summary is necessary to be able to create accessible tables.
26
27 === HTML attributes
28
29 <?plugin RichTable
30 * class="bordered"
31 -
32 |
33 Attribute
34 |
35 Syntax
36 -
37 |
38 For the table
39 |
40 {| border="1"
41 -
42 |
43 For the caption
44 |
45 ~|+ style="font-weight: bold;"
46 -
47 |
48 For a row
49 |
50 ~|- style="height:100px"
51 -
52 |
53 For a cell
54 |
55 ~| align="right" | Cell 2 (right aligned)
56 ?>
57
58 The attributes might be put with or without double quotes.
59
60 == Examples
61
62 {| border="1", style="width: 100%"
63 |+ style="font-weight: bold; font-size: 150%;" | This is the table caption
64 |= This is the table summary
65 |- style="white-space: nowrap"
66 | <b>Header 1</b>
67 | <b>Header 2</b>
68 | <b>Header 3</b>
69 |- style=height:100px
70 | Cell I
71 | <b>Cell II</b>,  in bold
72 |align=right, width="100%" |Cell III
73 |- bgcolor=#f0f0ff, align=center
74 |Cell 1||Cell 2||Cell 3
75 |}
76
77 The above table is rendered from:
78
79 <verbatim>
80 {| border="1", style="width: 100%"
81 |+ style="font-weight: bold; font-size: 150%;" | This is the table caption
82 |= This is the table summary
83 |- style="white-space: nowrap"
84 | <b>Header 1</b>
85 | <b>Header 2</b>
86 | <b>Header 3</b>
87 |- style=height:100px
88 | Cell I
89 | <b>Cell II</b>,  in bold
90 |align=right, width="100%" |Cell III
91 |- bgcolor=#f0f0ff, align=center
92 |Cell 1||Cell 2||Cell 3
93 |}
94 </verbatim>
95
96 In this example, there is no explicit call to the plugin. You have the same syntax as in Mediawiki.
97
98 You can also explictly call the plugin. This will allow you:
99 * to use the Mediawiki header syntax (!),
100 * to use multiple paragraphs in a cell,
101 * to use lists in a cell.
102
103 <?plugin MediawikiTable
104 {|
105 |- style="white-space: nowrap"
106 ! Header 1
107 ! Header 2
108 |- bgcolor=yellow
109 | First paragraph.
110
111 Second paragraph.
112 |
113 * One
114 * Two
115 * Three
116 |- bgcolor=#f0f0ff, align=center
117 |Cell 1||Cell 2
118 |}
119 ?>
120
121 The above table is rendered from:
122
123 <verbatim>
124 <?plugin MediawikiTable
125 {|
126 |- style="white-space: nowrap"
127 ! Header 1
128 ! Header 2
129 |- bgcolor=yellow
130 | First paragraph.
131
132 Second paragraph.
133 |
134 * One
135 * Two
136 * Three
137 |- bgcolor=#f0f0ff, align=center
138 |Cell 1||Cell 2
139 |}
140 ?>
141 </verbatim>
142
143 == Author
144
145 Marc-Etienne Vargenau, Alcatel-Lucent
146
147 == See Also
148 * [[http://meta.wikimedia.org/wiki/Help:Table|Mediawiki table help page]]
149
150 ----
151 [[PhpWikiDocumentation]] [[CategoryWikiPlugin]]
152