buildrelease
[openafs-wiki.git] / TWiki / PreferencesPlugin.mdwn
1 <form action="http://www.dementia.org/twiki/viewauth/Main/WebHome" enctype="multipart/form-data" method="post" name="editpreferences">
2   <p>
3   </p>
4   <h1><a name="%TOPIC%"></a><a name=" %TOPIC%"></a> %TOPIC% </h1>
5   <p> Allows editing of preferences using fields predefined in a [[TWiki/TWikiForms]]. However, the edit fields are inlined in the text, similar to how tables are edited in TWiki:Plugins/EditTablePlugin. </p>
6   <p>
7   </p>
8   <div>
9     <ul>
10       <li><a href="#Syntax Rules"> Syntax Rules</a></li>
11       <li><a href="#Examples"> Examples</a></li>
12       <li><a href="#Plugin Settings"> Plugin Settings</a></li>
13       <li><a href="#Plugin Installation Instructions"> Plugin Installation Instructions</a></li>
14       <li><a href="#Plugin Info"> Plugin Info</a></li>
15     </ul>
16   </div>
17   <p> Insert the <code>%EDITPREFERENCES%</code> variable (see below) anywhere in your topic. It will be replaced by a button that allows editing each preference in its predefined input format (or a text box, when no format is defined for this preference). </p>
18   <p> In edit mode, the edit button is replaced by save and cancel buttons, with their obvious meanings. </p>
19   <p>
20   </p>
21   <h2><a name="Syntax Rules"></a> Syntax Rules </h2>
22   <p>
23   </p>
24   <ul>
25     <li><code>%EDITPREFERENCES{ "</code> <em>topic</em> <code>" }%</code><ul>
26         <li><em>topic</em> references a [[TWiki/TWikiForms]] defining the format of the edit fields for preferences. It may be prefixed by a web. </li>
27         <li> If a preference setting is not mentioned in the form referenced by <em>topic</em>, a text input box of the specified length is provided. </li>
28         <li> Otherwise, the input can be through textareas, select, radio, checkbox, date, or text, as provided by [[TWiki/TWikiForms]]. </li>
29       </ul>
30     </li>
31   </ul>
32   <p>
33   </p>
34   <h2><a name="Examples"></a> Examples </h2>
35   <p>
36   </p>
37   <ul>
38     <li><code>%EDITPREFERENCES{ "%TWIKIWEB%.TWikiPreferencesForm" }%</code></li>
39   </ul>
40   <p>
41   </p>
42   <h2><a name="Plugin Settings"></a> Plugin Settings </h2>
43   <p> Plugin settings are stored as preferences variables. To reference a plugin setting write <code><b>%&lt;plugin&gt;_&lt;setting&gt;%</b></code>, i.e. <code><b>%PREFERENCESPLUGIN_SHORTDESCRIPTION%</b></code></p>
44   <p>
45   </p>
46   <ul>
47     <li> One line description, is shown in the [[TWiki/TextFormattingRules]] topic: <ul>
48         <li> Set SHORTDESCRIPTION = Allows editing of preferences using fields predefined in a form </li>
49       </ul>
50     </li>
51   </ul>
52   <p>
53   </p>
54   <h2><a name="Plugin Installation Instructions"></a> Plugin Installation Instructions </h2>
55   <p><strong><em>Note:</em></strong> 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. </p>
56   <p>
57   </p>
58   <ul>
59     <li> Download the ZIP file from the Plugin web (see below) </li>
60     <li> Unzip <code><b>%TOPIC%.zip</b></code> in your twiki installation directory. Content: <table border="1" cellpadding="0" cellspacing="0">
61         <tr>
62           <th bgcolor="#99CCCC"><strong> File: </strong></th>
63           <th bgcolor="#99CCCC"><strong> Description: </strong></th>
64         </tr>
65         <tr>
66           <td><code><b>data/TWiki/%TOPIC%.txt</b></code></td>
67           <td> Plugin topic </td>
68         </tr>
69         <tr>
70           <td><code><b>data/TWiki/%TOPIC%.txt,v</b></code></td>
71           <td> Plugin topic repository </td>
72         </tr>
73         <tr>
74           <td><code><b>lib/TWiki/Plugins/%TOPIC%.pm</b></code></td>
75           <td> Plugin Perl module </td>
76         </tr>
77         <tr>
78           <td><code><b>data/TWiki/TWikiPreferencesForm.txt</b></code></td>
79           <td> Example form </td>
80         </tr>
81       </table>
82     </li>
83     <li> (Dakar) Visit <code>configure</code> in your TWiki installation, and enable the plugin in the {Plugins} section. </li>
84     <li> If the installation was successful, an edit button should appear below: <input name="prefsaction" type="submit" value="Edit" /></li>
85   </ul>
86   <p>
87   </p>
88   <h2><a name="Plugin Info"></a> Plugin Info </h2>
89   <p>
90   </p>
91   <table border="1" cellpadding="0" cellspacing="0">
92     <tr>
93       <td align="right"> Plugin Author: </td>
94       <td> TWiki:Main.ThomasWeigert </td>
95     </tr>
96     <tr>
97       <td align="right"> Plugin Version: </td>
98       <td> 08 May 2005 </td>
99     </tr>
100     <tr>
101       <td align="right"> Change History: </td>
102       <td>  </td>
103     </tr>
104     <tr>
105       <td align="right"> 26 May 2005: </td>
106       <td> Crawford Currie recoded to use code from Form.pm to render form fields. </td>
107     </tr>
108     <tr>
109       <td align="right"> 08 May 2005: </td>
110       <td> Add plugin preference to define default input length </td>
111     </tr>
112     <tr>
113       <td align="right"> 07 May 2005: </td>
114       <td> Initial version </td>
115     </tr>
116     <tr>
117       <td align="right"> TWiki Dependency: </td>
118       <td> $TWiki::Plugins::VERSION 1.026 </td>
119     </tr>
120     <tr>
121       <td align="right"> CPAN Dependencies: </td>
122       <td> none </td>
123     </tr>
124     <tr>
125       <td align="right"> Other Dependencies: </td>
126       <td> none </td>
127     </tr>
128     <tr>
129       <td align="right"> Perl Version: </td>
130       <td> 5.005 </td>
131     </tr>
132     <tr>
133       <td align="right"> License: </td>
134       <td> GPL (<a href="http://www.gnu.org/copyleft/gpl.html" target="_top">GNU General Public License</a>) </td>
135     </tr>
136     <tr>
137       <td align="right"> TWiki:Plugins/Benchmark: </td>
138       <td>[[TWiki/GoodStyle]] nn%, [[TWiki/FormattedSearch]] nn%, %TOPIC% nn% </td>
139     </tr>
140     <tr>
141       <td align="right"> Plugin Home: </td>
142       <td><a href="http://TWiki.org/cgi-bin/view/Plugins/%TOPIC%" target="_top">http://TWiki.org/cgi-bin/view/Plugins/%TOPIC%</a></td>
143     </tr>
144     <tr>
145       <td align="right"> Feedback: </td>
146       <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>
147     </tr>
148     <tr>
149       <td align="right"> Appraisal: </td>
150       <td><a href="http://TWiki.org/cgi-bin/view/Plugins/%TOPIC%Appraisal" target="_top">http://TWiki.org/cgi-bin/view/Plugins/%TOPIC%Appraisal</a></td>
151     </tr>
152   </table>
153   <p><strong><em>Related Topics:</em></strong> [[TWiki/TWikiPreferences]], [[TWiki/TWikiForms]]</p>
154   <p> -- TWiki:Main.ThomasWeigert - 08 May 2005 </p>
155   <p>
156   </p>
157 </form>