1 rizwank 1.1 %META:TOPICINFO{author="PeterThoeny" date="1097127214" format="1.0" version="1.3"}%
2 %META:TOPICPARENT{name="TWikiVariables"}%
3 __Note:__ This topic is included by TWikiVariables
4
5 -----
6 %STARTINCLUDE%
7 #VarNOTIFYTOPIC
8 ---+++ NOTIFYTOPIC -- name of the notify topic
9 * Syntax: =%<nop>NOTIFYTOPIC%=
10 * Expands to: =%NOTIFYTOPIC%=, renders as [[%NOTIFYTOPIC%]]
11 * Related: [[#VarHOMETOPIC][HOMETOPIC]], [[#VarSTATISTICSTOPIC][STATISTICSTOPIC]], [[#VarTOPIC][TOPIC]]
12
13 #VarPLUGINVERSION
14 ---+++ PLUGINVERSION -- the version of the TWiki Plugin API
15 * This is the =$TWiki::Plugins::VERSION= number, also indicating the version of the TWikiFuncModule
16 * Syntax: =%<nop>PLUGINVERSION{}%=
17 * Expands to: =%PLUGINVERSION{}%=
18 * Related: [[#VarPLUGINVERSION2][PLUGINVERSION{"name"}]], [[#VarWIKIVERSION][WIKIVERSION]]
19
20 #VarPLUGINVERSION2
21 ---+++ PLUGINVERSION{"name"} -- the version of an installed Plugin
22 rizwank 1.1 * Syntax: =%<nop>PLUGINVERSION{"name"}%=
23 * Example: =%<nop>PLUGINVERSION{"DefaultPlugin"}%= expands to =%PLUGINVERSION{"DefaultPlugin"}%=
24 * Related: [[#VarPLUGINVERSION][PLUGINVERSION]], [[#VarWIKIVERSION][WIKIVERSION]]
25
26 #VarPUBURL
27 ---+++ PUBURL -- the base URL of attachments
28 * Syntax: =%<nop>PUBURL%=
29 * Expands to: =%PUBURL%=
30 * Example: You can refer to a file attached to another topic with =%<nop>PUBURL%/%<nop>WEB%/OtherTopic/image.gif=
31 * Related: [[#VarATTACHURL][ATTACHURL]], [[#VarPUBURLPATH][PUBURLPATH]], [[#VarSCRIPTURL][SCRIPTURL]], FileAttachments
32
33 #VarPUBURLPATH
34 ---+++ PUBURLPATH -- the base URL path of attachments
35 * Syntax: =%<nop>PUBURLPATH%=
36 * Expands to: =%PUBURLPATH%=
37 * Related: [[#VarATTACHURL][ATTACHURL]], [[#VarPUBURL][PUBURL]], FileAttachments
38
39 #VarREMOTEADDR
40 ---+++ REMOTE_ADDR -- environment variable
41 * Syntax: =%<nop>REMOTE_ADDR%=
42 * Expands to: =%REMOTE_ADDR%=
43 rizwank 1.1 * Related: [[#VarHTTPHOST][HTTP_HOST]], [[#VarREMOTEPORT][REMOTE_PORT]], [[#VarREMOTEUSER][REMOTE_USER]]
44
45 #VarREMOTEPORT
46 ---+++ REMOTE_PORT -- environment variable
47 * Syntax: =%<nop>REMOTE_PORT%=
48 * Expands to: <code>%REMOTE_PORT%</code>
49 * Related: [[#VarHTTPHOST][HTTP_HOST]], [[#VarREMOTEADDR][REMOTE_ADDR]], [[#VarREMOTEUSER][REMOTE_USER]]
50
51 #VarREMOTEUSER
52 ---+++ REMOTE_USER -- environment variable
53 * Syntax: =%<nop>REMOTE_USER%=
54 * Expands to: <code>%REMOTE_USER%</code>
55 * Related: [[#VarHTTPHOST][HTTP_HOST]], [[#VarREMOTEADDR][REMOTE_ADDR]], [[#VarREMOTEPORT][REMOTE_PORT]], [[#VarUSERNAME][USERNAME]], [[#VarWIKINAME][WIKINAME]], [[#VarWIKIUSERNAME][WIKIUSERNAME]]
56
57 #VarREVINFO
58 ---+++ REVINFO -- revision information of current topic
59 * Syntax: =%<nop>REVINFO%=
60 * Expands to: <code>%REVINFO%</code>
61 * Related: [[#VarREVINFO2][REVINFO{"format"}]]
62
63 #VarREVINFO2
64 rizwank 1.1 ---+++ REVINFO{"format"} -- formatted revision information of topic
65 * Syntax: =%<nop>REVINFO{"format"}%=
66 * Supported parameters:
67 | *Parameter:* | *Description:* | *Default:* |
68 | ="format"= | Format of revision information, see supported variables below | ="r1.$rev - $date - $wikiusername"= |
69 | =web="..."= | Name of web | Current web |
70 | =topic="..."= | Topic name | Current topic |
71 | =rev="1.5"= | Specific revison number | Latest revision |
72 * Supported variables in format:
73 | *Variable:* | *Unit:* | *Example* |
74 | =$web= | Name of web | Current web |
75 | =$topic= | Topic name | Current topic |
76 | =$rev= | Revison number. Prefix =r1.= to get the usual =r1.5= format | =5= |
77 | =$date= | Revision date | =11 Jul 2004= |
78 | =$username= | Login username of revision | =jsmith= |
79 | =$wikiname= | WikiName of revision | =JohnSmith= |
80 | =$wikiusername= | <nop>WikiName with %MAINWEB% web prefix | =%MAINWEB%.JohnSmith= |
81 * Example: =%<nop>REVINFO{"$date - $wikiusername" rev="1.1"}%= returns revision info of first revision
82 * Related: [[#VarREVINFO][REVINFO]]
83
84 #VarSCRIPTURL
85 rizwank 1.1 ---+++ SCRIPTURL -- script URL of %WIKITOOLNAME%
86 * Syntax: =%<nop>SCRIPTURL%=
87 * Expands to: =%SCRIPTURL%=
88 * Example: To get the authenticated version of current topic write =%<nop>SCRIPTURL%/viewauth%<nop>SCRIPTSUFFIX%/%<nop>WEB%/%<nop>TOPIC%= which expands to =%SCRIPTURL%/viewauth%SCRIPTSUFFIX%/%WEB%/%TOPIC%=
89 * Related: [[#VarPUBURL][PUBURL]], [[#VarSCRIPTSUFFIX][SCRIPTSUFFIX]], [[#VarSCRIPTURLPATH][SCRIPTURLPATH]]
90
91 #VarSCRIPTURLPATH
92 ---+++ SCRIPTURLPATH -- script URL path of %WIKITOOLNAME%
93 * Syntax: =%<nop>SCRIPTURLPATH%=
94 * Expands to: =%SCRIPTURLPATH%=
95 * Related: [[#VarPUBURLPATH][PUBURLPATH]], [[#VarSCRIPTURL][SCRIPTURL]]
96
97 #VarSCRIPTSUFFIX
98 ---+++ SCRIPTSUFFIX -- script suffix
99 * Some %WIKITOOLNAME% installations require a file extension for CGI scripts like =.pl= or =.cgi=
100 * Syntax: =%<nop>SCRIPTSUFFIX%=
101 * Expands to: <code>%SCRIPTSUFFIX%</code>
102 * Related: [[#VarSCRIPTURL][SCRIPTURL]]
103
104 %INCLUDE{TWikiSearch}%
105
106 rizwank 1.1 #VarSERVERTIME
107 ---+++ SERVERTIME -- server time
108 * Syntax: =%<nop>SERVERTIME%=
109 * Expands to: =%SERVERTIME%=
110 * Related: [[#VarDISPLAYTIME][DISPLAYTIME]], [[#VarGMTIME][GMTIME]], [[#VarSERVERTIME2][SERVERTIME{"format"}]]
111
112 #VarSERVERTIME2
113 ---+++ SERVERTIME{"format"} -- formatted server time
114 * Same format qualifiers as =%<nop>GMTIME%=
115 * Syntax: =%<nop>SERVERTIME{"format"}%=
116 * Example: =%<nop>SERVERTIME{"$hou:$min"}%= expands to =%SERVERTIME{"$hou:$min"}%=
117 * Related: [[#VarDISPLAYTIME][DISPLAYTIME]], [[#VarGMTIME][GMTIME]], [[#VarSERVERTIME][SERVERTIME]]
118
119 #VarSPACEDTOPIC
120 ---+++ SPACEDTOPIC -- topic name, spaced and encoded
121 * The current topic name with added spaces, for regular expression search of Ref-By
122 * Syntax: =%<nop>SPACEDTOPIC%=
123 * Expands to: =%SPACEDTOPIC%=
124 * Related: [[#VarTOPIC][TOPIC]]
125
126 #VarSTARTINCLUDE
127 rizwank 1.1 ---+++ STARTINCLUDE -- start position of topic text if included
128 * If present in included topic, start to include text from this location up to the end, or up to the location of the =%<nop>STOPINCLUDE%= variable. A normal view of the topic shows everyting exept the =%<nop>STARTINCLUDE%= variable itself.
129 * Syntax: =%<nop>STARTINCLUDE%=
130 * Related: [[#VarINCLUDE][INCLUDE]], [[#VarSTOPINCLUDE][STOPINCLUDE]]
131
132 #VarSTATISTICSTOPIC
133 ---+++ STATISTICSTOPIC -- name of statistics topic
134 * Syntax: =%<nop>STATISTICSTOPIC%=
135 * Expands to: =%STATISTICSTOPIC%=, renders as [[%STATISTICSTOPIC%]]
136 * Related: [[#VarHOMETOPIC][HOMETOPIC]], [[#VarNOTIFYTOPIC][NOTIFYTOPIC]], [[#VarTOPIC][TOPIC]]
137
138 #VarSTOPINCLUDE
139 ---+++ STOPINCLUDE -- end position of topic text if included
140 * 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 =%<nop>STOPINCLUDE%= variable itself.
141 * Syntax: =%<nop>STOPINCLUDE%=
142 * Related: [[#VarINCLUDE][INCLUDE]], [[#VarSTARTINCLUDE][STARTINCLUDE]]
143
144 #VarTOC
145 ---+++ TOC -- table of contents of current topic
146 * Syntax: =%<nop>TOC%=
147 * Related: [[#VarTOC2][TOC{"SomeTopic"}]]
148 rizwank 1.1
149 #VarTOC2
150 ---+++ TOC{"Topic"} -- table of contents
151 * Syntax: =%<nop>TOC{"SomeTopic" ...}%=
152 * Table of Contents. Shows a TOC that is generated automatically based on headings of a topic. Headings in WikiSyntax (="---++ text"=) and HTML (="<h2>text</h2>"=) are taken into account. Any heading text after ="!!"= is excluded from the TOC; for example, write ="---+!! text"= if you do not want to list a header in the TOC
153 * Supported parameters:
154 | *Parameter:* | *Description:* | *Default:* |
155 | ="TopicName"= | topic name | Current topic |
156 | =web="Name"= | Name of web | Current web |
157 | =depth="2"= | Limit depth of headings shown in TOC | 6 |
158 | =title="Some text"= | Title to appear at top of TOC | none |
159 * Example: =%<nop>TOC{depth="2"}%=
160 * Example: =%<nop>TOC{"TWikiDocumentation" web="%TWIKIWEB%" title="Contents:"}%=
161 * Example: see TWiki:Sandbox.TestTopicInclude
162 * Related: [[#VarTOC][TOC]]
163
164 #VarTOPIC
165 ---+++ TOPIC -- name of current topic
166 * Syntax: =%<nop>TOPIC%=
167 * Expands to: =%TOPIC%=, renders as [[%TOPIC%]]
168 * Related: [[#VarBASETOPIC][BASETOPIC]], [[#VarINCLUDINGTOPIC][INCLUDINGTOPIC]], [[#VarTOPICLIST][TOPICLIST]], [[#VarWEB][WEB]]
169 rizwank 1.1
170 #VarTOPICLIST
171 ---+++ TOPICLIST{"format"} -- topic index of a web
172 * The "format" defines the format of one topic item. It may include variables: The =$name= variable gets expanded to the topic name; the =$web= variable gets expanded to the name of the web.
173 * Syntax: =%<nop>TOPICLIST{"format" ...}%=
174 * Supported parameters:
175 | *Parameter:* | *Description:* | *Default:* |
176 | ="format"= | Format of one line, may include =$name= and =$web= variables | ="$name"= |
177 | =format="format"= | (Alternative to above) | ="$name"= |
178 | =separator=", "= | line separator | ="\n"= (new line) |
179 | =web="Name"= | Name of web | Current web |
180 * Example: =%<nop>TOPICLIST{" * $web.$name"}%= creates a bullet list of all topics
181 * Example: =%<nop>TOPICLIST{separator=", "}%= creates a comma separated list of all topics
182 * Example: =%<nop>TOPICLIST{" <option>$name</option>"}%= creates an option list (for drop down menus)
183 * Related: [[#VarSEARCH][SEARCH]], [[#VarWEBLIST][WEBLIST]]
184
185 #VarTWIKIWEB
186 ---+++ TWIKIWEB -- name of TWiki documentation web
187 * The web containing all documentation and site-wide preference settings for %WIKITOOLNAME%
188 * Syntax: =%<nop>TWIKIWEB%=
189 * Expands to: =%TWIKIWEB%=
190 rizwank 1.1 * Related: [[#VarMAINWEB][MAINWEB]]
191
192 #VarURLPARAM
193 ---+++ URLPARAM{"name"} -- get value of a URL parameter
194 * Returns the value of a URL parameter. Note that there is a risk that this variable could be misused for cross-scripting
195 * Syntax: =%<nop>URLPARAM{"name"}%=
196 * Supported parameters:
197 | *Parameter:* | *Description:* | *Default:* |
198 | ="name"= | The name of a URL parameter | required |
199 | =default="..."= | Default value in case parameter is empty or missing | empty string |
200 | =newline="<br />"= | Convert newlines in textarea to other delimiters | no conversion |
201 | =encode="entity"= | Encode special characters into HTML entities, like a double quote into =&#034;=. This is needed if text is put into an HTML form field | no encoding |
202 | =encode="url"= | Encode special characters for URL parameter use, like a double quote into =%22= | no encoding |
203 | =multiple="on"= %BR% =multiple="[<nop>[$item]]"= | If set, gets all selected elements of a =<select multiple="multiple">= tag. A format can be specified, with =$item= indicating the element, e.g. =multiple="Option: $item"= | first element |
204 | =separator=", "= | Separator between multiple selections. Only relevant if multiple is specified | ="\n"= (new line) |
205 * Example: =%<nop>URLPARAM{"skin"}%= returns =print= for a =.../view/%WEB%/%TOPIC%?skin=print= URL. [[%SCRIPTURL%/viewauth%SCRIPTSUFFIX%/%WEB%/%TOPIC%?skin=print#VarURLPARAM][Test this]]: %URLPARAM{"skin"}%
206 * Related: [[#VarSEARCH][SEARCH]], FormattedSearch
207
208 #VarUSERNAME
209 ---+++ USERNAME -- your login username
210 * TWiki makes names available in three formats: USERNAME like =jsmith=, WIKINAME like =JohnSmith= and WIKIUSERNAME like =%MAINWEB%.JohnSmith=. A user is a %MAINWEB%.TWikiGuest in case the topic is not authenticated
211 rizwank 1.1 * Syntax: =%<nop>USERNAME%=
212 * Expands to: =%USERNAME%=
213 * Related: [[#VarREMOTEUSER][REMOTE_USER]], [[#VarWIKINAME][WIKINAME]], [[#VarWIKIUSERNAME][WIKIUSERNAME]], TWikiUserAuthentication
214
215 #VarVAR
216 ---+++ VAR{"NAME" web="Web"} -- get a preference value from another web
217 * Syntax: =%<nop>VAR{"NAME" web="Web"}%=
218 * Example: To get =%<nop>WEBBGCOLOR%= of the %MAINWEB% web write =%<nop>VAR{"WEBBGCOLOR" web="%MAINWEB%"}%=, which expands to =%VAR{"WEBBGCOLOR" web="%MAINWEB%"}%=
219 * Related: [[#VarWEBPREFSTOPIC][WEBPREFSTOPIC]]
220
221 #VarWEB
222 ---+++ WEB -- name of current web
223 * Syntax: =%<nop>WEB%=
224 * Expands to: =%WEB%=
225 * Related: [[#VarBASEWEB][BASEWEB]], [[#VarINCLUDINGWEB][INCLUDINGWEB]], [[#VarTOPIC][TOPIC]]
226
227 #VarWEBLIST
228 ---+++ WEBLIST{"format"} -- index of all webs
229 * List of all webs. Hidden webs are excluded, e.g. webs with a =NOSEARCHALL=on= preference variable. The ="format"= defines the format of one web item. The =$name= variable gets expanded to the name of the web, =$qname= gets expanded to double quoted name, =$marker= to =marker= where web matches =selection=.
230 * Syntax: =%<nop>WEBLIST{"format" ...}%=
231 * Supported parameters:
232 rizwank 1.1 | *Parameter:* | *Description:* | *Default:* |
233 | ="format"= | Format of one line, may include =$name= variable | ="$name"= |
234 | =format="format"= | (Alternative to above) | ="$name"= |
235 | =separator=", "= | line separator | ="\n"= (new line) |
236 | =webs="public"= | comma sep list of Web, public expands to all non-hidden | ="public"= |
237 | =marker="selected"= | Text for =$marker= where item matches =selection=, otherwise equals =""= | ="selected"= |
238 | =selection="%<nop>WEB%"= | Current value to be selected in list | =section="%<nop>WEB%"= |
239 * Example: =%<nop>WEBLIST{" * [<nop>[$name.%HOMETOPIC%]]"}%= creates a bullet list of all webs.
240 * Example: =%<nop>WEBLIST{"<option $marker value=$qname>$name</option>" webs="Trash,public" selection="%WEB%" separator=" "}%= Dropdown of all public Webs + Trash Web, current Web highlighted.
241 * Related: [[#VarTOPICLIST][TOPICLIST]], [[#VarSEARCH][SEARCH]]
242
243 #VarWEBPREFSTOPIC
244 ---+++ WEBPREFSTOPIC -- name of web preferences topic
245 * Syntax: =%<nop>WEBPREFSTOPIC%=
246 * Expands to: =%WEBPREFSTOPIC%=, renders as [[%WEBPREFSTOPIC%]]
247 * Related: [[#VarHOMETOPIC][HOMETOPIC]], [[#VarWIKIPREFSTOPIC][WIKIPREFSTOPIC]], [[#VarVAR][VAR]]
248
249 #VarWIKIHOMEURL
250 ---+++ WIKIHOMEURL -- site home URL
251 * The base URL of %WIKITOOLNAME%, is the link of the Home icon in the upper left corner, defined in TWiki.cfg
252 * Syntax: =%<nop>WIKIHOMEURL%=
253 rizwank 1.1 * Expands to: =%WIKIHOMEURL%=
254 * Related: [[#VarWIKITOOLNAME][WIKITOOLNAME]]
255
256 #VarWIKINAME
257 ---+++ WIKINAME -- your Wiki username
258 * The WikiName is the same as %<nop>USERNAME% if not defined in the %MAINWEB%.%WIKIUSERSTOPIC% topic
259 * Syntax: =%<nop>WIKINAME%=
260 * Expands to: =%WIKINAME%=
261 * Related: [[#VarREMOTEUSER][REMOTE_USER]], [[#VarUSERNAME][USERNAME]], [[#VarWIKIUSERNAME][WIKIUSERNAME]], [[#VarWIKIUSERSTOPIC][WIKIUSERSTOPIC]]
262
263 #VarWIKIPREFSTOPIC
264 ---+++ WIKIPREFSTOPIC -- name of site-wide preferences topic
265 * Syntax: =%<nop>WIKIPREFSTOPIC%=
266 * Expands to: =%WIKIPREFSTOPIC%=, renders as [[%WIKIPREFSTOPIC%]]
267 * Related: [[#VarHOMETOPIC][HOMETOPIC]], [[#VarWEBPREFSTOPIC][WEBPREFSTOPIC]]
268
269 #VarWIKITOOLNAME
270 ---+++ WIKITOOLNAME -- name of your TWiki site
271 * Syntax: =%<nop>WIKITOOLNAME%=
272 * Expands to: =%WIKITOOLNAME%=
273 * Related: [[#VarWIKIHOMEURL][WIKIHOMEURL]], [[#VarWIKIVERSION][WIKIVERSION]]
274 rizwank 1.1
275 #VarWIKIUSERNAME
276 ---+++ WIKIUSERNAME -- your Wiki username with web prefix
277 * Your %<nop>WIKINAME% with %MAINWEB% web prefix, useful to point to your %WIKITOOLNAME% home page
278 * Syntax: =%<nop>WIKIUSERNAME%=
279 * Expands to: =%WIKIUSERNAME%=, renders as %WIKIUSERNAME%
280 * Related: [[#VarREMOTEUSER][REMOTE_USER]], [[#VarUSERNAME][USERNAME]], [[#VarWIKINAME][WIKINAME]]
281
282 #VarWIKIUSERSTOPIC
283 ---+++ WIKIUSERSTOPIC -- name of topic listing all registers users
284 * Syntax: =%<nop>WIKIUSERSTOPIC%=
285 * Expands to: =%WIKIUSERSTOPIC%=, with %MAINWEB% prefix renders as %MAINWEB%.%WIKIUSERSTOPIC%
286 * Related: [[#VarWIKIUSERNAME][WIKIUSERNAME]]
287
288 #VarWIKIVERSION
289 ---+++ WIKIVERSION -- the version of the installed TWiki engine
290 * Syntax: =%<nop>WIKIVERSION%=
291 * Expands to: =%WIKIVERSION%=
292 * Related: [[#VarPLUGINVERSION][PLUGINVERSION]], [[#VarWIKITOOLNAME][WIKITOOLNAME]]
293 %STOPINCLUDE%
294
295 rizwank 1.1 -- TWiki:Main.PeterThoeny - 14 Aug 2004
296
|