3fd35dcc993d3e3f647db7d83ee6b435c418fc33
[openafs-wiki.git] / TWiki / TWikiVariables.mdwn
1 TWiki 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 TWiki, link of Home icon in upper left corner, is <b>%WIKIHOMEURL%</b></td>
11   </tr>
12   <tr>
13     <td><code>%SCRIPTURL%</code></td>
14     <td> The script URL of TWiki, 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 TWiki, 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 TWiki, 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>%DATE%</code></td>
62     <td> Todays date, is <b>29 Jun 2010</b></td>
63   </tr>
64   <tr>
65     <td><code>%HTTP_HOST%</code></td>
66     <td> HTTP_HOST environment variable, is <b></b></td>
67   </tr>
68   <tr>
69     <td><code>%REMOTE_ADDR%</code></td>
70     <td> REMOTE_ADDR environment variable, is <b></b></td>
71   </tr>
72   <tr>
73     <td><code>%REMOTE_PORT%</code></td>
74     <td> REMOTE_PORT environment variable, is <b></b></td>
75   </tr>
76   <tr>
77     <td><code>%REMOTE_USER%</code></td>
78     <td> REMOTE_USER environment variable, is <b></b></td>
79   </tr>
80   <tr>
81     <td><code>%INCLUDE{"file.ext"}%</code></td>
82     <td> Server side include, includes the text of a file. The default directory is the current Wiki web. Example: <code><b>%INCLUDE{"../Know/TopicName.txt"}%</b></code></td>
83   </tr>
84   <tr>
85     <td><code>%SEARCH{"str" ...}%</code></td>
86     <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">
87         <tr>
88           <th bgcolor="#99CCCC"><strong> Pair: </strong></th>
89           <th bgcolor="#99CCCC"><strong> Description: </strong></th>
90           <th bgcolor="#99CCCC"><strong> Default: </strong></th>
91         </tr>
92         <tr>
93           <td><code>web="Name"</code></td>
94           <td> Specify Wiki web to search </td>
95           <td> Current web </td>
96         </tr>
97         <tr>
98           <td><code>scope="topic"</code></td>
99           <td> Search topic name (title) </td>
100           <td> Topic text (body) </td>
101         </tr>
102         <tr>
103           <td><code>regex="on"</code></td>
104           <td>[[Main/RegularExpression]] search </td>
105           <td> Literal search </td>
106         </tr>
107         <tr>
108           <td><code>casesensitive="on"</code></td>
109           <td> Case sensitive search </td>
110           <td> Ignore case </td>
111         </tr>
112         <tr>
113           <td><code>nosummary="on"</code></td>
114           <td> Show topic title only </td>
115           <td> Show topic summary </td>
116         </tr>
117         <tr>
118           <td><code>nosearch="on"</code></td>
119           <td> Suppress search string </td>
120           <td> Show search string </td>
121         </tr>
122         <tr>
123           <td><code>nototal="on"</code></td>
124           <td> Do not show number of topics found </td>
125           <td> Show number </td>
126         </tr>
127       </table> Example: <code><b>%SEARCH{"wiki" web="Main" scope="topic"}%</b></code></td>
128   </tr>
129 </table>
130
131 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):
132
133 <table border="1">
134   <tr>
135     <th> Variable: </th>
136     <th> Level: </th>
137     <th> What: </th>
138   </tr>
139   <tr>
140     <td><code>%WIKIWEBMASTER%</code></td>
141     <td><strong><em>SL</em></strong></td>
142     <td> Webmaster email address (sender of email notifications) , is <b></b></td>
143   </tr>
144   <tr>
145     <td><code>%WIKIWEBLIST%</code></td>
146     <td><strong><em>SL</em></strong></td>
147     <td> List of %WIKITOOLNAME% webs (in upper right corner of topics) </td>
148   </tr>
149   <tr>
150     <td><code>%WEBTOPICLIST%</code></td>
151     <td><strong><em>WL</em></strong></td>
152     <td> Common links of web (second line of topics) </td>
153   </tr>
154   <tr>
155     <td><code>%WEBCOPYRIGHT%</code></td>
156     <td><strong><em>SL</em></strong> , <strong><em>WL</em></strong></td>
157     <td> Copyright notice (bottom right corner of topics) </td>
158   </tr>
159   <tr>
160     <td><code>%WEBBGCOLOR%</code></td>
161     <td><strong><em>WL</em></strong></td>
162     <td> Background color of web </td>
163   </tr>
164   <tr>
165     <td><code>%EDITBOXWIDTH%</code></td>
166     <td><strong><em>SL</em></strong> , <strong><em>UL</em></strong></td>
167     <td> Horizontal size of edit box, is <b> <code>%EDITBOXWIDTH%</code> </b></td>
168   </tr>
169   <tr>
170     <td><code>%EDITBOXHEIGHT%</code></td>
171     <td><strong><em>SL</em></strong> , <strong><em>UL</em></strong></td>
172     <td> Vertical size of edit box, is <b> <code>%EDITBOXHEIGHT%</code> </b></td>
173   </tr>
174   <tr>
175     <td><code>%ATTACHLINKBOX%</code></td>
176     <td><strong><em>SL</em></strong> , <strong><em>UL</em></strong></td>
177     <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>
178   </tr>
179 </table>
180
181 -- [[PeterThoeny]] - 21 Apr 2000 <br />