none
[openafs-wiki.git] / TWiki / TWikiVariables.mdwn
index 3467b73..27109e8 100644 (file)
@@ -62,8 +62,33 @@ This version of TWiki - TWiki-4.1.2, Sat, 03 Mar 2007, build 13046 - expands the
     <td> The path of the attachment URL of the current topic, is <b>http://www.dementia.org/twiki//view</b></td>
   </tr>
   <tr>
+    <td><code>%ICON{"type"}%</code></td>
+    <td> Small 16x16 pixel icon of common attachment types, like <img align="top" alt="bmp" border="0" height="16" src="http://www.dementia.org/twiki//view/Main/WebHome/bmp.gif" width="16" /> <code>bmp</code>, <img align="top" alt="doc" border="0" height="16" src="http://www.dementia.org/twiki//view/Main/WebHome/doc.gif" width="16" /> <code>doc</code>, <img align="top" alt="gif" border="0" height="16" src="http://www.dementia.org/twiki//view/Main/WebHome/gif.gif" width="16" /> <code>gif</code>, <img align="top" alt="hlp" border="0" height="16" src="http://www.dementia.org/twiki//view/Main/WebHome/hlp.gif" width="16" /> <code>hlp</code>, <img align="top" alt="html" border="0" height="16" src="http://www.dementia.org/twiki//view/Main/WebHome/html.gif" width="16" /> <code>html</code>, <img align="top" alt="mp3" border="0" height="16" src="http://www.dementia.org/twiki//view/Main/WebHome/mp3.gif" width="16" /> <code>mp3</code>, <img align="top" alt="pdf" border="0" height="16" src="http://www.dementia.org/twiki//view/Main/WebHome/pdf.gif" width="16" /> <code>pdf</code>, <img align="top" alt="ppt" border="0" height="16" src="http://www.dementia.org/twiki//view/Main/WebHome/ppt.gif" width="16" /> <code>ppt</code>, <img align="top" alt="txt" border="0" height="16" src="http://www.dementia.org/twiki//view/Main/WebHome/txt.gif" width="16" /> <code>txt</code>, <img align="top" alt="xls" border="0" height="16" src="http://www.dementia.org/twiki//view/Main/WebHome/xls.gif" width="16" /> <code>xls</code>, <img align="top" alt="xml" border="0" height="16" src="http://www.dementia.org/twiki//view/Main/WebHome/xml.gif" width="16" /> <code>xml</code>, <img align="top" alt="zip" border="0" height="16" src="http://www.dementia.org/twiki//view/Main/WebHome/zip.gif" width="16" /> <code>zip</code>, etc. Specify file type only, file name, or full path name. Example: <code>%ICON{"pdf"}%</code> returns <img align="top" alt="pdf" border="0" height="16" src="http://www.dementia.org/twiki//view/Main/WebHome/pdf.gif" width="16" /></td>
+  </tr>
+  <tr>
     <td><code>%URLPARAM{"name"}%</code></td>
-    <td> Returns the value of a URL parameter. Note that there is a low risk that this variable could be misused for cross-scripting. Ex: <code>%URLPARAM{"skin"}%</code> returns <b>print</b> for a <code>.../view/%WEB%/%TOPIC%?skin=print</code> URL. Is <b></b></td>
+    <td> Returns the value of a URL parameter. Note that there is a risk that this variable could be misused for cross-scripting. Parameters are name, default and newline: <table border="1" cellpadding="0" cellspacing="0">
+        <tr>
+          <th bgcolor="#99CCCC"><strong> Parameter: </strong></th>
+          <th bgcolor="#99CCCC"><strong> Description: </strong></th>
+          <th bgcolor="#99CCCC"><strong> Default: </strong></th>
+        </tr>
+        <tr>
+          <td><code>"name"</code></td>
+          <td> The name of a URL parameter </td>
+          <td> required </td>
+        </tr>
+        <tr>
+          <td><code>default="..."</code></td>
+          <td> Default value in case parameter is empty or missing </td>
+          <td> empty string </td>
+        </tr>
+        <tr>
+          <td><code>newline="&lt;br /&gt;"</code></td>
+          <td> Convert newlines to other delimiters </td>
+          <td> no conversion </td>
+        </tr>
+      </table> Example: <code>%URLPARAM{"skin"}%</code> returns <b>print</b> for a <code>.../view/%WEB%/%TOPIC%?skin=print</code> URL. Is <b></b></td>
   </tr>
   <tr>
     <td><code>%URLENCODE{"string"}%</code></td>
@@ -221,7 +246,7 @@ This version of TWiki - TWiki-4.1.2, Sat, 03 Mar 2007, build 13046 - expands the
   </tr>
   <tr>
     <td><code>%GMTIME%</code></td>
-    <td> GM time, is <b>29 Jun 2010 - 15:40</b></td>
+    <td> GM time, is <b>29 Jun 2010 - 15:43</b></td>
   </tr>
   <tr>
     <td><code>%GMTIME{"format"}%</code></td>
