]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - pgsrc/Help%2FRichTablePlugin
Wikicreole syntax for links
[SourceForge/phpwiki.git] / pgsrc / Help%2FRichTablePlugin
1 Date: Sat, 24 Jan 2009 20: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%2FRichTablePlugin;
6   flags=PAGE_LOCKED;
7   markup=2;
8   charset=iso-8859-1
9 Content-Transfer-Encoding: binary
10
11 The *~RichTable* [[Help:WikiPlugin|plugin]] is a plugin that takes off from the [OldStyleTable|Help:OldStyleTablePlugin] plugin. It allows a user to specify arbitrary properties of <tt><table></tt>, <tt><tr></tt> and <tt><td></tt> with a very simple markup.
12
13 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!
14
15 *A <tt>"-"</tt> (dash) at the start of a new line represents a new row in the table.
16 *A <tt>"|"</tt> (vertical bar or pipe) at the start of a new line represents a cell.
17 *Attributes for the tags
18   *A line that starts with a <tt>"*"</tt> (star or asterisk) after a <tt>"|"</tt> is parsed for attributes for the corresponding cell.
19   *Attributes for the table are given on line that starts with a <tt>"*"</tt>, only if the line appears before any other line except whitespace.
20   *A line that starts with a <tt>-</tt> is always parsed for attributes since it can't have any content, unlike a cell.
21 *Cell contents
22   *Cell contents are processed by the ~BlockParser.
23   *Any line that starts with a <tt>"*"</tt> anywhere other than the table attribute line is treated as normal content.
24   *Any line that starts with whitespace is also treated as content.
25   *Any cell line that does not have a <tt>"*"</tt> after the <tt>"|"</tt> is treated as normal content.
26   *All content lines that follow a cell line are added to that cell. They can contain arbitrary text except the above cases.
27   *If there is no cell in the current row, content lines are dropped silently.
28 *The two special characters <tt>"~~"</tt> and <tt>"?>"</tt> should be escaped as <tt>"\~~"</tt> and <tt>"?\>"</tt>. I havn't discovered any other characters yet that might need to be escaped. This is required for the block parser to work.
29
30 We allow attributes with or without quotes (")
31 <verbatim>
32 border=1, cellpadding="5"
33 style="font-family: sans-serif; border-top:1px solid #dddddd;"
34 </verbatim>
35 What will not work is style with comma inside, e. g.
36 <verbatim>
37 style="font-family: Verdana, Arial, Helvetica, sans-serif"
38 </verbatim>
39
40 == Example
41
42 <?plugin RichTable
43
44 *border=1, cellpadding=5, bgcolor=#f0f8f8, width=75%, align=center
45 -
46 |* colspan=3, align=center
47 HomePage
48 -
49 |* colspan=2
50 [http://phpwiki.sourceforge.net/demo/themes/default/images/png.png]
51 |* rowspan=2
52 This cell actually has a plugin invocation inside it!
53 <?plugin
54 BackLinks
55 ?\>
56 - bgcolor=white
57 |
58 #One
59 #Two
60 |
61 *Foo
62 *Bar
63 - bgcolor=cyan
64 This line gets dropped ... no cell to contain it!
65 |* bgcolor=#f0f0ff, align=center
66 One paragraph
67
68 Another paragraph?
69 |* align=left
70 This cell uses the row color
71 | I wish this cell had a nested table inside it! :(
72 ?>
73
74 The above table is rendered from:
75
76 <verbatim>
77 <?plugin RichTable
78
79 *border=1, cellpadding=5, bgcolor=#f0f8f8, width=75%, align=center
80 -
81 |* colspan=3, align=center
82 HomePage
83 -
84 |* colspan=2
85 [http://phpwiki.sourceforge.net/demo/themes/default/images/png.png]
86 |* rowspan=2
87 This cell actually has a plugin invocation inside it!
88 <?plugin
89 BackLinks
90 ?\>
91 - bgcolor=white
92 |
93 #One
94 #Two
95 |
96 *Foo
97 *Bar
98 - bgcolor=cyan
99 This line gets dropped ... no cell to contain it!
100 |* bgcolor=#f0f0ff, align=center
101 One paragraph.
102
103 Another paragraph?
104 |* align=left
105 This cell uses the row color
106 | I wish this cell had a nested table inside it! :(
107 ?>
108 </verbatim>
109
110 == Known Bugs
111 * The plugin can't nest itself yet. Thus nested tables are currently not possible.
112
113 == Author
114 * [Sameer D. Sahasrabuddhe|http://www.it.iitb.ac.in/~sameerds/phpwiki/index.php/RichTablePlugin]
115
116 ----
117 [[PhpWikiDocumentation]] [[CategoryWikiPlugin]]