]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - pgsrc/Help%2FRichTablePlugin
Help pages: required arguments
[SourceForge/phpwiki.git] / pgsrc / Help%2FRichTablePlugin
1 Date: Wed, 13 Apr 2011 16:54:29 +0000
2 Mime-Version: 1.0 (Produced by PhpWiki 1.4.0RC1)
3 X-Rcs-Id: $Id$
4 Content-Type: application/x-phpwiki;
5   pagename=Help%2FRichTablePlugin;
6   flags=PAGE_LOCKED%2CEXTERNAL_PAGE;
7   markup=2;
8   charset=UTF-8
9 Content-Transfer-Encoding: binary
10
11 The **~RichTable** [[Help:WikiPlugin|plugin]] is a plugin that takes off from the [[Help:OldStyleTablePlugin|OldStyleTable]] plugin. It allows a user to specify arbitrary properties of ##<table>##, ##<tr>## and ##<td>## with a very simple markup.
12
13 This plugin is included for legacy only. We recommand to
14 use [[Help:MediawikiTablePlugin|Mediawiki tables]] instead.
15
16 == Syntax ==
17
18 The contents of each cell are individually processed by the ~BlockParser. This means that you can do interesting things like put **invoke plugins**, use **enumerated lists** etc within each cell!
19
20 A ##"-"## (dash) at the start of a new line represents a new row in the table.
21
22 A ##"|"## (vertical bar or pipe) at the start of a new line represents a cell.
23
24 === Attributes for the tags ===
25
26 A line that starts with a ##"~*"## (star or asterisk) after a ##"|"## is parsed for attributes for the corresponding cell.
27
28 Attributes for the table are given on line that starts with a ##"~*"##, only if the line appears before any other line except whitespace.
29
30 A line that starts with a ##-## is always parsed for attributes since it can't have any content, unlike a cell.
31
32 === Cell contents ===
33
34 Cell contents are processed by the ~BlockParser.
35
36 Any line that starts with a ##"~*"## anywhere other than the table attribute line is treated as normal content.
37
38 Any line that starts with whitespace is also treated as content.
39
40 Any cell line that does not have a ##"~*"## after the ##"|"## is treated as normal content.
41
42 All content lines that follow a cell line are added to that cell. They can contain arbitrary text except the above cases.
43
44 If there is no cell in the current row, content lines are dropped silently.
45
46 === Special characters ===
47
48 The two special characters ##"~~"## and ##"?>"## should be escaped as ##"\~~"## and ##"?\>"##. I havn't discovered any other characters yet that might need to be escaped. This is required for the block parser to work.
49
50 === Attributes ===
51
52 We allow attributes with or without quotes ("):
53 {{{
54 border=1, cellpadding="5"
55 style="font-family: sans-serif; border-top:1px solid #dddddd;"
56 style="font-family: Verdana, Arial, Helvetica, sans-serif"
57 }}}
58
59 == Example ==
60
61 <<RichTable
62
63 *border=1, cellpadding=5, bgcolor=#f0f8f8, width=75%, align=center
64 -
65 |* colspan=3, align=center
66 HomePage
67 -
68 |* colspan=2
69 [http://phpwiki.sourceforge.net/demo/themes/default/images/png.png]
70 |* rowspan=2
71 This cell actually has a plugin invocation inside it!
72 <?plugin
73 BackLinks
74 ?\>
75 - bgcolor=white
76 |
77 # One
78 # Two
79 |
80 * Foo
81 * Bar
82 - bgcolor=cyan
83 This line gets dropped ... no cell to contain it!
84 |* bgcolor=#f0f0ff, align=center
85 One paragraph
86
87 Another paragraph?
88 |* align=left
89 This cell uses the row color
90 | I wish this cell had a nested table inside it! :(
91 >>
92
93 The above table is rendered from:
94
95 {{{
96 <<RichTable
97
98 *border=1, cellpadding=5, bgcolor=#f0f8f8, width=75%, align=center
99 -
100 |* colspan=3, align=center
101 HomePage
102 -
103 |* colspan=2
104 [http://phpwiki.sourceforge.net/demo/themes/default/images/png.png]
105 |* rowspan=2
106 This cell actually has a plugin invocation inside it!
107 <?plugin
108 BackLinks
109 ?\>
110 - bgcolor=white
111 |
112 # One
113 # Two
114 |
115 * Foo
116 * Bar
117 - bgcolor=cyan
118 This line gets dropped ... no cell to contain it!
119 |* bgcolor=#f0f0ff, align=center
120 One paragraph.
121
122 Another paragraph?
123 |* align=left
124 This cell uses the row color
125 | I wish this cell had a nested table inside it! :(
126 >>
127 }}}
128
129 == Known Bugs ==
130 * The plugin can't nest itself. Thus nested tables are currently not possible. See [[Help:MediawikiTablePlugin|Mediawiki tables]] to have nested tables.
131
132 == Author ==
133 * [[http://www.it.iitb.ac.in/~sameerds/phpwiki/index.php/RichTablePlugin|Sameer D. Sahasrabuddhe]]
134
135 <noinclude>
136 ----
137 [[PhpWikiDocumentation]] [[CategoryWikiPlugin]]
138 </noinclude>