@@ -271,15 +296,15 @@ This version of TWiki - TWiki-4.1.2, Sat, 03 Mar 2007, build 13046 - expands the
           <td> 2 digit year </td>
           <td> 99 </td>
         </tr>
-      </table> Variables can be shortened to 3 characters. Example: <br /><code>%GMTIME{"$day $month, $year - $hour:$min:$sec"}%</code> is <br /><b>29 Jun, 2010 - 15:40:01</b></td>
+      </table> Variables can be shortened to 3 characters. Example: <br /><code>%GMTIME{"$day $month, $year - $hour:$min:$sec"}%</code> is <br /><b>29 Jun, 2010 - 15:43:44</b></td>
   </tr>
   <tr>
     <td><code>%SERVERTIME%</code></td>
-    <td> Server time, is <b>29 Jun 2010 - 11:40</b></td>
+    <td> Server time, is <b>29 Jun 2010 - 11:43</b></td>
   </tr>
   <tr>
     <td><code>%SERVERTIME{"format"}%</code></td>
-    <td> Formatted server time. <br /> Example: <code>%SERVERTIME{"$hou:$min"}%</code> is <b>11:40</b></td>
+    <td> Formatted server time. <br /> Example: <code>%SERVERTIME{"$hou:$min"}%</code> is <b>11:43</b></td>
   </tr>
   <tr>
     <td><code>%HTTP_HOST%</code></td>
@@ -330,6 +355,11 @@ This version of TWiki - TWiki-4.1.2, Sat, 03 Mar 2007, build 13046 - expands the
           <td> Include a previous topic revision; N/A for URLs </td>
           <td> top revision </td>
         </tr>
+        <tr>
+          <td><code>warn="off"</code></td>
+          <td> Warn if topic include fails: Fail silently (if <code>off</code>); output default warning (if set to <code>on</code>); else, output specific text (use <code>$topic</code> for topic name) </td>
+          <td><code>%INCLUDE- WARNING%</code> preferences setting </td>
+        </tr>
       </table>
     </td>
   </tr>
@@ -389,11 +419,21 @@ This version of TWiki - TWiki-4.1.2, Sat, 03 Mar 2007, build 13046 - expands the
           <td> N/A </td>
         </tr>
         <tr>
-          <td><code>web="Name"</code><br /><code>web="Main Know"</code><br /><code>web="all"</code></td>
-          <td> Wiki web to search: A web, a list of webs separated by whitespace, or <code>all</code> webs. [2] </td>
+          <td><code>web="Name"</code><br /><code>web="Main, Know"</code><br /><code>web="all"</code></td>
+          <td> Wiki web to search: A web, a list of webs separated by comma, or <code>all</code> webs. [2] </td>
           <td> Current web </td>
         </tr>
         <tr>
+          <td><code>topic="WebPreferences"</code><br /><code>topic="*Bug"</code></td>
+          <td> Limit search to topics: A topic, a topic with asterisk wildcards, or a list of topics separated by comma. </td>
+          <td> All topics in a web </td>
+        </tr>
+        <tr>
+          <td><code>excludetopic="Web*"</code><br /><code>excludetopic="WebHome, WebChanges"</code></td>
+          <td> Exclude topics from search: A topic, a topic with asterisk wildcards, or a list of topics separated by comma. </td>
+          <td> None </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>
@@ -453,6 +493,16 @@ This version of TWiki - TWiki-4.1.2, Sat, 03 Mar 2007, build 13046 - expands the
           <td> Custom format results: see <strong>[[Main/FormattedSearch]]</strong> for usage, variables &amp; examples </td>
           <td> Results in table </td>
         </tr>
+        <tr>
+          <td><code>multiple="on"</code></td>
+          <td> Multiple hits per topic. Each hit can be [[Main/FormattedSearch]]. The last token is used in case of a regular expression ";" <em>and</em> search </td>
+          <td> Only one hit per topic </td>
+        </tr>
+        <tr>
+          <td><code>separator=", "</code></td>
+          <td> Line separator between hits </td>
+          <td> Newline <code>"$n"</code></td>
+        </tr>
       </table> Regular example: <code><b>%SEARCH{"wiki" web="Main" scope="topic"}%</b></code><br /> Formatted example: <code><b>%SEARCH{"FAQ" scope="topic" nosearch="on" nototal="on" header="| *Topic: * | *Summary: * |" format="| $topic | $summary |"%</b></code> <em>(displays results in a table with header - [[Main/FormattedSearch]])</em><br /> %H% If the TWiki:Plugins.TablePlugin is installed, you may set a <code>%TABLE{}%</code> variable just before the <code>%SEARCH{}%</code> to alter the output of a search. Example: <code><b>%TABLE{ tablewidth="90%" }%</b></code></td>
   </tr>
   <tr>