none
[openafs-wiki.git] / TWiki / TWikiVariables.mdwn
1 %WIKITOOLNAME% expands the following variables enclosed in % percent signs:
2
3 <table border="1">
4   <tr>
5     <th> Variable: </th>
6     <th> Expanded to: </th>
7   </tr>
8   <tr>
9     <td><code>%WIKIHOMEURL%</code></td>
10     <td> The base script URL of %WIKITOOLNAME%, is the link of the Home icon in the upper left corner, is <b>%WIKIHOMEURL%</b></td>
11   </tr>
12   <tr>
13     <td><code>%SCRIPTURL%</code></td>
14     <td> The script URL of %WIKITOOLNAME%, is <b>http://www.dementia.org/twiki/</b></td>
15   </tr>
16   <tr>
17     <td><code>%SCRIPTURLPATH%</code></td>
18     <td> The path of the script URL of %WIKITOOLNAME%, is <b>http://www.dementia.org/twiki/</b></td>
19   </tr>
20   <tr>
21     <td><code>%PUBURL%</code></td>
22     <td> The public URL of TWiki, is <b>http://www.dementia.org/twiki//view</b></td>
23   </tr>
24   <tr>
25     <td><code>%PUBURLPATH%</code></td>
26     <td> The path of the public URL of %WIKITOOLNAME%, is <b>http://www.dementia.org/twiki//view</b></td>
27   </tr>
28   <tr>
29     <td><code>%ATTACHURL%</code></td>
30     <td> The attachment URL of the current topic, is <b>http://www.dementia.org/twiki//view</b><br /> Example: If you attach a file you can refer to it as <code><b>%ATTACHURL%/image.gif</b></code></td>
31   </tr>
32   <tr>
33     <td><code>%ATTACHURLPATH%</code></td>
34     <td> The path of the attachment URL of the current topic, is <b>http://www.dementia.org/twiki//view</b></td>
35   </tr>
36   <tr>
37     <td><code>%WIKITOOLNAME%</code></td>
38     <td> Name of wiki tool, is <b>%WIKITOOLNAME%</b></td>
39   </tr>
40   <tr>
41     <td><code>%WIKIVERSION%</code></td>
42     <td> Wiki tool version, is <b>TWiki-4.1.2, Sat, 03 Mar 2007, build 13046</b></td>
43   </tr>
44   <tr>
45     <td><code>%USERNAME%</code></td>
46     <td> Your login username, is <b>admin</b></td>
47   </tr>
48   <tr>
49     <td><code>%WIKIUSERNAME%</code></td>
50     <td> Your Wiki username, if defined in [[Main/TWikiUsers]]. Same as %USERNAME% if not defined. Is <b>Main.admin</b></td>
51   </tr>
52   <tr>
53     <td><code>%WEB%</code></td>
54     <td> The current web, is <b>%WEB%</b></td>
55   </tr>
56   <tr>
57     <td><code>%TOPIC%</code></td>
58     <td> The current topic name, is <b>%TOPIC%</b></td>
59   </tr>
60   <tr>
61     <td><code>%SPACEDTOPIC%</code></td>
62     <td> The current topic name with added spaces, for regular expression search of Ref-By, is <b></b></td>
63   </tr>
64   <tr>
65     <td><code>%GMTIME%</code></td>
66     <td> GM time, is <b>29 Jun 2010 - 15:25</b></td>
67   </tr>
68   <tr>
69     <td><code>%GMTIME{"format"}%</code></td>
70     <td> Formatted GM time based on keywords (first three characters needed.) <br /> Example: <code>%GMTIME{"day month, year - hour:min:sec"}%</code> is <b>day month, year - hour:min:sec</b></td>
71   </tr>
72   <tr>
73     <td><code>%SERVERTIME%</code></td>
74     <td> Server time, is <b>29 Jun 2010 - 11:25</b></td>
75   </tr>
76   <tr>
77     <td><code>%SERVERTIME{"format"}%</code></td>
78     <td> Formatted server time. Example: <code>%SERVERTIME{"hou:min"}%</code> is <b>hou:min</b></td>
79   </tr>
80   <tr>
81     <td><code>%HTTP_HOST%</code></td>
82     <td> HTTP_HOST environment variable, is <b></b></td>
83   </tr>
84   <tr>
85     <td><code>%REMOTE_ADDR%</code></td>
86     <td> REMOTE_ADDR environment variable, is <b></b></td>
87   </tr>
88   <tr>
89     <td><code>%REMOTE_PORT%</code></td>
90     <td> REMOTE_PORT environment variable, is <b></b></td>
91   </tr>
92   <tr>
93     <td><code>%REMOTE_USER%</code></td>
94     <td> REMOTE_USER environment variable, is <b></b></td>
95   </tr>
96   <tr>
97     <td><code>%INCLUDE{"SomeTopic"}%</code></td>
98     <td> Server side include, includes another topic. The current Wiki web is searched by default. Example: <code><b>%INCLUDE{"TWiki.TWikiWebsTable"}%</b></code></td>
99   </tr>
100   <tr>
101     <td><code>%SEARCH{"str" ...}%</code></td>
102     <td> Inline search, shows a search result embedded in a topic. Parameter is composed of the search string, followed by optional <code>name="value"</code> pairs: <table border="1" cellpadding="0" cellspacing="0">
103         <tr>
104           <th bgcolor="#99CCCC"><strong> Pair: </strong></th>
105           <th bgcolor="#99CCCC"><strong> Description: </strong></th>
106           <th bgcolor="#99CCCC"><strong> Default: </strong></th>
107         </tr>
108         <tr>
109           <td><code>web="Name"</code><br /><code>web="Main Know"</code><br /><code>web="all"</code></td>
110           <td> Wiki web to search: A web, a list of webs separated by whitespace, or all webs <code>[1]</code></td>
111           <td> Current web </td>
112         </tr>
113         <tr>
114           <td><code>scope="topic"</code><br /><code>scope="text"</code></td>
115           <td> Search topic name (title) or in the text (body) of the topic </td>
116           <td> Topic text (body) </td>
117         </tr>
118         <tr>
119           <td><code>order="topic"</code><br /><code>order="modified"</code><br /><code>order="editby"</code></td>
120           <td> Sort the results of search by the topic names, last modified time, or last editor </td>
121           <td> Sort by topic name </td>
122         </tr>
123         <tr>
124           <td><code>limit="all"</code><br /><code>limit="16"</code></td>
125           <td> Limit the number of results returned </td>
126           <td> All results </td>
127         </tr>
128         <tr>
129           <td><code>regex="on"</code></td>
130           <td>[[Main/RegularExpression]] search </td>
131           <td> Literal search </td>
132         </tr>
133         <tr>
134           <td><code>reverse="on"</code></td>
135           <td> Reverse the direction of the search </td>
136           <td> Ascending search </td>
137         </tr>
138         <tr>
139           <td><code>casesensitive="on"</code></td>
140           <td> Case sensitive search </td>
141           <td> Ignore case </td>
142         </tr>
143         <tr>
144           <td><code>nosummary="on"</code></td>
145           <td> Show topic title only </td>
146           <td> Show topic summary </td>
147         </tr>
148         <tr>
149           <td><code>bookview="on"</code></td>
150           <td>[[Main/BookView]] search, e.g. show complete topic text </td>
151           <td> Show topic summary </td>
152         </tr>
153         <tr>
154           <td><code>nosearch="on"</code></td>
155           <td> Suppress search string </td>
156           <td> Show search string </td>
157         </tr>
158         <tr>
159           <td><code>nototal="on"</code></td>
160           <td> Do not show number of topics found </td>
161           <td> Show number </td>
162         </tr>
163       </table> Example: <code><b>%SEARCH{"wiki" web="Main" scope="topic"}%</b></code></td>
164   </tr>
165   <tr>
166     <td><code>%VAR{"NAME" web="Web"}%</code></td>
167     <td> Get a preference value from another web then the current one. Example: To get <code>%WEBBGCOLOR%</code> of the Main web write <code>%VAR{"WEBBGCOLOR" web="Main"}%</code>, is <code><b></b></code></td>
168     <td>
169       <p>
170       </p>
171     </td>
172   </tr>
173 </table>
174
175 [1] **_Note_**: A web can be excluded from a `web="all"` search if you define a `NOSEARCHALL=on` variable in its [[WebPreferences]].
176
177 Additional variables are defined in the preferences ( site-level ( **_SL_** ) in [[TWikiPreferences]], web-level ( **_WL_** ) in [[WebPreferences]] of each web, and user level ( **_UL_** ) preferences in individual user topics):
178
179 <table border="1">
180   <tr>
181     <th> Variable: </th>
182     <th> Level: </th>
183     <th> What: </th>
184   </tr>
185   <tr>
186     <td><code>%WIKIWEBMASTER%</code></td>
187     <td><strong><em>SL</em></strong></td>
188     <td> Webmaster email address (sender of email notifications) , is <b></b></td>
189   </tr>
190   <tr>
191     <td><code>%WIKIWEBLIST%</code></td>
192     <td><strong><em>SL</em></strong></td>
193     <td> List of %WIKITOOLNAME% webs (in upper right corner of topics) </td>
194   </tr>
195   <tr>
196     <td><code>%WEBTOPICLIST%</code></td>
197     <td><strong><em>WL</em></strong></td>
198     <td> Common links of web (second line of topics) </td>
199   </tr>
200   <tr>
201     <td><code>%WEBCOPYRIGHT%</code></td>
202     <td><strong><em>SL</em></strong> , <strong><em>WL</em></strong></td>
203     <td> Copyright notice (bottom right corner of topics) </td>
204   </tr>
205   <tr>
206     <td><code>%WEBBGCOLOR%</code></td>
207     <td><strong><em>WL</em></strong></td>
208     <td> Background color of web </td>
209   </tr>
210   <tr>
211     <td><code>%NOSEARCHALL%</code></td>
212     <td><strong><em>WL</em></strong></td>
213     <td> Exclude web from a <code>web="all"</code> search (set variable to <code>on</code> for hidden webs) </td>
214   </tr>
215   <tr>
216     <td><code>%NEWTOPICBGCOLOR%</code></td>
217     <td><strong><em>SL</em></strong> , <em>UL</em></td>
218     <td> Background color of non existing topic. ( <strong><em>UL</em></strong> needs authentication for topic views ) </td>
219   </tr>
220   <tr>
221     <td><code>%NEWTOPICFONTCOLOR%</code></td>
222     <td><strong><em>SL</em></strong> , <em>UL</em></td>
223     <td> Font color of non existing topic. ( <strong><em>UL</em></strong> needs authentication for topic views ) </td>
224   </tr>
225   <tr>
226     <td><code>%EDITBOXWIDTH%</code></td>
227     <td><strong><em>SL</em></strong> , <strong><em>UL</em></strong></td>
228     <td> Horizontal size of edit box, is <b> <code>%EDITBOXWIDTH%</code> </b></td>
229   </tr>
230   <tr>
231     <td><code>%EDITBOXHEIGHT%</code></td>
232     <td><strong><em>SL</em></strong> , <strong><em>UL</em></strong></td>
233     <td> Vertical size of edit box, is <b> <code>%EDITBOXHEIGHT%</code> </b></td>
234   </tr>
235   <tr>
236     <td><code>%ATTACHLINKBOX%</code></td>
237     <td><strong><em>SL</em></strong> , <strong><em>UL</em></strong></td>
238     <td> Default state of the link check box in the attach file page. Check box is initially checked if value is set to <code>CHECKED</code> , unchecked if empty. If checked, a link is created to the attached file at the end of the topic. Value is: <b><code>%ATTACHLINKBOX%</code></b></td>
239   </tr>
240   <tr>
241     <td><code>%HTTP_EQUIV_ON_VIEW%</code></td>
242     <td><strong><em>SL</em></strong></td>
243     <td> http-equiv meta tags for view, rdiff, attach, search* scripts. </td>
244   </tr>
245   <tr>
246     <td><code>%HTTP_EQUIV_ON_EDIT%</code></td>
247     <td><strong><em>SL</em></strong> , <strong><em>UL</em></strong></td>
248     <td> http-equiv meta tags for edit script. </td>
249   </tr>
250   <tr>
251     <td><code>%HTTP_EQUIV_ON_PREVIEW%</code></td>
252     <td><strong><em>SL</em></strong> , <strong><em>UL</em></strong></td>
253     <td> http-equiv meta tags for preview script. </td>
254   </tr>
255   <tr>
256     <td><code>%DENYWEBCHANGE%</code></td>
257     <td><strong><em>WL</em></strong></td>
258     <td> List of users and groups who are <strong>not allowed</strong> to change topics in the %WIKITOOLNAME% web. (More in [[Main/TWikiAccessControl]]) </td>
259   </tr>
260   <tr>
261     <td><code>%ALLOWWEBCHANGE%</code></td>
262     <td><strong><em>WL</em></strong></td>
263     <td> List of users and groups who are <strong>allowed</strong> to change topics in the %WIKITOOLNAME% web. (More in [[Main/TWikiAccessControl]]) </td>
264   </tr>
265   <tr>
266     <td><code>%DENYTOPICCHANGE%</code></td>
267     <td><strong><em>(any topic)</em></strong></td>
268     <td> List of users and groups who are <strong>not allowed</strong> to change the current topic. (More in [[Main/TWikiAccessControl]]) </td>
269   </tr>
270   <tr>
271     <td><code>%ALLOWTOPICCHANGE%</code></td>
272     <td><strong><em>(any topic)</em></strong></td>
273     <td> List of users and groups who are <strong>allowed</strong> to change the current topic. (More in [[Main/TWikiAccessControl]]) </td>
274   </tr>
275   <tr>
276     <td><code>%FINALPREFERENCES%</code></td>
277     <td><strong><em>SL</em></strong> , <strong><em>WL</em></strong></td>
278     <td> List of preferences that are not allowed to be overridden by next level preferences</td>
279   </tr>
280 </table>
281
282 **_Notes:_**
283
284 - Preferences variables ( on site-level, web-level and user level ) are defined by bullet lines with this syntax:
285   - `Set VARIABLENAME = value`
286 - Additional preferences variables can be defined on all three level as needed. Example:
287   - `Set MYLOGO = %PUBURLPATH%/%MAINWEB%/LogoTopic/logo.gif`
288
289 -- [[PeterThoeny]] - 10 Nov 2000 <br />