1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
|
## <a name="TWiki_Variables"> TWiki Variables </a>
### <a name="Predefined_Variables"> Predefined Variables </a>
%WIKITOOLNAME% expands the following variables enclosed in % percent signs:
<table border="1">
<tr>
<th> Variable: </th>
<th> Expanded to: </th>
</tr>
<tr>
<td><code>%<nop>WIKIHOMEURL%</nop></code></td>
<td> The base script URL of %WIKITOOLNAME%, is the link of the Home icon in the upper left corner, is <b>%WIKIHOMEURL%</b></td>
</tr>
<tr>
<td><code>%<nop>SCRIPTURL%</nop></code></td>
<td> The script URL of %WIKITOOLNAME%, is <b>%SCRIPTURL%</b></td>
</tr>
<tr>
<td><code>%<nop>SCRIPTURLPATH%</nop></code></td>
<td> The path of the script URL of %WIKITOOLNAME%, is <b>%SCRIPTURLPATH%</b></td>
</tr>
<tr>
<td><code>%<nop>SCRIPTSUFFIX%</nop></code></td>
<td> The script suffix, i.e. <code>.pl</code>, is <b>%SCRIPTSUFFIX%</b></td>
</tr>
<tr>
<td><code>%<nop>PUBURL%</nop></code></td>
<td> The public URL of TWiki, is <b>%PUBURL%</b></td>
</tr>
<tr>
<td><code>%<nop>PUBURLPATH%</nop></code></td>
<td> The path of the public URL of %WIKITOOLNAME%, is <b>%PUBURLPATH%</b></td>
</tr>
<tr>
<td><code>%<nop>ATTACHURL%</nop></code></td>
<td> The attachment URL of the current topic, is <b>%ATTACHURL%</b><br /> Example: If you attach a file you can refer to it as <code><b>%<nop>ATTACHURL%/image.gif</nop></b></code></td>
</tr>
<tr>
<td><code>%<nop>ATTACHURLPATH%</nop></code></td>
<td> The path of the attachment URL of the current topic, is <b>%ATTACHURLPATH%</b></td>
</tr>
<tr>
<td><code>%<nop>WIKITOOLNAME%</nop></code></td>
<td> Name of wiki tool, is <b>%WIKITOOLNAME%</b></td>
</tr>
<tr>
<td><code>%<nop>WIKIVERSION%</nop></code></td>
<td> Wiki tool version, is <b>%WIKIVERSION%</b></td>
</tr>
<tr>
<td><code>%<nop>USERNAME%</nop></code></td>
<td> Your login username, is <b>%USERNAME%</b></td>
</tr>
<tr>
<td><code>%<nop>WIKIUSERNAME%</nop></code></td>
<td> Your Wiki username, if defined in %MAINWEB%.%WIKIUSERSTOPIC%. Same as %<nop>USERNAME% if not defined. Is <b>%WIKIUSERNAME%</b> </nop></td>
</tr>
<tr>
<td><code>%<nop>WEB%</nop></code></td>
<td> The current web, is <b>%WEB%</b></td>
</tr>
<tr>
<td><code>%<nop>BASEWEB%</nop></code></td>
<td> The web name where the includes started, e.g. the web of the first topic of nested includes. Same as <code>%<nop>WEB%</nop></code> in case there is no include. </td>
</tr>
<tr>
<td><code>%<nop>INCLUDINGWEB%</nop></code></td>
<td> The web name of the topic that includes the current topic. Same as <code>%<nop>WEB%</nop></code> in case there is no include. </td>
</tr>
<tr>
<td><code>%<nop>TOPIC%</nop></code></td>
<td> The current topic name, is <b>%TOPIC%</b></td>
</tr>
<tr>
<td><code>%<nop>BASETOPIC%</nop></code></td>
<td> The name of the topic where the includes started, e.g. the first topic of nested includes. Same as <code>%<nop>TOPIC%</nop></code> in case there is no include. </td>
</tr>
<tr>
<td><code>%<nop>INCLUDINGTOPIC%</nop></code></td>
<td> The name of the topic that includes the current topic. Same as <code>%<nop>TOPIC%</nop></code> in case there is no include. </td>
</tr>
<tr>
<td><code>%<nop>SPACEDTOPIC%</nop></code></td>
<td> The current topic name with added spaces, for regular expression search of Ref-By, is <b>%SPACEDTOPIC%</b></td>
</tr>
<tr>
<td><code>%<nop>GMTIME%</nop></code></td>
<td> GM time, is <b>%GMTIME%</b></td>
</tr>
<tr>
<td><code>%<nop>GMTIME{"format"}%</nop></code></td>
<td> Formatted GM time based on time variables. <table border="1" cellpadding="1" cellspacing="0">
<tr>
<th bgcolor="#99CCCC"><strong>Variable:</strong></th>
<th bgcolor="#99CCCC"><strong>Unit:</strong></th>
<th bgcolor="#99CCCC"><strong>Example</strong></th>
</tr>
<tr>
<td> $seconds </td>
<td> seconds </td>
<td> 59 </td>
</tr>
<tr>
<td> $minutes </td>
<td> minutes </td>
<td> 59 </td>
</tr>
<tr>
<td> $hours </td>
<td> hours </td>
<td> 23 </td>
</tr>
<tr>
<td> $day </td>
<td> day of month </td>
<td> 31 </td>
</tr>
<tr>
<td> $month </td>
<td> month in ISO format </td>
<td> Dec </td>
</tr>
<tr>
<td> $mo </td>
<td> 2 digit month </td>
<td> 12 </td>
</tr>
<tr>
<td> $year </td>
<td> 4 digit year </td>
<td> 1999 </td>
</tr>
<tr>
<td> $ye </td>
<td> 2 digit year </td>
<td> 99 </td>
</tr>
</table> Variables can be shortened to 3 characters. Example: <br /><code>%<nop>GMTIME{"$day $month, $year - $hour:$min:$sec"}%</nop></code> is <br /><b>%GMTIME{"$day $month, $year - $hour:$min:$sec"}%</b></td>
</tr>
<tr>
<td><code>%<nop>SERVERTIME%</nop></code></td>
<td> Server time, is <b>%SERVERTIME%</b></td>
</tr>
<tr>
<td><code>%<nop>SERVERTIME{"format"}%</nop></code></td>
<td> Formatted server time. <br /> Example: <code>%<nop>SERVERTIME{"$hou:$min"}%</nop></code> is <b>%SERVERTIME{"$hou:$min"}%</b></td>
</tr>
<tr>
<td><code>%<nop>HTTP_HOST%</nop></code></td>
<td> HTTP_HOST environment variable, is <b>%HTTP_HOST%</b></td>
</tr>
<tr>
<td><code>%<nop>REMOTE_ADDR%</nop></code></td>
<td> REMOTE_ADDR environment variable, is <b>%REMOTE_ADDR%</b></td>
</tr>
<tr>
<td><code>%<nop>REMOTE_PORT%</nop></code></td>
<td> REMOTE_PORT environment variable, is <b>%REMOTE_PORT%</b></td>
</tr>
<tr>
<td><code>%<nop>REMOTE_USER%</nop></code></td>
<td> REMOTE_USER environment variable, is <b>%REMOTE_USER%</b></td>
</tr>
<tr>
<td><code>%<nop>INCLUDE{"SomeTopic"}%</nop></code></td>
<td> Server side include, includes another topic. The current Wiki web is searched by default. Example: <code><b>%<nop>INCLUDE{"%TWIKIWEB%.TWikiWebsTable"}%</nop></b></code></td>
</tr>
<tr>
<td><code>%<nop>STARTINCLUDE%</nop></code></td>
<td> If present in included topic, start to include text from this location up to the end, or up to the location of the <code>%<nop>STOPINCLUDE%</nop></code> variable. A normal view of the topic shows everyting exept the <code>%<nop>STARTINCLUDE%</nop></code> variable itself. </td>
</tr>
<tr>
<td><code>%<nop>STOPINCLUDE%</nop></code></td>
<td> If present in included topic, stop to include text at this location and ignore the remaining text. A normal view of the topic shows everyting exept the <code>%<nop>STOPINCLUDE%</nop></code> variable itself. </td>
</tr>
<tr>
<td><code>%<nop>TOC%</nop></code></td>
<td> Table of Content of current topic. </td>
</tr>
<tr>
<td><code>%<nop>TOC{"SomeTopic" ...}%</nop></code></td>
<td> Table of Content. Shows a TOC that is generated automatically based on headings of a topic. Headings in <span style="background:"><font color="">Wiki Syntax</font></span><a href="http://LOCATION/WikiSyntax">?</a> (<code>"---++ text"</code>) and HTML (<code>"&lt;h2&gt;text&lt;h2&gt;"</code>) are taken into account. Parameter is composed of the topic name, followed by optional <code>name="value"</code> pairs: <table border="1" cellpadding="1" cellspacing="0">
<tr>
<th bgcolor="#99CCCC"><strong>Pair:</strong></th>
<th bgcolor="#99CCCC"><strong>Description:</strong></th>
<th bgcolor="#99CCCC"><strong>Default:</strong></th>
</tr>
<tr>
<td><code>web="Name"</code></td>
<td> Name of web </td>
<td> Current web </td>
</tr>
<tr>
<td><code>depth="2"</code></td>
<td> Limit depth of headings shown in TOC </td>
<td> 6 </td>
</tr>
</table> Examples: <code><b>%<nop>TOC{depth="2"}%</nop></b></code>, <code><b>%<nop>TOC{"TWikiDocumentation" web="%TWIKIWEB%"}%</nop></b></code></td>
</tr>
<tr>
<td><code>%<nop>SEARCH{"str" ...}%</nop></code></td>
<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="1" cellspacing="0">
<tr>
<th bgcolor="#99CCCC"><strong>Pair:</strong></th>
<th bgcolor="#99CCCC"><strong>Description:</strong></th>
<th bgcolor="#99CCCC"><strong>Default:</strong></th>
</tr>
<tr>
<td><code>web="Name"</code><br /><code>web="%MAINWEB% Know"</code><br /><code>web="all"</code></td>
<td> Wiki web to search: A web, a list of webs separated by whitespace, or all webs <code>[1]</code></td>
<td> Current web </td>
</tr>
<tr>
<td><code>scope="topic"</code><br /><code>scope="text"</code></td>
<td> Search topic name (title) or in the text (body) of the topic </td>
<td> Topic text (body) </td>
</tr>
<tr>
<td><code>order="topic"</code><br /><code>order="modified"</code><br /><code>order="editby"</code></td>
<td> Sort the results of search by the topic names, last modified time, or last editor </td>
<td> Sort by topic name </td>
</tr>
<tr>
<td><code>limit="all"</code><br /><code>limit="16"</code></td>
<td> Limit the number of results returned </td>
<td> All results </td>
</tr>
<tr>
<td><code>regex="on"</code></td>
<td><span style="background:"><font color="">Regular Expression</font></span><a href="http://LOCATION/RegularExpression">?</a> search </td>
<td> Literal search </td>
</tr>
<tr>
<td><code>reverse="on"</code></td>
<td> Reverse the direction of the search </td>
<td> Ascending search </td>
</tr>
<tr>
<td><code>casesensitive="on"</code></td>
<td> Case sensitive search </td>
<td> Ignore case </td>
</tr>
<tr>
<td><code>nosummary="on"</code></td>
<td> Show topic title only </td>
<td> Show topic summary </td>
</tr>
<tr>
<td><code>bookview="on"</code></td>
<td><span style="background:"><font color="">Book View</font></span><a href="http://LOCATION/BookView">?</a> search, e.g. show complete topic text </td>
<td> Show topic summary </td>
</tr>
<tr>
<td><code>nosearch="on"</code></td>
<td> Suppress search string </td>
<td> Show search string </td>
</tr>
<tr>
<td><code>noheader="on"</code></td>
<td> Suppress search header <br /><span style="background: #FFB0B0"> <strong>Topics: Changed: By:</strong> </span></td>
<td> Show search header </td>
</tr>
<tr>
<td><code>nototal="on"</code></td>
<td> Do not show number of topics found </td>
<td> Show number </td>
</tr>
</table> Example: <code><b>%<nop>SEARCH{"wiki" web="%MAINWEB%" scope="topic"}%</nop></b></code></td>
</tr>
<tr>
<td><code>%<nop>VAR{"NAME" web="Web"}%</nop></code></td>
<td> Get a preference value from a web other then the current one. Example: To get <code>%<nop>WEBBGCOLOR%</nop></code> of the %MAINWEB% web write <code>%<nop>VAR{"WEBBGCOLOR" web="%MAINWEB%"}%</nop></code>, is <code><b>%VAR{"WEBBGCOLOR" web="%MAINWEB%"}%</b></code></td>
<td>
<p>
</p>
</td>
</tr>
</table>
[1] **_Note_**: A web can be excluded from a `web="all"` search if you define a `NOSEARCHALL=on` variable in its %WEBPREFSTOPIC%.
### <a name="Preferences_Variables"> Preferences Variables </a>
Additional variables are defined in the preferences ( site-level ( **_SL_** ) in %TWIKIWEB%.%WIKIPREFSTOPIC%, web-level ( **_WL_** ) in %WEBPREFSTOPIC% of each web, and user level ( **_UL_** ) preferences in individual user topics):
<table border="1">
<tr>
<th> Variable: </th>
<th> Level: </th>
<th> What: </th>
</tr>
<tr>
<td><code>%<nop>WIKIWEBMASTER%</nop></code></td>
<td><strong><em>SL</em></strong></td>
<td> Webmaster email address (sender of email notifications) , is <b>%WIKIWEBMASTER%</b></td>
</tr>
<tr>
<td><code>%<nop>WIKIWEBLIST%</nop></code></td>
<td><strong><em>SL</em></strong></td>
<td> List of %WIKITOOLNAME% webs (in upper right corner of topics) </td>
</tr>
<tr>
<td><code>%<nop>WEBTOPICLIST%</nop></code></td>
<td><strong><em>WL</em></strong></td>
<td> Common links of web (second line of topics) </td>
</tr>
<tr>
<td><code>%<nop>WEBCOPYRIGHT%</nop></code></td>
<td><strong><em>SL</em></strong> , <strong><em>WL</em></strong></td>
<td> Copyright notice (bottom right corner of topics) </td>
</tr>
<tr>
<td><code>%<nop>WEBBGCOLOR%</nop></code></td>
<td><strong><em>WL</em></strong></td>
<td> Background color of web </td>
</tr>
<tr>
<td><code>%<nop>NOSEARCHALL%</nop></code></td>
<td><strong><em>WL</em></strong></td>
<td> Exclude web from a <code>web="all"</code> search (set variable to <code>on</code> for hidden webs) </td>
</tr>
<tr>
<td><code>%<nop>NEWTOPICBGCOLOR%</nop></code></td>
<td><strong><em>SL</em></strong> , <em>UL</em></td>
<td> Background color of non existing topic. ( <strong><em>UL</em></strong> needs authentication for topic views ) </td>
</tr>
<tr>
<td><code>%<nop>NEWTOPICFONTCOLOR%</nop></code></td>
<td><strong><em>SL</em></strong> , <em>UL</em></td>
<td> Font color of non existing topic. ( <strong><em>UL</em></strong> needs authentication for topic views ) </td>
</tr>
<tr>
<td><code>%<nop>EDITBOXWIDTH%</nop></code></td>
<td><strong><em>SL</em></strong> , <strong><em>UL</em></strong></td>
<td> Horizontal size of edit box, is <b> <code>%EDITBOXWIDTH%</code> </b></td>
</tr>
<tr>
<td><code>%<nop>EDITBOXHEIGHT%</nop></code></td>
<td><strong><em>SL</em></strong> , <strong><em>UL</em></strong></td>
<td> Vertical size of edit box, is <b> <code>%EDITBOXHEIGHT%</code> </b></td>
</tr>
<tr>
<td><code>%<nop>ATTACHLINKBOX%</nop></code></td>
<td><strong><em>SL</em></strong> , <strong><em>UL</em></strong></td>
<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>
</tr>
<tr>
<td><code>%<nop>HTTP_EQUIV_ON_VIEW%</nop></code></td>
<td><strong><em>SL</em></strong></td>
<td> http-equiv meta tags for view, rdiff, attach, search* scripts. </td>
</tr>
<tr>
<td><code>%<nop>HTTP_EQUIV_ON_EDIT%</nop></code></td>
<td><strong><em>SL</em></strong> , <strong><em>UL</em></strong></td>
<td> http-equiv meta tags for edit script. </td>
</tr>
<tr>
<td><code>%<nop>HTTP_EQUIV_ON_PREVIEW%</nop></code></td>
<td><strong><em>SL</em></strong> , <strong><em>UL</em></strong></td>
<td> http-equiv meta tags for preview script. </td>
</tr>
<tr>
<td><code>%<nop>DENYWEBCHANGE%</nop></code></td>
<td><strong><em>WL</em></strong></td>
<td> List of users and groups who are <strong>not allowed</strong> to change topics in the %WIKITOOLNAME% web. (More in <span style="background:"><font color="">TWiki Access Control</font></span><a href="http://LOCATION/TWikiAccessControl">?</a>) </td>
</tr>
<tr>
<td><code>%<nop>ALLOWWEBCHANGE%</nop></code></td>
<td><strong><em>WL</em></strong></td>
<td> List of users and groups who are <strong>allowed</strong> to change topics in the %WIKITOOLNAME% web. (More in <span style="background:"><font color="">TWiki Access Control</font></span><a href="http://LOCATION/TWikiAccessControl">?</a>) </td>
</tr>
<tr>
<td><code>%<nop>DENYTOPICCHANGE%</nop></code></td>
<td><strong><em>(any topic)</em></strong></td>
<td> List of users and groups who are <strong>not allowed</strong> to change the current topic. (More in <span style="background:"><font color="">TWiki Access Control</font></span><a href="http://LOCATION/TWikiAccessControl">?</a>) </td>
</tr>
<tr>
<td><code>%<nop>ALLOWTOPICCHANGE%</nop></code></td>
<td><strong><em>(any topic)</em></strong></td>
<td> List of users and groups who are <strong>allowed</strong> to change the current topic. (More in <span style="background:"><font color="">TWiki Access Control</font></span><a href="http://LOCATION/TWikiAccessControl">?</a>) </td>
</tr>
<tr>
<td><code>%<nop>FINALPREFERENCES%</nop></code></td>
<td><strong><em>SL</em></strong> , <strong><em>WL</em></strong></td>
<td> List of preferences that are not allowed to be overridden by next level preferences</td>
</tr>
</table>
**_Notes:_**
* Preferences variables ( on site-level, web-level and user level ) are defined by bullet lines with this syntax:
* <code>Set VARIABLENAME = value</code>
* Additional preferences variables can be defined on all three level as needed. Example:
* <code>Set MYLOGO = %PUBURLPATH%/%MAINWEB%/LogoTopic/logo.gif</code>
-- [[PeterThoeny]] - 15 Mar 2001 <br />
|