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