none
[openafs-wiki.git] / TWiki / TablePlugin.mdwn
1 # <a name="Table Plugin"></a> Table Plugin
2
3 Gives extra control of table display:
4
5 - Allows sorting
6 - Changing table properties like border width, cell spacing and cell padding
7 - Changing background color and text color for header cells
8 - Changing background color and text color for data cells - colors can _alternate_
9 - Table attributes can be set and overridden in this order:
10   - Default `TABLEATTRIBUTES` Plugin setting in this topic.
11   - A `TABLEATTRIBUTES` preferences setting on site-level ([[TWikiPreferences]]) or web-level (any [[WebPreferences]]), e.g.
12     - `Set TABLEATTRIBUTES = tableborder="0" cellpadding="1" ...`
13   - Before a table using `%TABLE{...}%`
14 - Row spans
15
16 ## <a name="Sorting"></a> Sorting
17
18 Click on column heading text to sort by a column. Initial column will be sorted in descending order, click again to get ascending order. The type of data in the cell is determined automatically:
19
20 - date if format is:
21   - dd MMM YYYY - hh:mm (MMM is Jan, Feb, etc.)
22   - dd-MMM-YY or dd-MMM-YYYY (can be / or space in place of -) (MMM is Jan, Feb, etc)
23 - number is digits, with optional decimal point
24 - otherwise treated as text
25
26 ## <a name="Row spans"></a> Row spans
27
28 Table cells with a single caret indicate follow-up rows of multi-row spans. For example,
29
30 <table width="100%">
31   <tr>
32     <td><pre>
33 | One One | One Two | One Three |
34 | ^ | Two Two | Two Three |
35 | Three One | ^ | Three Three |
36 </pre></td>
37     <td align="right">
38       <table border="1" cellpadding="0" cellspacing="0" style="border-width: 1px">
39         <tr>
40           <td bgcolor="#ecf2f8" rowspan="2" style=""> One One </td>
41           <td bgcolor="#ecf2f8" style=""> One Two </td>
42           <td bgcolor="#ecf2f8" style=""> One Three </td>
43         </tr>
44         <tr>
45           <td bgcolor="#ffffff" rowspan="2" style=""> Two Two </td>
46           <td bgcolor="#ffffff" style=""> Two Three </td>
47         </tr>
48         <tr>
49           <td bgcolor="#ecf2f8" style=""> Three One </td>
50           <td bgcolor="#ecf2f8" style=""> Three Three </td>
51         </tr>
52       </table>
53     </td>
54   </tr>
55 </table>
56
57 ## <a name="%TOPIC% Global Settings"></a> %TOPIC% Global Settings
58
59 Plugin settings are stored as preferences variables. To reference a plugin setting write <code>**%&lt;plugin&gt;\_&lt;setting&gt;%**</code>, for example, <code>**%INTERWIKIPLUGIN\_SHORTDESCRIPTION%**</code>
60
61 - One line description, shown in the [[TextFormattingRules]] topic:
62   - Set SHORTDESCRIPTION = Control attributes of tables and sorting of table columns
63
64 - Set DEBUG to 1 to get debug messages in `data/debug.txt`. Default: `0`
65   - Set DEBUG = 0
66
67 - Make all tables in a topic sortable. If this is set to `all`, all tables that have a header row (including those that do not have %TABLE before them) will be made sortable. If set to `none`, only tables with %TABLE will be sortable. Topic rendering is faster if this is set to `none`.
68   - #Set SORT = none
69   - Set SORT = all
70
71 - Default table attributes:
72   - Set TABLEATTRIBUTES = tableborder="1" cellpadding="0" cellspacing="0" valign="top" headeralign="center" headercolor="#ffffff" headerbg="#6b7f93" headerbgsorted="#334455" headercolor="#ffffff" databg="#ffffff,#edf4f9" databgsorted="#f5f5f5,#dce7ee"
73   - Classic skin table attributes:
74     - #Set TABLEATTRIBUTES = tableborder="1" cellpadding="0" cellspacing="1" headerbg="#99cccc" databg="#ffffff,#ffffcc"
75
76 ## <a name="Table Attributes"></a> Table Attributes
77
78 Attributes are defined as a `TABLEATTRIBUTES` Plugin setting in this topic, a `TABLEATTRIBUTES` preferences setting, or on line before the table using `%TABLE{...}%`:
79
80 <table border="1" cellpadding="0" cellspacing="0" style="border-width: 1px">
81   <tr>
82     <th bgcolor="#6b7f93" maxcols="0" style=""><a href="http://localhost?sortcol=0;table=2;up=0#sorted_table" rel="nofollow" title="Sort by this column"><font color="#ffffff">Argument</font></a></th>
83     <th bgcolor="#6b7f93" maxcols="0" style=""><a href="http://localhost?sortcol=1;table=2;up=0#sorted_table" rel="nofollow" title="Sort by this column"><font color="#ffffff">Comment</font></a></th>
84     <th bgcolor="#6b7f93" maxcols="0" style=""><a href="http://localhost?sortcol=2;table=2;up=0#sorted_table" rel="nofollow" title="Sort by this column"><font color="#ffffff">Default value</font></a></th>
85     <th bgcolor="#6b7f93" maxcols="0" style=""><a href="http://localhost?sortcol=3;table=2;up=0#sorted_table" rel="nofollow" title="Sort by this column"><font color="#ffffff">Example</font></a></th>
86   </tr>
87   <tr>
88     <td bgcolor="#ecf2f8" style=""><code>sort</code></td>
89     <td bgcolor="#ecf2f8" style=""> Set table sorting <code>"on"</code> or <code>"off"</code>. </td>
90     <td bgcolor="#ecf2f8" style=""><span>unspecified</span></td>
91     <td bgcolor="#ecf2f8" style=""><code>sort="on"</code></td>
92   </tr>
93   <tr>
94     <td bgcolor="#ffffff" style=""><code>initsort</code></td>
95     <td bgcolor="#ffffff" style=""> Column to sort initially (<code>"1"</code> to number of columns). </td>
96     <td bgcolor="#ffffff" style=""><span>unspecified</span></td>
97     <td bgcolor="#ffffff" style=""><code>initsort="2"</code></td>
98   </tr>
99   <tr>
100     <td bgcolor="#ecf2f8" style=""><code>initdirection</code></td>
101     <td bgcolor="#ecf2f8" style=""> Initial sorting direction for <code>initsort</code>, set to <code>"up"</code> (descending) or <code>"down"</code> (ascending). </td>
102     <td bgcolor="#ecf2f8" style=""><span>unspecified</span></td>
103     <td bgcolor="#ecf2f8" style=""><code>initdirection="up"</code></td>
104   </tr>
105   <tr>
106     <td bgcolor="#ffffff" style=""><code>headerbg</code></td>
107     <td bgcolor="#ffffff" style=""> Header cell background colour. </td>
108     <td bgcolor="#ffffff" style=""><code>"#6b7f93"</code></td>
109     <td bgcolor="#ffffff" style=""><code>headerbg="#999999"</code></td>
110   </tr>
111   <tr>
112     <td bgcolor="#ecf2f8" style=""><code>headerbgsorted</code></td>
113     <td bgcolor="#ecf2f8" style=""> Header cell background colour of a sorted column. </td>
114     <td bgcolor="#ecf2f8" style=""> the value of <code>headerbg</code></td>
115     <td bgcolor="#ecf2f8" style=""><code>headerbgsorted="#32596c"</code></td>
116   </tr>
117   <tr>
118     <td bgcolor="#ffffff" style=""><code>headercolor</code></td>
119     <td bgcolor="#ffffff" style=""> Header cell text colour. </td>
120     <td bgcolor="#ffffff" style=""><code>"#ffffff"</code></td>
121     <td bgcolor="#ffffff" style=""><code>headercolor="#0000cc"</code></td>
122   </tr>
123   <tr>
124     <td bgcolor="#ecf2f8" style=""><code>databg</code></td>
125     <td bgcolor="#ecf2f8" style=""> Data cell background colour, a comma separated list. Specify <code>"none"</code> for no colour, that is to use the colour/background of the page the table is on. </td>
126     <td bgcolor="#ecf2f8" style=""><code>"#edf4f9,#ffffff"</code></td>
127     <td bgcolor="#ecf2f8" style=""><code>databg="#f2f2f2,#ffffff"</code></td>
128   </tr>
129   <tr>
130     <td bgcolor="#ffffff" style=""><code>databgsorted</code></td>
131     <td bgcolor="#ffffff" style=""> Data cell background colour of a sorted column; see <code>databg</code>. </td>
132     <td bgcolor="#ffffff" style=""> the values of <code>databg</code></td>
133     <td bgcolor="#ffffff" style=""><code>databgsorted="#d4e8e4,#e5f5ea"</code></td>
134   </tr>
135   <tr>
136     <td bgcolor="#ecf2f8" style=""><code>datacolor</code></td>
137     <td bgcolor="#ecf2f8" style=""> Data cell text colour, a comma separated list. </td>
138     <td bgcolor="#ecf2f8" style=""><span>unspecified</span></td>
139     <td bgcolor="#ecf2f8" style=""><code>datacolor="#0000CC, #000000"</code></td>
140   </tr>
141   <tr>
142     <td bgcolor="#ffffff" style=""><code>tableborder</code></td>
143     <td bgcolor="#ffffff" style=""> Table border width (pixels). </td>
144     <td bgcolor="#ffffff" style=""><code>"1"</code></td>
145     <td bgcolor="#ffffff" style=""><code>tableborder="2"</code></td>
146   </tr>
147   <tr>
148     <td bgcolor="#ecf2f8" style=""><code>tableframe</code></td>
149     <td bgcolor="#ecf2f8" style=""> Table frame, set to <code>"void"</code> (no sides), <code>"above"</code> (the top side only), <code>"below"</code> (the bottom side only), <code>"hsides"</code> (the top and bottom sides only), <code>"lhs"</code> (the left-hand side only), <code>"rhs"</code> (the right-hand side only), <code>"vsides"</code> (the right and left sides only), <code>"box"</code> (all four sides), <code>"border"</code> (all four sides). </td>
150     <td bgcolor="#ecf2f8" style=""><span>unspecified</span></td>
151     <td bgcolor="#ecf2f8" style=""><code>tableframe="hsides"</code></td>
152   </tr>
153   <tr>
154     <td bgcolor="#ffffff" style=""><code>tablerules</code></td>
155     <td bgcolor="#ffffff" style=""> Table rules, set to <code>"none"</code> (no rules), <code>"groups"</code> (rules will appear between row groups and column groups only), <code>"rows"</code> (rules will appear between rows only), <code>"cols"</code> (rules will appear between columns only), <code>"all"</code> (rules will appear between all rows and columns). </td>
156     <td bgcolor="#ffffff" style=""><span>unspecified</span></td>
157     <td bgcolor="#ffffff" style=""><code>tablerules="rows"</code></td>
158   </tr>
159   <tr>
160     <td bgcolor="#ecf2f8" style=""><code>cellpadding</code></td>
161     <td bgcolor="#ecf2f8" style=""> Cell padding (pixels). </td>
162     <td bgcolor="#ecf2f8" style=""><code>"0"</code></td>
163     <td bgcolor="#ecf2f8" style=""><code>cellpadding="0"</code></td>
164   </tr>
165   <tr>
166     <td bgcolor="#ffffff" style=""><code>cellspacing</code></td>
167     <td bgcolor="#ffffff" style=""> Cell spacing (pixels). </td>
168     <td bgcolor="#ffffff" style=""><code>"0"</code></td>
169     <td bgcolor="#ffffff" style=""><code>cellspacing="3"</code></td>
170   </tr>
171   <tr>
172     <td bgcolor="#ecf2f8" style=""><code>cellborder</code></td>
173     <td bgcolor="#ecf2f8" style=""> Cell border width (pixels). </td>
174     <td bgcolor="#ecf2f8" style=""><span>unspecified</span></td>
175     <td bgcolor="#ecf2f8" style=""><code>cellborder="0"</code></td>
176   </tr>
177   <tr>
178     <td bgcolor="#ffffff" style=""><code>valign</code></td>
179     <td bgcolor="#ffffff" style=""> Vertical alignment of cells and headers, set to <code>"top"</code>, <code>"middle"</code>, <code>"bottom"</code> or <code>"baseline"</code>. </td>
180     <td bgcolor="#ffffff" style=""><span>unspecified</span></td>
181     <td bgcolor="#ffffff" style=""><code>valign="top"</code></td>
182   </tr>
183   <tr>
184     <td bgcolor="#ecf2f8" style=""><code>headervalign</code></td>
185     <td bgcolor="#ecf2f8" style=""> Vertical alignment of header cells; overrides <code>valign</code>. </td>
186     <td bgcolor="#ecf2f8" style=""><span>unspecified</span></td>
187     <td bgcolor="#ecf2f8" style=""><code>headervalign="top"</code></td>
188   </tr>
189   <tr>
190     <td bgcolor="#ffffff" style=""><code>datavalign</code></td>
191     <td bgcolor="#ffffff" style=""> Vertical alignment of data cells; overrides <code>valign</code>. </td>
192     <td bgcolor="#ffffff" style=""><span>unspecified</span></td>
193     <td bgcolor="#ffffff" style=""><code>datavalign="top"</code></td>
194   </tr>
195   <tr>
196     <td bgcolor="#ecf2f8" style=""><code>headeralign</code></td>
197     <td bgcolor="#ecf2f8" style=""> Header cell alignment, one value for all columns, or a comma separated list for different alignment of individual columns. Set to <code>"left"</code>, <code>"center"</code>, <code>"right"</code> or <code>"justify"</code>. Overrides individual cell settings. </td>
198     <td bgcolor="#ecf2f8" style=""><span>unspecified</span></td>
199     <td bgcolor="#ecf2f8" style=""><code>headeralign="left,right"</code></td>
200   </tr>
201   <tr>
202     <td bgcolor="#ffffff" style=""><code>dataalign</code></td>
203     <td bgcolor="#ffffff" style=""> Data cell alignment, one value for all columns, or a comma separated list for different alignment of individual columns. Set to <code>"left"</code>, <code>"center"</code>, <code>"right"</code> or <code>"justify"</code>. Overrides individual cell settings. </td>
204     <td bgcolor="#ffffff" style=""><span>unspecified</span></td>
205     <td bgcolor="#ffffff" style=""><code>dataalign="center"</code></td>
206   </tr>
207   <tr>
208     <td bgcolor="#ecf2f8" style=""><code>tablewidth</code></td>
209     <td bgcolor="#ecf2f8" style=""> Table width: Percentage of window width, or absolute pixel value. </td>
210     <td bgcolor="#ecf2f8" style=""><span>unspecified</span></td>
211     <td bgcolor="#ecf2f8" style=""><code>tablewidth="100%"</code></td>
212   </tr>
213   <tr>
214     <td bgcolor="#ffffff" style=""><code>columnwidths</code></td>
215     <td bgcolor="#ffffff" style=""> Column widths: Comma delimited list of column widths, percentage or absolute pixel value. </td>
216     <td bgcolor="#ffffff" style=""><span>unspecified</span></td>
217     <td bgcolor="#ffffff" style=""><code>columnwidths="80%,20%"</code></td>
218   </tr>
219   <tr>
220     <td bgcolor="#ecf2f8" style=""><code>headerrows</code></td>
221     <td bgcolor="#ecf2f8" style=""> Number of header rows to exclude from sort. </td>
222     <td bgcolor="#ecf2f8" style=""><code>"1"</code></td>
223     <td bgcolor="#ecf2f8" style=""><code>headerrows="1"</code></td>
224   </tr>
225   <tr>
226     <td bgcolor="#ffffff" style=""><code>footerrows</code></td>
227     <td bgcolor="#ffffff" style=""> Number of footer rows to exclude from sort. </td>
228     <td bgcolor="#ffffff" style=""><code>"0"</code></td>
229     <td bgcolor="#ffffff" style=""><code>footerrows="1"</code></td>
230   </tr>
231   <tr>
232     <td bgcolor="#ecf2f8" style=""><code>id</code></td>
233     <td bgcolor="#ecf2f8" style=""> Table identifier string. </td>
234     <td bgcolor="#ecf2f8" style=""><span>unspecified</span></td>
235     <td bgcolor="#ecf2f8" style=""><code>id="userTable"</code></td>
236   </tr>
237   <tr>
238     <td bgcolor="#ffffff" style=""><code>summary</code></td>
239     <td bgcolor="#ffffff" style=""> Table summary used by screenreaders: A summary of what the table presents. It should provide an orientation for someone who listens to the table. </td>
240     <td bgcolor="#ffffff" style=""><span>unspecified</span></td>
241     <td bgcolor="#ffffff" style=""><code>summary="List of subscribed users"</code></td>
242   </tr>
243   <tr>
244     <td bgcolor="#ecf2f8" style=""><code>caption</code></td>
245     <td bgcolor="#ecf2f8" style=""> Table caption: A title that will be displayed just above the table. </td>
246     <td bgcolor="#ecf2f8" style=""><span>unspecified</span></td>
247     <td bgcolor="#ecf2f8" style=""><code>caption="Users"</code></td>
248   </tr>
249 </table>
250
251 The `%TABLE{...}%` settings override `TABLEATTRIBUTES` preferences settings, which override the `TABLEATTRIBUTES` Plugin settings.
252
253 ## <a name="Examples"></a> Examples
254
255 ### <a name="Use of %TABLE{...}%"></a> Use of %TABLE\{...\}%
256
257 Line before table: `%TABLE{ sort="on" tableborder="0" cellpadding="4" cellspacing="3" cellborder="0" headerbg="#D5CCB1" headercolor="#666666" databg="#FAF0D4, #F3DFA8" headerrows="2" footerrows="1" }%`
258
259 <table border="0" cellpadding="4" cellspacing="3" style="border-width: 0px">
260   <tr>
261     <th bgcolor="#D5CCB1" colspan="6" maxcols="0" style="border-width: 0px"><span><font color="#666666"> <strong> Table with two Header Rows and Footer Row </strong> </font></span></th>
262   </tr>
263   <tr>
264     <th bgcolor="#D5CCB1" maxcols="0" style="border-width: 0px"><a href="http://localhost?sortcol=0;table=3;up=0#sorted_table" rel="nofollow" title="Sort by this column"><font color="#666666">Num</font></a></th>
265     <th bgcolor="#D5CCB1" maxcols="0" style="border-width: 0px"><a href="http://localhost?sortcol=1;table=3;up=0#sorted_table" rel="nofollow" title="Sort by this column"><font color="#666666">Status</font></a></th>
266     <th bgcolor="#D5CCB1" maxcols="0" style="border-width: 0px"><a href="http://localhost?sortcol=2;table=3;up=0#sorted_table" rel="nofollow" title="Sort by this column"><font color="#666666">Action</font></a></th>
267     <th bgcolor="#D5CCB1" maxcols="0" style="border-width: 0px"><a href="http://localhost?sortcol=3;table=3;up=0#sorted_table" rel="nofollow" title="Sort by this column"><font color="#666666">Who</font></a></th>
268     <th bgcolor="#D5CCB1" maxcols="0" style="border-width: 0px"><a href="http://localhost?sortcol=4;table=3;up=0#sorted_table" rel="nofollow" title="Sort by this column"><font color="#666666">When</font></a></th>
269     <th bgcolor="#D5CCB1" maxcols="0" style="border-width: 0px"><a href="http://localhost?sortcol=5;table=3;up=0#sorted_table" rel="nofollow" title="Sort by this column"><font color="#666666">Progress</font></a></th>
270   </tr>
271   <tr>
272     <td bgcolor="#FAF0D4" style="border-width: 0px"> 1 </td>
273     <td bgcolor="#FAF0D4" style="border-width: 0px"> C </td>
274     <td bgcolor="#FAF0D4" style="border-width: 0px"> Chose new colours </td>
275     <td bgcolor="#FAF0D4" style="border-width: 0px"> John </td>
276     <td bgcolor="#FAF0D4" style="border-width: 0px"> 1-Dec-02 </td>
277     <td bgcolor="#FAF0D4" style="border-width: 0px">   </td>
278   </tr>
279   <tr>
280     <td bgcolor="#F3DFA8" style="border-width: 0px"> 2 </td>
281     <td bgcolor="#F3DFA8" style="border-width: 0px"> X </td>
282     <td bgcolor="#F3DFA8" style="border-width: 0px"> Release </td>
283     <td bgcolor="#F3DFA8" style="border-width: 0px"> John </td>
284     <td bgcolor="#F3DFA8" style="border-width: 0px"> 1-Apr-02 </td>
285     <td bgcolor="#F3DFA8" style="border-width: 0px">   </td>
286   </tr>
287   <tr>
288     <td bgcolor="#FAF0D4" style="border-width: 0px"> 3 </td>
289     <td bgcolor="#FAF0D4" style="border-width: 0px">   </td>
290     <td bgcolor="#FAF0D4" style="border-width: 0px"> Get feedback </td>
291     <td bgcolor="#FAF0D4" style="border-width: 0px"> Anne </td>
292     <td bgcolor="#FAF0D4" style="border-width: 0px"> 1-Feb-02 </td>
293     <td bgcolor="#FAF0D4" style="border-width: 0px">   </td>
294   </tr>
295   <tr>
296     <td bgcolor="#F3DFA8" style="border-width: 0px"> 12 </td>
297     <td bgcolor="#F3DFA8" style="border-width: 0px"> C </td>
298     <td bgcolor="#F3DFA8" style="border-width: 0px"> Spec error handling </td>
299     <td bgcolor="#F3DFA8" style="border-width: 0px"> Jack </td>
300     <td bgcolor="#F3DFA8" style="border-width: 0px"> 1-Dec-02 </td>
301     <td bgcolor="#F3DFA8" style="border-width: 0px">   </td>
302   </tr>
303   <tr>
304     <td bgcolor="#FAF0D4" style="border-width: 0px"> 5 </td>
305     <td bgcolor="#FAF0D4" style="border-width: 0px">   </td>
306     <td bgcolor="#FAF0D4" style="border-width: 0px"> Abc </td>
307     <td bgcolor="#FAF0D4" style="border-width: 0px"> John </td>
308     <td bgcolor="#FAF0D4" style="border-width: 0px">   </td>
309     <td bgcolor="#FAF0D4" style="border-width: 0px">   </td>
310   </tr>
311   <tr>
312     <th bgcolor="#D5CCB1" maxcols="0" style="border-width: 0px"><span><font color="#666666"> <strong> Num </strong> </font></span></th>
313     <th bgcolor="#D5CCB1" maxcols="0" style="border-width: 0px"><span><font color="#666666"> <strong> Status </strong> </font></span></th>
314     <th bgcolor="#D5CCB1" maxcols="0" style="border-width: 0px"><span><font color="#666666"> <strong> Action </strong> </font></span></th>
315     <th bgcolor="#D5CCB1" maxcols="0" style="border-width: 0px"><span><font color="#666666"> <strong> Who </strong> </font></span></th>
316     <th bgcolor="#D5CCB1" maxcols="0" style="border-width: 0px"><span><font color="#666666"> <strong> When </strong> </font></span></th>
317     <th bgcolor="#D5CCB1" maxcols="0" style="border-width: 0px"><span><font color="#666666"> <strong> Progress </strong> </font></span></th>
318   </tr>
319 </table>
320
321 ### <a name="Table with 4 digit year dates an"></a> Table with 4 digit year dates and no use of %TABLE\{...\}%
322
323 <table border="1" cellpadding="0" cellspacing="0" style="border-width: 1px">
324   <tr>
325     <th bgcolor="#6b7f93" maxcols="0" style=""><a href="http://localhost?sortcol=0;table=4;up=0#sorted_table" rel="nofollow" title="Sort by this column"><font color="#ffffff">When</font></a></th>
326   </tr>
327   <tr>
328     <td bgcolor="#ecf2f8" style=""> 1-Jan-2004 </td>
329   </tr>
330   <tr>
331     <td bgcolor="#ffffff" style=""> 1-Jan-2003 </td>
332   </tr>
333   <tr>
334     <td bgcolor="#ecf2f8" style=""> 2-Jan-2005 </td>
335   </tr>
336 </table>
337
338 ## <a name="Plugin Installation Instructions"></a> Plugin Installation Instructions
339
340 This plugin is pre-installed with your TWiki release. You should not have to install it other than to do an upgrade.
341
342 - Download the ZIP file from the Plugin web (see below)
343 - Unzip <code>**%TOPIC%.zip**</code> in your twiki installation directory. Content: <table border="1" cellpadding="0" cellspacing="0" style="border-width: 1px">
344   <tr>
345     <th bgcolor="#6b7f93" maxcols="0" style=""><a href="http://localhost?sortcol=0;table=5;up=0#sorted_table" rel="nofollow" title="Sort by this column"><font color="#ffffff">File:</font></a></th>
346     <th bgcolor="#6b7f93" maxcols="0" style=""><a href="http://localhost?sortcol=1;table=5;up=0#sorted_table" rel="nofollow" title="Sort by this column"><font color="#ffffff">Description:</font></a></th>
347   </tr>
348   <tr>
349     <td bgcolor="#ecf2f8" style=""><code><b>data/TWiki/%TOPIC%.txt</b></code></td>
350     <td bgcolor="#ecf2f8" style=""> Plugin topic </td>
351   </tr>
352   <tr>
353     <td bgcolor="#ffffff" style=""><code><b>data/TWiki/%TOPIC%.txt,v</b></code></td>
354     <td bgcolor="#ffffff" style=""> Plugin topic repository </td>
355   </tr>
356   <tr>
357     <td bgcolor="#ecf2f8" style=""><code><b>lib/TWiki/Plugins/%TOPIC%.pm</b></code></td>
358     <td bgcolor="#ecf2f8" style=""> Plugin Perl module </td>
359   </tr>
360   <tr>
361     <td bgcolor="#ffffff" style=""><code><b>pub/TWiki/%TOPIC%/diamond.gif</b></code></td>
362     <td bgcolor="#ffffff" style=""> Diamond symbol </td>
363   </tr>
364   <tr>
365     <td bgcolor="#ecf2f8" style=""><code><b>pub/TWiki/%TOPIC%/down.gif</b></code></td>
366     <td bgcolor="#ecf2f8" style=""> Down arrow </td>
367   </tr>
368   <tr>
369     <td bgcolor="#ffffff" style=""><code><b>pub/TWiki/%TOPIC%/up.gif</b></code></td>
370     <td bgcolor="#ffffff" style=""> Up arrow </td>
371   </tr>
372 </table>
373 - (Dakar) Visit `configure` in your TWiki installation, and enable the plugin in the \{Plugins\} section.
374 - Test if the plugin is correctly installed:
375   - Check above example if the table renders as expected
376   - Try click on heading to sort. Other tables should also be sortable
377
378 ## <a name="Plugin Info"></a> Plugin Info
379
380 <table border="1" cellpadding="0" cellspacing="0" style="border-width: 1px">
381   <tr>
382     <td align="right" bgcolor="#ecf2f8" style=""> Plugin Author: </td>
383     <td bgcolor="#ecf2f8" style=""> TWiki:Main/JohnTalintyre, TWiki:Main/PeterThoeny </td>
384   </tr>
385   <tr>
386     <td align="right" bgcolor="#ffffff" style=""> Plugin Version: </td>
387     <td bgcolor="#ffffff" style=""> 1.020 </td>
388   </tr>
389   <tr>
390     <td align="right" bgcolor="#ecf2f8" style=""> Change History: </td>
391     <td bgcolor="#ecf2f8" style="">  </td>
392   </tr>
393   <tr>
394     <td align="right" bgcolor="#ffffff" style=""> 27 Dec 2006 </td>
395     <td bgcolor="#ffffff" style=""> 1.020: Kenneth Lavrsen: Fixed initsort so all tables can be initsorted and not only the first. When you sort a table by clicking on the header of a column the table gets sorted accordingly. When you click the header of another table the previously sorted table goes back being sorted as specified by initsort. </td>
396   </tr>
397   <tr>
398     <td align="right" bgcolor="#ecf2f8" style=""> 13 Dec 2006 </td>
399     <td bgcolor="#ecf2f8" style=""> 1.019: Arthur Clemens: Prevent sorting of columns that do no exist. </td>
400   </tr>
401   <tr>
402     <td align="right" bgcolor="#ffffff" style=""> 02 Dec 2006 </td>
403     <td bgcolor="#ffffff" style=""> 1.018: Arthur Clemens: Data rows now start with first <code>datacolor</code> and <code>databgcolor</code>. </td>
404   </tr>
405   <tr>
406     <td align="right" bgcolor="#ecf2f8" style=""> 26 Nov 2006 </td>
407     <td bgcolor="#ecf2f8" style=""> 1.017: Arthur Clemens: Better support for <code>tablerules</code>. </td>
408   </tr>
409   <tr>
410     <td align="right" bgcolor="#ffffff" style=""> 24 Nov 2006 </td>
411     <td bgcolor="#ffffff" style=""> 1.016: Arthur Clemens: Added new attribute <code>cellborder</code>. </td>
412   </tr>
413   <tr>
414     <td align="right" bgcolor="#ecf2f8" style=""> 25 Oct 2006 </td>
415     <td bgcolor="#ecf2f8" style=""> 1.015: Arthur Clemens: Added support for background colors of sorted column. Columns can be unsorted - sorting order is now: sort ascending, sort descending, unsort. Added attributes <code>headervalign</code> and <code>datavalign</code>. </td>
416   </tr>
417   <tr>
418     <td align="right" bgcolor="#ffffff" style=""> 16 Aug 2006 </td>
419     <td bgcolor="#ffffff" style=""> Michael Daum: Added CSS support for even/odd table rows </td>
420   </tr>
421   <tr>
422     <td align="right" bgcolor="#ecf2f8" style=""> 13 Dec 2005 </td>
423     <td bgcolor="#ecf2f8" style=""> Arthur Clemens: Added support for <code>id</code>, <code>summary</code> and <code>caption</code></td>
424   </tr>
425   <tr>
426     <td align="right" bgcolor="#ffffff" style=""> 05 Mar 2005 </td>
427     <td bgcolor="#ffffff" style=""> 1.014: Crawford Currie eliminated deprecated handlers for Dakar </td>
428   </tr>
429   <tr>
430     <td align="right" bgcolor="#ecf2f8" style=""> 01 Aug 2004 </td>
431     <td bgcolor="#ecf2f8" style=""> Arthur Clemens: Added CSS support for first column and ascending/descending table headers </td>
432   </tr>
433   <tr>
434     <td align="right" bgcolor="#ffffff" style=""> 21 Mar 2004 </td>
435     <td bgcolor="#ffffff" style=""> PTh: Internal change: Fixed reference to unofficial variable </td>
436   </tr>
437   <tr>
438     <td align="right" bgcolor="#ecf2f8" style=""> 01 Jan 2004 </td>
439     <td bgcolor="#ecf2f8" style=""> PTh: Alternating data row colors restart again after each header row </td>
440   </tr>
441   <tr>
442     <td align="right" bgcolor="#ffffff" style=""> 01 Dec 2003 </td>
443     <td bgcolor="#ffffff" style=""> PTh: Fixed error when footerrows was specified on an empty table, contributed by TWiki:Main/PaulineCheung </td>
444   </tr>
445   <tr>
446     <td align="right" bgcolor="#ecf2f8" style=""> 24 May 2003 </td>
447     <td bgcolor="#ecf2f8" style=""> PTh: New <code>|^|</code> rule for multi row span (TWiki:Main/WalterMundt); added tableframe and tablerules (TWiki:Main/JohannesMartin); ignore columnwidths for multi column span; validate headerrows and footerrows (TWiki:Main/DarrylGreen); fixed link color problem and up/down icon color problem for dark header background </td>
448   </tr>
449   <tr>
450     <td align="right" bgcolor="#ffffff" style=""> 17 Dec 2002 </td>
451     <td bgcolor="#ffffff" style=""> PTh: Removed individual table Plugin settings; added TABLEATTRIBUTES Plugins setting and TABLEATTRIBUTES preferences setting </td>
452   </tr>
453   <tr>
454     <td align="right" bgcolor="#ecf2f8" style=""> 15 Dec 2002 </td>
455     <td bgcolor="#ecf2f8" style=""> PTh: Added headerrows and footerrows params (TWiki:Main/DarrylGreen, TWiki:Main/WoutMertens); added tablewidth and columnwidths params (TWiki:Main/ThorstenSommermann) </td>
456   </tr>
457   <tr>
458     <td align="right" bgcolor="#ffffff" style=""> 09 Dec 2002 </td>
459     <td bgcolor="#ffffff" style=""> PTh: Added headercolor and datacolor parameters </td>
460   </tr>
461   <tr>
462     <td align="right" bgcolor="#ecf2f8" style=""> 05 Jun 2002 </td>
463     <td bgcolor="#ecf2f8" style=""> PTh: Added "none" value to databg parameter (suggested by TWiki:Main/TaitCyrus); fixed sorting by stripping HTML tags, removing links and making sort ignore case (suggested by TWiki:Main/ShawnBradford) </td>
464   </tr>
465   <tr>
466     <td align="right" bgcolor="#ffffff" style=""> 13 Mar 2002 </td>
467     <td bgcolor="#ffffff" style=""> PTh: Added TWiki:Main/ShawnBradford 's initsort and initdirection </td>
468   </tr>
469   <tr>
470     <td align="right" bgcolor="#ecf2f8" style=""> 12 Mar 2002 </td>
471     <td bgcolor="#ecf2f8" style=""> PTh: Added valign, headeralign and dataalign; fixed bug of swapped cellpadding/cellspacing; fixed warning of uninitialized value </td>
472   </tr>
473   <tr>
474     <td align="right" bgcolor="#ffffff" style=""> 05 Jan 2002 </td>
475     <td bgcolor="#ffffff" style=""> PTh: Fixed sorting bug of cells with leading white space </td>
476   </tr>
477   <tr>
478     <td align="right" bgcolor="#ecf2f8" style=""> 06 Dec 2001 </td>
479     <td bgcolor="#ecf2f8" style=""> PTh: Fixed date sorting bug <br /> 03 Dec 2001 PTh: Fixed sort="off" bug and more </td>
480   </tr>
481   <tr>
482     <td align="right" bgcolor="#ffffff" style=""> 29 Nov 2001 </td>
483     <td bgcolor="#ffffff" style=""> PTh: Fixed Perl warnings </td>
484   </tr>
485   <tr>
486     <td align="right" bgcolor="#ecf2f8" style=""> 16 Nov 2001 </td>
487     <td bgcolor="#ecf2f8" style=""> PTh: Added table border, cell spacing, cell padding, gif files </td>
488   </tr>
489   <tr>
490     <td align="right" bgcolor="#ffffff" style=""> 07 Oct 2001 </td>
491     <td bgcolor="#ffffff" style=""> JT: Initial version </td>
492   </tr>
493   <tr>
494     <td align="right" bgcolor="#ecf2f8" style=""> CPAN Dependencies: </td>
495     <td bgcolor="#ecf2f8" style=""> none </td>
496   </tr>
497   <tr>
498     <td align="right" bgcolor="#ffffff" style=""> Other Dependencies: </td>
499     <td bgcolor="#ffffff" style=""> none </td>
500   </tr>
501   <tr>
502     <td align="right" bgcolor="#ecf2f8" style=""> Perl Version: </td>
503     <td bgcolor="#ecf2f8" style=""> 5.0 </td>
504   </tr>
505   <tr>
506     <td align="right" bgcolor="#ffffff" style=""> Plugin Home: </td>
507     <td bgcolor="#ffffff" style=""><a href="http://TWiki.org/cgi-bin/view/Plugins/%TOPIC%" target="_top">http://TWiki.org/cgi-bin/view/Plugins/%TOPIC%</a></td>
508   </tr>
509   <tr>
510     <td align="right" bgcolor="#ecf2f8" style=""> Feedback: </td>
511     <td bgcolor="#ecf2f8" style=""><a href="http://TWiki.org/cgi-bin/view/Plugins/%TOPIC%Dev" target="_top">http://TWiki.org/cgi-bin/view/Plugins/%TOPIC%Dev</a></td>
512   </tr>
513 </table>
514
515 **_Related Topics:_** [[TWikiPreferences]], [[TWikiPlugins]], [[StandardColors]]