none
authorPeterThoeny <PeterThoeny>
Thu, 4 Dec 2003 06:38:00 +0000 (06:38 +0000)
committerPeterThoeny <PeterThoeny>
Thu, 4 Dec 2003 06:38:00 +0000 (06:38 +0000)
TWiki/RenderListPlugin.mdwn [new file with mode: 0644]

diff --git a/TWiki/RenderListPlugin.mdwn b/TWiki/RenderListPlugin.mdwn
new file mode 100644 (file)
index 0000000..2891a16
--- /dev/null
@@ -0,0 +1,309 @@
+# <a name="Render List Plugin"></a> Render List Plugin
+
+Render bullet lists in a variety of formats
+
+## <a name="Syntax Rules"></a> Syntax Rules
+
+- Put a `%RENDERLIST{ theme="name" }%` or simply `%RENDERLIST{"name"}%` before any bullet list
+  - The lists can be handcrafted, generated by another Plugin, a `%TOC%`, or the result of a [[FormattedSearch]]
+- Rendering themes can be defined by `<name>_THEME` Plugin settings
+  - Each theme is defined by a comma separated list containing the render type and parameters required by that render type
+  - There are different render types; this initial Plugin version has **tree** and **icon** render types
+- Format of the **tree** render type:
+  - `Set <name>_THEME = tree, <0/1 flag to suppress/show lines of first level>`
+- Format of the **icon** render type:
+  - `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>`
+  - To define new Icon themes, attach images to this Plugin topic and set the parameters accordingly
+
+## <a name="Examples"></a> Examples
+
+<table border="0" cellpadding="3" cellspacing="5">
+  <tr>
+    <th bgcolor="#CCCCC" valign="top"><strong><em>You type:</em></strong></th>
+    <th bgcolor="#CCCCC" valign="top"><strong><em>You get: (simulated)</em></strong></th>
+    <th bgcolor="#CCCCC" valign="top"><strong><em>You get: (if installed)</em></strong></th>
+  </tr>
+  <tr>
+    <td bgcolor="#EEEEEE" valign="top"><pre>
+%RENDERLIST{"thread"}%
+       * one
+               * one.a
+                       * one.a.x
+               * one.b
+                       * one.b.x
+                         continue
+                       * one.b.y
+                         continue
+       * two
+       * three
+</pre></td>
+    <td bgcolor="#EEEEEE" valign="top">
+      <p>
+      </p>
+      <table border="0" cellpadding="0" cellspacing="0">
+        <tr>
+          <td valign="top"><img alt="" border="0" height="16" src="http://www.dementia.org/twiki//view/dot_udr.gif" width="16" /></td>
+          <td colspan="3" valign="top"><nobr> one </nobr></td>
+        </tr>
+        <tr>
+          <td valign="top"><img alt="" border="0" height="16" src="http://www.dementia.org/twiki//view/dot_ud.gif" width="16" /></td>
+          <td valign="top"><img alt="" border="0" height="16" src="http://www.dementia.org/twiki//view/dot_udr.gif" width="16" /></td>
+          <td colspan="2" valign="top"><nobr> one.a </nobr></td>
+        </tr>
+        <tr>
+          <td valign="top"><img alt="" border="0" height="16" src="http://www.dementia.org/twiki//view/dot_ud.gif" width="16" /></td>
+          <td valign="top"><img alt="" border="0" height="16" src="http://www.dementia.org/twiki//view/dot_ud.gif" width="16" /></td>
+          <td valign="top"><img alt="" border="0" height="16" src="http://www.dementia.org/twiki//view/dot_ur.gif" width="16" /></td>
+          <td colspan="1" valign="top"><nobr> one.a.x </nobr></td>
+        </tr>
+        <tr>
+          <td valign="top"><img alt="" border="0" height="16" src="http://www.dementia.org/twiki//view/dot_ud.gif" width="16" /></td>
+          <td valign="top"><img alt="" border="0" height="16" src="http://www.dementia.org/twiki//view/dot_ur.gif" width="16" /></td>
+          <td colspan="2" valign="top"><nobr> one.b </nobr></td>
+        </tr>
+        <tr>
+          <td valign="top"><img alt="" border="0" height="16" src="http://www.dementia.org/twiki//view/dot_ud.gif" width="16" /></td>
+          <td valign="top"><img alt="" border="0" height="16" src="http://www.dementia.org/twiki//view/empty.gif" width="16" /></td>
+          <td valign="top"><img alt="" border="0" height="16" src="http://www.dementia.org/twiki//view/dot_udr.gif" width="16" /></td>
+          <td colspan="1" valign="top"><nobr> one.b.x </nobr></td>
+        </tr>
+        <tr>
+          <td valign="top"><img alt="" border="0" height="16" src="http://www.dementia.org/twiki//view/dot_ud.gif" width="16" /></td>
+          <td valign="top"><img alt="" border="0" height="16" src="http://www.dementia.org/twiki//view/empty.gif" width="16" /></td>
+          <td valign="top"><img alt="" border="0" height="16" src="http://www.dementia.org/twiki//view/dot_ud.gif" width="16" /></td>
+          <td colspan="1" valign="top"><nobr> continue </nobr></td>
+        </tr>
+        <tr>
+          <td valign="top"><img alt="" border="0" height="16" src="http://www.dementia.org/twiki//view/dot_ud.gif" width="16" /></td>
+          <td valign="top"><img alt="" border="0" height="16" src="http://www.dementia.org/twiki//view/empty.gif" width="16" /></td>
+          <td valign="top"><img alt="" border="0" height="16" src="http://www.dementia.org/twiki//view/dot_ur.gif" width="16" /></td>
+          <td colspan="1" valign="top"><nobr> one.b.y </nobr></td>
+        </tr>
+        <tr>
+          <td valign="top"><img alt="" border="0" height="16" src="http://www.dementia.org/twiki//view/dot_ud.gif" width="16" /></td>
+          <td valign="top"><img alt="" border="0" height="16" src="http://www.dementia.org/twiki//view/empty.gif" width="16" /></td>
+          <td valign="top"><img alt="" border="0" height="16" src="http://www.dementia.org/twiki//view/empty.gif" width="16" /></td>
+          <td colspan="1" valign="top"><nobr> continue </nobr></td>
+        </tr>
+        <tr>
+          <td valign="top"><img alt="" border="0" height="16" src="http://www.dementia.org/twiki//view/dot_udr.gif" width="16" /></td>
+          <td colspan="3" valign="top"><nobr> two </nobr></td>
+        </tr>
+        <tr>
+          <td valign="top"><img alt="" border="0" height="16" src="http://www.dementia.org/twiki//view/dot_ur.gif" width="16" /></td>
+          <td colspan="3" valign="top"><nobr> three </nobr></td>
+        </tr>
+      </table>
+      <p>
+      </p>
+    </td>
+    <td bgcolor="#EEEEEE" valign="top">
+      <p> %RENDERLIST{"thread"}% </p>
+      <ul>
+        <li> one <ul>
+            <li> one.a <ul>
+                <li> one.a.x </li>
+              </ul>
+            </li>
+            <li> one.b <ul>
+                <li> one.b.x continue </li>
+                <li> one.b.y continue </li>
+              </ul>
+            </li>
+          </ul>
+        </li>
+        <li> two </li>
+        <li> three </li>
+      </ul>
+      <p>
+      </p>
+    </td>
+  </tr>
+  <tr>
+    <td bgcolor="#EEEEEE" valign="top"><pre>
+%RENDERLIST{"org"}%
+       * one
+               * one.a
+                       * one.a.x
+               * one.b
+                       * one.b.x
+                         continue
+                       * one.b.y
+                         continue
+       * two
+       * three
+</pre></td>
+    <td bgcolor="#EEEEEE" valign="top">
+      <p>
+      </p>
+      <table border="0" cellpadding="0" cellspacing="0">
+        <tr>
+          <td valign="top"><img alt="" border="0" height="16" src="http://www.dementia.org/twiki//view/home.gif" width="16" /></td>
+          <td colspan="3" valign="top"><nobr>  one </nobr></td>
+        </tr>
+        <tr>
+          <td valign="top"><img alt="" border="0" height="16" src="http://www.dementia.org/twiki//view/dot_udr.gif" width="16" /></td>
+          <td valign="top"><img alt="" border="0" height="16" src="http://www.dementia.org/twiki//view/home.gif" width="16" /></td>
+          <td colspan="2" valign="top"><nobr>  one.a </nobr></td>
+        </tr>
+        <tr>
+          <td valign="top"><img alt="" border="0" height="16" src="http://www.dementia.org/twiki//view/dot_ud.gif" width="16" /></td>
+          <td valign="top"><img alt="" border="0" height="16" src="http://www.dementia.org/twiki//view/dot_ur.gif" width="16" /></td>
+          <td valign="top"><img alt="" border="0" height="16" src="http://www.dementia.org/twiki//view/home.gif" width="16" /></td>
+          <td colspan="1" valign="top"><nobr>  one.a.x </nobr></td>
+        </tr>
+        <tr>
+          <td valign="top"><img alt="" border="0" height="16" src="http://www.dementia.org/twiki//view/dot_ur.gif" width="16" /></td>
+          <td valign="top"><img alt="" border="0" height="16" src="http://www.dementia.org/twiki//view/home.gif" width="16" /></td>
+          <td colspan="2" valign="top"><nobr>  one.b </nobr></td>
+        </tr>
+        <tr>
+          <td valign="top"><img alt="" border="0" height="16" src="http://www.dementia.org/twiki//view/empty.gif" width="16" /></td>
+          <td valign="top"><img alt="" border="0" height="16" src="http://www.dementia.org/twiki//view/dot_udr.gif" width="16" /></td>
+          <td valign="top"><img alt="" border="0" height="16" src="http://www.dementia.org/twiki//view/home.gif" width="16" /></td>
+          <td colspan="1" valign="top"><nobr>  one.b.x </nobr></td>
+        </tr>
+        <tr>
+          <td valign="top"><img alt="" border="0" height="16" src="http://www.dementia.org/twiki//view/empty.gif" width="16" /></td>
+          <td valign="top"><img alt="" border="0" height="16" src="http://www.dementia.org/twiki//view/dot_ud.gif" width="16" /></td>
+          <td valign="top"><img alt="" border="0" height="16" src="http://www.dementia.org/twiki//view/empty.gif" width="16" /></td>
+          <td colspan="1" valign="top"><nobr>  continue </nobr></td>
+        </tr>
+        <tr>
+          <td valign="top"><img alt="" border="0" height="16" src="http://www.dementia.org/twiki//view/empty.gif" width="16" /></td>
+          <td valign="top"><img alt="" border="0" height="16" src="http://www.dementia.org/twiki//view/dot_ur.gif" width="16" /></td>
+          <td valign="top"><img alt="" border="0" height="16" src="http://www.dementia.org/twiki//view/home.gif" width="16" /></td>
+          <td colspan="1" valign="top"><nobr>  one.b.y </nobr></td>
+        </tr>
+        <tr>
+          <td valign="top"><img alt="" border="0" height="16" src="http://www.dementia.org/twiki//view/empty.gif" width="16" /></td>
+          <td valign="top"><img alt="" border="0" height="16" src="http://www.dementia.org/twiki//view/empty.gif" width="16" /></td>
+          <td valign="top"><img alt="" border="0" height="16" src="http://www.dementia.org/twiki//view/empty.gif" width="16" /></td>
+          <td colspan="1" valign="top"><nobr>  continue </nobr></td>
+        </tr>
+        <tr>
+          <td valign="top"><img alt="" border="0" height="16" src="http://www.dementia.org/twiki//view/home.gif" width="16" /></td>
+          <td colspan="3" valign="top"><nobr>  two </nobr></td>
+        </tr>
+        <tr>
+          <td valign="top"><img alt="" border="0" height="16" src="http://www.dementia.org/twiki//view/home.gif" width="16" /></td>
+          <td colspan="3" valign="top"><nobr>  three </nobr></td>
+        </tr>
+      </table>
+      <p>
+      </p>
+    </td>
+    <td bgcolor="#EEEEEE" valign="top">
+      <p> %RENDERLIST{"org"}% </p>
+      <ul>
+        <li> one <ul>
+            <li> one.a <ul>
+                <li> one.a.x </li>
+              </ul>
+            </li>
+            <li> one.b <ul>
+                <li> one.b.x continue </li>
+                <li> one.b.y continue </li>
+              </ul>
+            </li>
+          </ul>
+        </li>
+        <li> two </li>
+        <li> three </li>
+      </ul>
+      <p>
+      </p>
+    </td>
+  </tr>
+</table>
+
+## <a name="%TOPIC% Settings"></a> %TOPIC% Settings
+
+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>
+
+- One line description, is shown in the [[TextFormattingRules]] topic:
+  - Set SHORTDESCRIPTION = Render bullet lists in a variety of formats
+
+- Debug plugin: (See output in `data/debug.txt`)
+  - Set DEBUG = 0
+
+- Themes are named `<SOMETHING>_THEME` and contain a comma delimited list of render type with parameters:
+  - Set THREAD\_THEME = tree, 1
+  - 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)
+  - 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)
+  - 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)
+
+## <a name="Plugin Installation Instructions"></a> Plugin Installation Instructions
+
+**_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.
+
+- Download the ZIP file from the Plugin web (see below)
+- Unzip <code>**%TOPIC%.zip**</code> in your twiki installation directory. Content: <table border="1" cellpadding="0" cellspacing="0">
+  <tr>
+    <th bgcolor="#99CCCC"><strong> File: </strong></th>
+    <th bgcolor="#99CCCC"><strong> Description: </strong></th>
+  </tr>
+  <tr>
+    <td><code><b>data/TWiki/%TOPIC%.txt</b></code></td>
+    <td> Plugin topic </td>
+  </tr>
+  <tr>
+    <td><code><b>data/TWiki/%TOPIC%.txt,v</b></code></td>
+    <td> Plugin topic repository </td>
+  </tr>
+  <tr>
+    <td><code><b>lib/TWiki/Plugins/%TOPIC%.pm</b></code></td>
+    <td> Plugin Perl module </td>
+  </tr>
+  <tr>
+    <td><code><b>pub/TWiki/%TOPIC%/*.gif</b></code></td>
+    <td> Image files for themes </td>
+  </tr>
+</table>
+- Test if the installation was successful:
+  - See if the above example works
+
+## <a name="Plugin Info"></a> Plugin Info
+
+<table border="1" cellpadding="0" cellspacing="0">
+  <tr>
+    <td align="right"> Plugin Author: </td>
+    <td> TWiki:Main/PeterThoeny </td>
+  </tr>
+  <tr>
+    <td align="right"> Plugin Version: </td>
+    <td> 02 Dec 2003 (V1.000) </td>
+  </tr>
+  <tr>
+    <td align="right"> Change History: </td>
+    <td>  </td>
+  </tr>
+  <tr>
+    <td align="right"> 02 Nov 2003: </td>
+    <td> Initial version </td>
+  </tr>
+  <tr>
+    <td align="right"> CPAN Dependencies: </td>
+    <td> none </td>
+  </tr>
+  <tr>
+    <td align="right"> Other Dependencies: </td>
+    <td> none </td>
+  </tr>
+  <tr>
+    <td align="right"> Perl Version: </td>
+    <td> 5.005 </td>
+  </tr>
+  <tr>
+    <td align="right"> Plugin Home: </td>
+    <td><a href="http://TWiki.org/cgi-bin/view/Plugins/%TOPIC%" target="_top">http://TWiki.org/cgi-bin/view/Plugins/%TOPIC%</a></td>
+  </tr>
+  <tr>
+    <td align="right"> Feedback: </td>
+    <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>
+  </tr>
+</table>
+
+**_Related Topics:_** [[TWikiPreferences]], [[TWikiPlugins]], TWiki:Plugins/TreePlugin
+
+-- TWiki:Main/PeterThoeny - 02 Dec 2003