none
[openafs-wiki.git] / TWiki / RenderListPlugin.mdwn
1 # <a name="Render List Plugin"></a> Render List Plugin
2
3 Render bullet lists in a variety of formats
4
5 ## <a name="Syntax Rules"></a> Syntax Rules
6
7 - Put a `%RENDERLIST{ theme="name" }%` or simply `%RENDERLIST{"name"}%` before any bullet list
8   - The lists can be handcrafted, generated by another Plugin, a `%TOC%`, or the result of a [[FormattedSearch]]
9 - Rendering themes can be defined by `<name>_THEME` Plugin settings
10   - Each theme is defined by a comma separated list containing the render type and parameters required by that render type
11   - There are different render types; this initial Plugin version has **tree** and **icon** render types
12 - Format of the **tree** render type:
13   - `Set <name>_THEME = tree, <0/1 flag to suppress/show lines of first level>`
14 - Format of the **icon** render type:
15   - `Set <name>_THEME = icon, <0/1 flag to suppress/show lines of first level>, <icon width>, <icon height>, <spacer graph>, <T-line graph>, <I-line graph>, <L-line graph>, <icon image>`
16   - To define new Icon themes, attach images to this Plugin topic and set the parameters accordingly
17
18 ## <a name="Examples"></a> Examples
19
20 <table border="0" cellpadding="3" cellspacing="5">
21   <tr>
22     <th bgcolor="#CCCCC" valign="top"><strong><em>You type:</em></strong></th>
23     <th bgcolor="#CCCCC" valign="top"><strong><em>You get: (simulated)</em></strong></th>
24     <th bgcolor="#CCCCC" valign="top"><strong><em>You get: (if installed)</em></strong></th>
25   </tr>
26   <tr>
27     <td bgcolor="#EEEEEE" valign="top"><pre>
28 %RENDERLIST{"thread"}%
29         * one
30                 * one.a
31                         * one.a.x
32                 * one.b
33                         * one.b.x
34                           continue
35                         * one.b.y
36                           continue
37         * two
38         * three
39 </pre></td>
40     <td bgcolor="#EEEEEE" valign="top">
41       <p>
42       </p>
43       <table border="0" cellpadding="0" cellspacing="0">
44         <tr>
45           <td valign="top"><img alt="" border="0" height="16" src="http://www.dementia.org/twiki//view/dot_udr.gif" width="16" /></td>
46           <td colspan="3" valign="top"><nobr> one </nobr></td>
47         </tr>
48         <tr>
49           <td valign="top"><img alt="" border="0" height="16" src="http://www.dementia.org/twiki//view/dot_ud.gif" width="16" /></td>
50           <td valign="top"><img alt="" border="0" height="16" src="http://www.dementia.org/twiki//view/dot_udr.gif" width="16" /></td>
51           <td colspan="2" valign="top"><nobr> one.a </nobr></td>
52         </tr>
53         <tr>
54           <td valign="top"><img alt="" border="0" height="16" src="http://www.dementia.org/twiki//view/dot_ud.gif" width="16" /></td>
55           <td valign="top"><img alt="" border="0" height="16" src="http://www.dementia.org/twiki//view/dot_ud.gif" width="16" /></td>
56           <td valign="top"><img alt="" border="0" height="16" src="http://www.dementia.org/twiki//view/dot_ur.gif" width="16" /></td>
57           <td colspan="1" valign="top"><nobr> one.a.x </nobr></td>
58         </tr>
59         <tr>
60           <td valign="top"><img alt="" border="0" height="16" src="http://www.dementia.org/twiki//view/dot_ud.gif" width="16" /></td>
61           <td valign="top"><img alt="" border="0" height="16" src="http://www.dementia.org/twiki//view/dot_ur.gif" width="16" /></td>
62           <td colspan="2" valign="top"><nobr> one.b </nobr></td>
63         </tr>
64         <tr>
65           <td valign="top"><img alt="" border="0" height="16" src="http://www.dementia.org/twiki//view/dot_ud.gif" width="16" /></td>
66           <td valign="top"><img alt="" border="0" height="16" src="http://www.dementia.org/twiki//view/empty.gif" width="16" /></td>
67           <td valign="top"><img alt="" border="0" height="16" src="http://www.dementia.org/twiki//view/dot_udr.gif" width="16" /></td>
68           <td colspan="1" valign="top"><nobr> one.b.x </nobr></td>
69         </tr>
70         <tr>
71           <td valign="top"><img alt="" border="0" height="16" src="http://www.dementia.org/twiki//view/dot_ud.gif" width="16" /></td>
72           <td valign="top"><img alt="" border="0" height="16" src="http://www.dementia.org/twiki//view/empty.gif" width="16" /></td>
73           <td valign="top"><img alt="" border="0" height="16" src="http://www.dementia.org/twiki//view/dot_ud.gif" width="16" /></td>
74           <td colspan="1" valign="top"><nobr> continue </nobr></td>
75         </tr>
76         <tr>
77           <td valign="top"><img alt="" border="0" height="16" src="http://www.dementia.org/twiki//view/dot_ud.gif" width="16" /></td>
78           <td valign="top"><img alt="" border="0" height="16" src="http://www.dementia.org/twiki//view/empty.gif" width="16" /></td>
79           <td valign="top"><img alt="" border="0" height="16" src="http://www.dementia.org/twiki//view/dot_ur.gif" width="16" /></td>
80           <td colspan="1" valign="top"><nobr> one.b.y </nobr></td>
81         </tr>
82         <tr>
83           <td valign="top"><img alt="" border="0" height="16" src="http://www.dementia.org/twiki//view/dot_ud.gif" width="16" /></td>
84           <td valign="top"><img alt="" border="0" height="16" src="http://www.dementia.org/twiki//view/empty.gif" width="16" /></td>
85           <td valign="top"><img alt="" border="0" height="16" src="http://www.dementia.org/twiki//view/empty.gif" width="16" /></td>
86           <td colspan="1" valign="top"><nobr> continue </nobr></td>
87         </tr>
88         <tr>
89           <td valign="top"><img alt="" border="0" height="16" src="http://www.dementia.org/twiki//view/dot_udr.gif" width="16" /></td>
90           <td colspan="3" valign="top"><nobr> two </nobr></td>
91         </tr>
92         <tr>
93           <td valign="top"><img alt="" border="0" height="16" src="http://www.dementia.org/twiki//view/dot_ur.gif" width="16" /></td>
94           <td colspan="3" valign="top"><nobr> three </nobr></td>
95         </tr>
96       </table>
97       <p>
98       </p>
99     </td>
100     <td bgcolor="#EEEEEE" valign="top">
101       <p> %RENDERLIST{"thread"}% </p>
102       <ul>
103         <li> one <ul>
104             <li> one.a <ul>
105                 <li> one.a.x </li>
106               </ul>
107             </li>
108             <li> one.b <ul>
109                 <li> one.b.x continue </li>
110                 <li> one.b.y continue </li>
111               </ul>
112             </li>
113           </ul>
114         </li>
115         <li> two </li>
116         <li> three </li>
117       </ul>
118       <p>
119       </p>
120     </td>
121   </tr>
122   <tr>
123     <td bgcolor="#EEEEEE" valign="top"><pre>
124 %RENDERLIST{"org"}%
125         * one
126                 * one.a
127                         * one.a.x
128                 * one.b
129                         * one.b.x
130                           continue
131                         * one.b.y
132                           continue
133         * two
134         * three
135 </pre></td>
136     <td bgcolor="#EEEEEE" valign="top">
137       <p>
138       </p>
139       <table border="0" cellpadding="0" cellspacing="0">
140         <tr>
141           <td valign="top"><img alt="" border="0" height="16" src="http://www.dementia.org/twiki//view/home.gif" width="16" /></td>
142           <td colspan="3" valign="top"><nobr>  one </nobr></td>
143         </tr>
144         <tr>
145           <td valign="top"><img alt="" border="0" height="16" src="http://www.dementia.org/twiki//view/dot_udr.gif" width="16" /></td>
146           <td valign="top"><img alt="" border="0" height="16" src="http://www.dementia.org/twiki//view/home.gif" width="16" /></td>
147           <td colspan="2" valign="top"><nobr>  one.a </nobr></td>
148         </tr>
149         <tr>
150           <td valign="top"><img alt="" border="0" height="16" src="http://www.dementia.org/twiki//view/dot_ud.gif" width="16" /></td>
151           <td valign="top"><img alt="" border="0" height="16" src="http://www.dementia.org/twiki//view/dot_ur.gif" width="16" /></td>
152           <td valign="top"><img alt="" border="0" height="16" src="http://www.dementia.org/twiki//view/home.gif" width="16" /></td>
153           <td colspan="1" valign="top"><nobr>  one.a.x </nobr></td>
154         </tr>
155         <tr>
156           <td valign="top"><img alt="" border="0" height="16" src="http://www.dementia.org/twiki//view/dot_ur.gif" width="16" /></td>
157           <td valign="top"><img alt="" border="0" height="16" src="http://www.dementia.org/twiki//view/home.gif" width="16" /></td>
158           <td colspan="2" valign="top"><nobr>  one.b </nobr></td>
159         </tr>
160         <tr>
161           <td valign="top"><img alt="" border="0" height="16" src="http://www.dementia.org/twiki//view/empty.gif" width="16" /></td>
162           <td valign="top"><img alt="" border="0" height="16" src="http://www.dementia.org/twiki//view/dot_udr.gif" width="16" /></td>
163           <td valign="top"><img alt="" border="0" height="16" src="http://www.dementia.org/twiki//view/home.gif" width="16" /></td>
164           <td colspan="1" valign="top"><nobr>  one.b.x </nobr></td>
165         </tr>
166         <tr>
167           <td valign="top"><img alt="" border="0" height="16" src="http://www.dementia.org/twiki//view/empty.gif" width="16" /></td>
168           <td valign="top"><img alt="" border="0" height="16" src="http://www.dementia.org/twiki//view/dot_ud.gif" width="16" /></td>
169           <td valign="top"><img alt="" border="0" height="16" src="http://www.dementia.org/twiki//view/empty.gif" width="16" /></td>
170           <td colspan="1" valign="top"><nobr>  continue </nobr></td>
171         </tr>
172         <tr>
173           <td valign="top"><img alt="" border="0" height="16" src="http://www.dementia.org/twiki//view/empty.gif" width="16" /></td>
174           <td valign="top"><img alt="" border="0" height="16" src="http://www.dementia.org/twiki//view/dot_ur.gif" width="16" /></td>
175           <td valign="top"><img alt="" border="0" height="16" src="http://www.dementia.org/twiki//view/home.gif" width="16" /></td>
176           <td colspan="1" valign="top"><nobr>  one.b.y </nobr></td>
177         </tr>
178         <tr>
179           <td valign="top"><img alt="" border="0" height="16" src="http://www.dementia.org/twiki//view/empty.gif" width="16" /></td>
180           <td valign="top"><img alt="" border="0" height="16" src="http://www.dementia.org/twiki//view/empty.gif" width="16" /></td>
181           <td valign="top"><img alt="" border="0" height="16" src="http://www.dementia.org/twiki//view/empty.gif" width="16" /></td>
182           <td colspan="1" valign="top"><nobr>  continue </nobr></td>
183         </tr>
184         <tr>
185           <td valign="top"><img alt="" border="0" height="16" src="http://www.dementia.org/twiki//view/home.gif" width="16" /></td>
186           <td colspan="3" valign="top"><nobr>  two </nobr></td>
187         </tr>
188         <tr>
189           <td valign="top"><img alt="" border="0" height="16" src="http://www.dementia.org/twiki//view/home.gif" width="16" /></td>
190           <td colspan="3" valign="top"><nobr>  three </nobr></td>
191         </tr>
192       </table>
193       <p>
194       </p>
195     </td>
196     <td bgcolor="#EEEEEE" valign="top">
197       <p> %RENDERLIST{"org"}% </p>
198       <ul>
199         <li> one <ul>
200             <li> one.a <ul>
201                 <li> one.a.x </li>
202               </ul>
203             </li>
204             <li> one.b <ul>
205                 <li> one.b.x continue </li>
206                 <li> one.b.y continue </li>
207               </ul>
208             </li>
209           </ul>
210         </li>
211         <li> two </li>
212         <li> three </li>
213       </ul>
214       <p>
215       </p>
216     </td>
217   </tr>
218 </table>
219
220 ## <a name="%TOPIC% Settings"></a> %TOPIC% Settings
221
222 Plugin settings are stored as preferences variables. To reference a plugin setting write <code>**%&lt;plugin&gt;\_&lt;setting&gt;%**</code>, i.e. <code>**%RENDERPLUGIN\_SHORTDESCRIPTION%**</code>
223
224 - One line description, is shown in the [[TextFormattingRules]] topic:
225   - Set SHORTDESCRIPTION = Render bullet lists in a variety of formats
226
227 - Debug plugin: (See output in `data/debug.txt`)
228   - Set DEBUG = 0
229
230 - Themes are named `<SOMETHING>_THEME` and contain a comma delimited list of render type with parameters:
231   - Set THREAD\_THEME = tree, 1
232   - Set HOME\_THEME = icon, 1, 16, 16, ![empty.gif](http://www.dementia.org/twiki//view/empty.gif), ![dot\_udr.gif](http://www.dementia.org/twiki//view/dot_udr.gif), ![dot\_ud.gif](http://www.dementia.org/twiki//view/dot_ud.gif), ![dot\_ur.gif](http://www.dementia.org/twiki//view/dot_ur.gif), ![home.gif](http://www.dementia.org/twiki//view/home.gif)
233   - Set ORG\_THEME = icon, 0, 16, 16, ![empty.gif](http://www.dementia.org/twiki//view/empty.gif), ![dot\_udr.gif](http://www.dementia.org/twiki//view/dot_udr.gif), ![dot\_ud.gif](http://www.dementia.org/twiki//view/dot_ud.gif), ![dot\_ur.gif](http://www.dementia.org/twiki//view/dot_ur.gif), ![home.gif](http://www.dementia.org/twiki//view/home.gif)
234   - Set GROUP\_THEME = icon, 0, 16, 16, ![empty.gif](http://www.dementia.org/twiki//view/empty.gif), ![dot\_udr.gif](http://www.dementia.org/twiki//view/dot_udr.gif), ![dot\_ud.gif](http://www.dementia.org/twiki//view/dot_ud.gif), ![dot\_ur.gif](http://www.dementia.org/twiki//view/dot_ur.gif), ![group.gif](http://www.dementia.org/twiki//view/group.gif)
235   - Set EMAIL\_THEME = icon, 0, 16, 16, ![empty.gif](http://www.dementia.org/twiki//view/empty.gif), ![dot\_udr.gif](http://www.dementia.org/twiki//view/dot_udr.gif), ![dot\_ud.gif](http://www.dementia.org/twiki//view/dot_ud.gif), ![dot\_ur.gif](http://www.dementia.org/twiki//view/dot_ur.gif), ![email.gif](http://www.dementia.org/twiki//view/email.gif)
236
237 ## <a name="Plugin Installation Instructions"></a> Plugin Installation Instructions
238
239 **_Note:_** You do not need to install anything on the browser to use this plugin. The following instructions are for the administrator who installs the plugin on the server where TWiki is running.
240
241 - Download the ZIP file from the Plugin web (see below)
242 - Unzip <code>**%TOPIC%.zip**</code> in your twiki installation directory. Content: <table border="1" cellpadding="0" cellspacing="0">
243   <tr>
244     <th bgcolor="#99CCCC"><strong> File: </strong></th>
245     <th bgcolor="#99CCCC"><strong> Description: </strong></th>
246   </tr>
247   <tr>
248     <td><code><b>data/TWiki/%TOPIC%.txt</b></code></td>
249     <td> Plugin topic </td>
250   </tr>
251   <tr>
252     <td><code><b>data/TWiki/%TOPIC%.txt,v</b></code></td>
253     <td> Plugin topic repository </td>
254   </tr>
255   <tr>
256     <td><code><b>lib/TWiki/Plugins/%TOPIC%.pm</b></code></td>
257     <td> Plugin Perl module </td>
258   </tr>
259   <tr>
260     <td><code><b>pub/TWiki/%TOPIC%/*.gif</b></code></td>
261     <td> Image files for themes </td>
262   </tr>
263 </table>
264 - Test if the installation was successful:
265   - See if the above example works
266
267 ## <a name="Plugin Info"></a> Plugin Info
268
269 <table border="1" cellpadding="0" cellspacing="0">
270   <tr>
271     <td align="right"> Plugin Author: </td>
272     <td> TWiki:Main/PeterThoeny </td>
273   </tr>
274   <tr>
275     <td align="right"> Plugin Version: </td>
276     <td> 05 Dec 2003 (V1.010) </td>
277   </tr>
278   <tr>
279     <td align="right"> Change History: </td>
280     <td>  </td>
281   </tr>
282   <tr>
283     <td align="right"> 05 Dec 2003: </td>
284     <td> Fixed rendering issue with IE, added EMAIL_THEME </td>
285   </tr>
286   <tr>
287     <td align="right"> 02 Dec 2003: </td>
288     <td> Initial version </td>
289   </tr>
290   <tr>
291     <td align="right"> CPAN Dependencies: </td>
292     <td> none </td>
293   </tr>
294   <tr>
295     <td align="right"> Other Dependencies: </td>
296     <td> none </td>
297   </tr>
298   <tr>
299     <td align="right"> Perl Version: </td>
300     <td> 5.005 </td>
301   </tr>
302   <tr>
303     <td align="right"> Plugin Home: </td>
304     <td><a href="http://TWiki.org/cgi-bin/view/Plugins/%TOPIC%" target="_top">http://TWiki.org/cgi-bin/view/Plugins/%TOPIC%</a></td>
305   </tr>
306   <tr>
307     <td align="right"> Feedback: </td>
308     <td><a href="http://TWiki.org/cgi-bin/view/Plugins/%TOPIC%Dev" target="_top">http://TWiki.org/cgi-bin/view/Plugins/%TOPIC%Dev</a></td>
309   </tr>
310 </table>
311
312 **_Related Topics:_** [[TWikiPreferences]], [[TWikiPlugins]], TWiki:Plugins/TreePlugin
313
314 -- TWiki:Main/PeterThoeny - 05 Dec 2003