CommandAndCGIScripts
(edit)
Text
Settings
Help
Title:
H1
H2
H3
H4
Bold
Italic
Monospace
Underline
Strike
Numbered List
Bullet List
Indent
Outdent
Left
Center
Right
Justify
Ext.link
Int.link
Image
Verbatim
Sign
<h1><a name="CGI_and_Command_Line_Scripts"></a> CGI and Command Line Scripts </h1> <p /> <em>Programs on the server performing actions such as rendering, saving and renaming topics.</em> <p /> These scripts are located in the <code>bin</code> and <code>tools</code> directories. This topic describes the interfaces to some of those scripts. All scripts in the <code>bin</code> directory can be called from the CGI (<a href="http://en.wikipedia.org/wiki/Common_Gateway_Interface" target="_top">Common Gateway Interface</a>) environment or from the command line. The scripts in the <code>tools</code> directory can only be called from the command line. <p /> <a name="foswikiTOC"></a><div class="foswikiToc"> <ul> <li> <a href="?template=edit#CGI_and_Command_Line_Scripts"> CGI and Command Line Scripts</a> <ul> <li> <a href="?template=edit#CGI_Scripts"> CGI Scripts</a> <ul> <li> <a href="?template=edit#General_Information"> General Information</a> <ul> <li> <a href="?template=edit#CGI_environment"> CGI environment</a> </li> <li> <a href="?template=edit#Command_line"> Command-line</a> </li> <li> <a href="?template=edit#Common_parameters"> Common parameters</a> </li></ul> </li> <li> <a href="?template=edit#attach"> attach</a> </li> <li> <a href="?template=edit#changes"> changes</a> </li> <li> <a href="?template=edit#configure"> configure</a> </li> <li> <a href="?template=edit#edit"> edit</a> </li> <li> <a href="?template=edit#login"> login</a> </li> <li> <a href="?template=edit#logon"> logon</a> </li> <li> <a href="?template=edit#manage"> manage</a> <ul> <li> <a href="?template=edit#action_create"> action=create</a> </li> <li> <a href="?template=edit#action_createweb"> action=createweb</a> </li> <li> <a href="?template=edit#action_editSettings"> action=editSettings</a> </li> <li> <a href="?template=edit#action_saveSettings"> action=saveSettings</a> </li> <li> <a href="?template=edit#action_bulkRegister"> action=bulkRegister</a> </li> <li> <a href="?template=edit#action_changePassword"> action=changePassword</a> </li> <li> <a href="?template=edit#action_resetPassword"> action=resetPassword</a> </li> <li> <a href="?template=edit#action_delete_UserAccount"> action=deleteUserAccount</a> </li> <li> <a href="?template=edit#action_restoreRevision"> action=restoreRevision</a> </li></ul> </li> <li> <a href="?template=edit#oops"> oops</a> </li> <li> <a href="?template=edit#preview"> preview</a> </li> <li> <a href="?template=edit#rdiff"> rdiff</a> </li> <li> <a href="?template=edit#register"> register</a> </li> <li> <a href="?template=edit#rename"> rename</a> <ul> <li> <a href="?template=edit#action_renameweb"> action="renameweb"</a> </li> <li> <a href="?template=edit#action_anything_else"> action=<i>anything else</i></a> </li></ul> </li> <li> <a href="?template=edit#rest"> rest</a> <ul> <li> <a href="?template=edit#Invocation_Examples"> Invocation Examples</a> </li> <li> <a href="?template=edit#Retrieving_passed_values"> Retrieving passed values</a> </li></ul> </li> <li> <a href="?template=edit#save"> save</a> </li> <li> <a href="?template=edit#search"> search</a> </li> <li> <a href="?template=edit#statistics"> statistics</a> </li> <li> <a href="?template=edit#upload"> upload</a> </li> <li> <a href="?template=edit#view"> view</a> </li> <li> <a href="?template=edit#viewfile"> viewfile</a> </li></ul> </li> <li> <a href="?template=edit#Command_Line_Scripts"> Command Line Scripts</a> <ul> <li> <a href="?template=edit#geturl_pl"> geturl.pl</a> </li> <li> <a href="?template=edit#rewriteshebang_pl"> rewriteshebang.pl</a> </li> <li> <a href="?template=edit#tick_foswiki_pl"> tick_foswiki.pl</a> </li></ul> </li></ul> </li></ul> </div> <p /> <h2><a name="CGI_Scripts"></a> CGI Scripts </h2> Details on CGI scripts located in the <code>bin</code> directory. <p /> <h3><a name="General_Information"></a> General Information </h3> <h4><a name="CGI_environment"></a> CGI environment </h4> In the CGI environment parameters are passed to the scripts via the URL and URL parameters. Environment variables are also used to determine the user performing the action. If the environment is not set up, the default user is used (usually <code>guest</code>). <h4><a name="Command_line"></a> Command-line </h4> You <strong>must</strong> be have the <code>bin</code> directory on the perl path to run the scripts from the command line. To avoid issues with file permissions, run the scripts as the web server user such as <code>nobody</code> or <code>www</code>. <p /> Parameters are passed on the command line using '-name' - for example, <pre> $ cd /usr/local/foswiki/bin $ save -topic MyWeb.MyTopic -user admin -action save -text "New text of the topic" </pre> All parameters require a value, even if that is the empty string. <p /> <h4><a name="Common_parameters"></a> Common parameters </h4> All the scripts accept a number of common parameters. The first two components of the URL after the script name are taken as the web and the topic, respectively. Standard URL parameters are: <p /> <table cellspacing="0" id="table1" cellpadding="0" class="foswikiTable" rules="rows" border="1"> <thead> <tr class="foswikiTableOdd foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0"> <th bgcolor="#687684" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <a rel="nofollow" href="/foswiki/bin/view/TWiki/CommandAndCGIScripts?template=edit;sortcol=0;table=1;up=0#sorted_table" title="Sort by this column"><font color="#ffffff">Parameter</font></a> </th> <th bgcolor="#687684" valign="top" class="foswikiTableCol1"> <a rel="nofollow" href="/foswiki/bin/view/TWiki/CommandAndCGIScripts?template=edit;sortcol=1;table=1;up=0#sorted_table" title="Sort by this column"><font color="#ffffff">Description</font></a> </th> <th bgcolor="#687684" valign="top" class="foswikiTableCol2 foswikiLastCol"> <a rel="nofollow" href="/foswiki/bin/view/TWiki/CommandAndCGIScripts?template=edit;sortcol=2;table=1;up=0#sorted_table" title="Sort by this column"><font color="#ffffff">Default</font></a> </th> </tr> </thead> <tbody> <tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0"> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <code>topic</code> </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol1"> If this is set to a URL, STALklubben will immediately redirect to that URL. Otherwise it overrides the URL and is taken as the topic name (you can pass Web.TopicName) </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol2 foswikiLastCol"> </td> </tr> <tr class="foswikiTableOdd foswikiTableRowdataBgSorted1 foswikiTableRowdataBg1"> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <code>user</code> </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol1"> Command-line only; set the name of the user performing the action. Note: this usage is inherently insecure, as it bypasses webserver login constraints. For this reason only authorised users should be allowed to execute scripts from the command line. </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol2 foswikiLastCol"> </td> </tr> <tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0"> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <code>skin</code> </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol1"> Overrides the default skin path (see <a href="/foswiki/bin/view/TWiki/Skins">Skins</a>) </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol2 foswikiLastCol"> </td> </tr> <tr class="foswikiTableOdd foswikiTableRowdataBgSorted1 foswikiTableRowdataBg1"> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <code>cover</code> </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol1"> Specifies temporary skin path to prepend to the skin path for this script only (see <a href="/foswiki/bin/view/TWiki/Skins">Skins</a>) </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol2 foswikiLastCol"> </td> </tr> <tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0"> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <code>t</code> </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol1"> While the <code>t</code> parameter is not actively used by any scripts, it is used throughout the links like <code>edit</code> to ensure that the browser doesn't cache the reply. </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol2 foswikiLastCol"> generally set to current time </td> </tr> <tr class="foswikiTableOdd foswikiTableRowdataBgSorted1 foswikiTableRowdataBg1"> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol0 foswikiFirstCol foswikiLast"> <code>logout</code> </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol1 foswikiLastCol foswikiLast"> requests the <span class="foswikiNewLink">LoginManager<a href="/foswiki/bin/edit/TWiki/LoginManager?topicparent=TWiki.CommandAndCGIScripts" rel="nofollow" title="Create this topic">?</a></span> to log the current user out. (happens at the begining of the request so will terminate any other operation requested) </td> </tr> </tbody></table> <p /> <h3><a name="attach"></a> <code>attach</code> </h3> Despite the name, this script doesn't actually attach a file to a topic - for that, use <code>upload</code>. This script is part of the transactions sequence executed when a file is uploaded from the browser. it just generates the "new attachment" page for a topic. <p /> <table cellspacing="0" id="table2" cellpadding="0" class="foswikiTable" rules="rows" border="1"> <thead> <tr class="foswikiTableOdd foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0"> <th bgcolor="#687684" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <a rel="nofollow" href="/foswiki/bin/view/TWiki/CommandAndCGIScripts?template=edit;sortcol=0;table=2;up=0#sorted_table" title="Sort by this column"><font color="#ffffff">Parameter</font></a> </th> <th bgcolor="#687684" valign="top" class="foswikiTableCol1"> <a rel="nofollow" href="/foswiki/bin/view/TWiki/CommandAndCGIScripts?template=edit;sortcol=1;table=2;up=0#sorted_table" title="Sort by this column"><font color="#ffffff">Description</font></a> </th> <th bgcolor="#687684" valign="top" class="foswikiTableCol2 foswikiLastCol"> <a rel="nofollow" href="/foswiki/bin/view/TWiki/CommandAndCGIScripts?template=edit;sortcol=2;table=2;up=0#sorted_table" title="Sort by this column"><font color="#ffffff">Default</font></a> </th> </tr> </thead> <tbody> <tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0"> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol0 foswikiFirstCol foswikiLast"> <code>filename</code> </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol1 foswikiLast"> Name of existing attachment (if provided, this is a "manage attachment" action) </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol2 foswikiLastCol foswikiLast"> none (in which case this is a "new attachment" action) </td> </tr> </tbody></table> <p /> <p /> <h3><a name="changes"></a> <code>changes</code> </h3> Shows all the changes in the given web. <p /> The <code>changes</code> script can receive one parameter: <p /> <table cellspacing="0" id="table3" cellpadding="0" class="foswikiTable" rules="rows" border="1"> <thead> <tr class="foswikiTableOdd foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0"> <th bgcolor="#687684" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <a rel="nofollow" href="/foswiki/bin/view/TWiki/CommandAndCGIScripts?template=edit;sortcol=0;table=3;up=0#sorted_table" title="Sort by this column"><font color="#ffffff">Parameter</font></a> </th> <th bgcolor="#687684" valign="top" class="foswikiTableCol1"> <a rel="nofollow" href="/foswiki/bin/view/TWiki/CommandAndCGIScripts?template=edit;sortcol=1;table=3;up=0#sorted_table" title="Sort by this column"><font color="#ffffff">Description</font></a> </th> <th bgcolor="#687684" valign="top" class="foswikiTableCol2 foswikiLastCol"> <a rel="nofollow" href="/foswiki/bin/view/TWiki/CommandAndCGIScripts?template=edit;sortcol=2;table=3;up=0#sorted_table" title="Sort by this column"><font color="#ffffff">Default</font></a> </th> </tr> </thead> <tbody> <tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0"> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol0 foswikiFirstCol foswikiLast"> <code>minor</code> </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol1 foswikiLast"> If 0, show only major changes. If 1, show all the changes (both minor and major) </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol2 foswikiLastCol foswikiLast"> 0 </td> </tr> </tbody></table> <p /> The main difference between invoking this script and using <a href="/foswiki/bin/view/TWiki/WebChanges">WebChanges</a> is that <a href="/foswiki/bin/view/TWiki/WebChanges">WebChanges</a> is based on a <code>%SEARCH%</code>, while this script reads the <code>changes</code> file in each web, making it much faster. <p /> <strong>NOTE</strong>: The result from <code>changes</code> script and the topic <a href="/foswiki/bin/view/TWiki/WebChanges">WebChanges</a> can be different, if the <code>changes</code> file is deleted from a web. In particular, in new installations the <code>changes</code> script will return no results while the <a href="/foswiki/bin/view/TWiki/WebChanges">WebChanges</a> topic will. <p /> <h3><a name="configure"></a> <code>configure</code> </h3> <code>configure</code> is the browser script used for inspection of, and changes to, the site configuration. None of the parameters to this script are useable for any purpose except <code>configure</code>. See <a href="/foswiki/bin/configure" target="_top">configure</a>. <p /> <h3><a name="edit"></a> <code>edit</code> </h3> The <code>edit</code> script understands the following parameters, typically supplied by HTML input fields: <p /> <table cellspacing="0" id="table4" cellpadding="0" class="foswikiTable" rules="rows" border="1"> <thead> <tr class="foswikiTableOdd foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0"> <th bgcolor="#687684" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <a rel="nofollow" href="/foswiki/bin/view/TWiki/CommandAndCGIScripts?template=edit;sortcol=0;table=4;up=0#sorted_table" title="Sort by this column"><font color="#ffffff">Parameter</font></a> </th> <th bgcolor="#687684" valign="top" class="foswikiTableCol1"> <a rel="nofollow" href="/foswiki/bin/view/TWiki/CommandAndCGIScripts?template=edit;sortcol=1;table=4;up=0#sorted_table" title="Sort by this column"><font color="#ffffff">Description</font></a> </th> <th bgcolor="#687684" valign="top" class="foswikiTableCol2 foswikiLastCol"> <a rel="nofollow" href="/foswiki/bin/view/TWiki/CommandAndCGIScripts?template=edit;sortcol=2;table=4;up=0#sorted_table" title="Sort by this column"><font color="#ffffff">Default</font></a> </th> </tr> </thead> <tbody> <tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0"> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <code>action</code> </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol1"> Optional. Use the editaction template instead of the standard edit. If action=text, then hide the form. If action=form hide the normal text area and only edit the form. You can change the Edit/Edit Raw buttons to always append the action parameter in skins like Pattern and Classic by setting the topic or <a href="/foswiki/bin/view/TWiki/PreferenceSettings">preference setting</a> <a href="/foswiki/bin/view/TWiki/VarEDITACTION">EDITACTION</a> to the value <code>text</code> or <code>form</code>. To edit the topic once the EDITACTION is defined as form simply remove the action=form from the browser URL of the edit script and reload the edit window </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol2 foswikiLastCol"> </td> </tr> <tr class="foswikiTableOdd foswikiTableRowdataBgSorted1 foswikiTableRowdataBg1"> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <code>onlynewtopic</code> </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol1"> If set, error if topic already exists </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol2 foswikiLastCol"> </td> </tr> <tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0"> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <code>onlywikiname</code> </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol1"> If set, error if topic name is not a <a href="/foswiki/bin/view/TWiki/WikiWord">WikiWord</a> </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol2 foswikiLastCol"> </td> </tr> <tr class="foswikiTableOdd foswikiTableRowdataBgSorted1 foswikiTableRowdataBg1"> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <code>templatetopic</code> </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol1"> The name of the template topic, copied to get the initial content (new topic <em>only</em>) </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol2 foswikiLastCol"> </td> </tr> <tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0"> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <code>text</code> </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol1"> Initial text for the topic </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol2 foswikiLastCol"> </td> </tr> <tr class="foswikiTableOdd foswikiTableRowdataBgSorted1 foswikiTableRowdataBg1"> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <code>topicparent</code> </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol1"> The parent topic </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol2 foswikiLastCol"> </td> </tr> <tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0"> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <code>formtemplate</code> </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol1"> Name of the form to instantiate in the topic. Overrides the form set in the <code>templatetopic</code> if defined. (will remove the form is set to 'none') </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol2 foswikiLastCol"> </td> </tr> <tr class="foswikiTableOdd foswikiTableRowdataBgSorted1 foswikiTableRowdataBg1"> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <code>contenttype</code> </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol1"> Optional parameter that defines the application type to write into the CGI header. Defaults to <code>text/html</code>. May be used to invoke alternative client applications </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol2 foswikiLastCol"> </td> </tr> <tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0"> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <code>anyname</code> </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol1"> Any parameter can passed to the new topic; if the template topic contains <code>%URLPARAM{"anyname"}%</code>, it will be replaced by its value </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol2 foswikiLastCol"> </td> </tr> <tr class="foswikiTableOdd foswikiTableRowdataBgSorted1 foswikiTableRowdataBg1"> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <code>breaklock</code> </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol1"> If set, any lease conflicts will be ignored, and the edit will proceed even if someone is already editing the topic. </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol2 foswikiLastCol"> </td> </tr> <tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0"> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol0 foswikiFirstCol foswikiLast"> <code>redirectto</code> </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol1 foswikiLast"> If the user continues from edit to save, and if the save (or cancels the edit) process is successful, save will redirect to this topic or URL. The parameter value can be a <code>TopicName</code>, a <code>Web.TopicName</code>, or a URL.<br /> <strong>Note:</strong> Redirect to a URL only works if it is enabled in <code>configure</code> (Miscellaneous <code>{AllowRedirectUrl}</code>). </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol2 foswikiLastCol foswikiLast"> </td> </tr> </tbody></table> <p /> Form field values are passed in parameters named 'field' - for example, if I have a field <code>Status</code> the parameter name is <code>Status</code>. <ol> <li> The first sequence of ten or more <code>X</code> characters in the topic name will be converted on save to a number such that the resulting topic name is unique in the target web. </li></ol> <p /> NOTE: most skins support the definition of <code>EDIT_SKIN</code>, which is used as the value of the <code>cover</code> parameter in <code>edit</code> URLs. This allows you to override the default edit skin on a web, topic or user basis. <p /> <h3><a name="login"></a> <code>login</code> </h3> Used for logging in with TemplateLoginManager. <table cellspacing="0" id="table5" cellpadding="0" class="foswikiTable" rules="rows" border="1"> <thead> <tr class="foswikiTableOdd foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0"> <th bgcolor="#687684" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <a rel="nofollow" href="/foswiki/bin/view/TWiki/CommandAndCGIScripts?template=edit;sortcol=0;table=5;up=0#sorted_table" title="Sort by this column"><font color="#ffffff">Parameter</font></a> </th> <th bgcolor="#687684" valign="top" class="foswikiTableCol1"> <a rel="nofollow" href="/foswiki/bin/view/TWiki/CommandAndCGIScripts?template=edit;sortcol=1;table=5;up=0#sorted_table" title="Sort by this column"><font color="#ffffff">Description</font></a> </th> <th bgcolor="#687684" valign="top" class="foswikiTableCol2 foswikiLastCol"> <a rel="nofollow" href="/foswiki/bin/view/TWiki/CommandAndCGIScripts?template=edit;sortcol=2;table=5;up=0#sorted_table" title="Sort by this column"><font color="#ffffff">Default</font></a> </th> </tr> </thead> <tbody> <tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0"> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <code>origurl</code> </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol1"> URL that was being accessed when an access violation occurred. the login process will redirect to this URL if it is successful </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol2 foswikiLastCol"> none </td> </tr> <tr class="foswikiTableOdd foswikiTableRowdataBgSorted1 foswikiTableRowdataBg1"> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <code>username</code> </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol1"> username of user logging in </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol2 foswikiLastCol"> none </td> </tr> <tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0"> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol0 foswikiFirstCol foswikiLast"> <code>password</code> </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol1 foswikiLast"> password of user logging in </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol2 foswikiLastCol foswikiLast"> none </td> </tr> </tbody></table> <p /> <h3><a name="logon"></a> <code>logon</code> </h3> Used for logging in when Web Server authentication is being used (e.g. ApacheLoginManager). The script does nothing; it is purely a placeholder for triggering the login process. The webserver will be set up to require a valid user to access this script, thus triggering the webserver login process. <p /> <h3><a name="manage"></a> <code>manage</code> </h3> Performs a range of management functions. <p /> <strong><img src="/foswiki/pub/System/DocumentGraphics/warning.gif" alt="ALERT!" title="ALERT!" width="16" height="16" border="0" /> Note:</strong> The <code>manage</code> script can only be called via HTTP POST method. Make sure you specify <code>method="post"</code> if you call the <code>manage</code> script via a form action. It is not possible to call <code>manage</code> from an <code><A href</code> link. <p /> <table cellspacing="0" id="table6" cellpadding="0" class="foswikiTable" rules="rows" border="1"> <thead> <tr class="foswikiTableOdd foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0"> <th bgcolor="#687684" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <a rel="nofollow" href="/foswiki/bin/view/TWiki/CommandAndCGIScripts?template=edit;sortcol=0;table=6;up=0#sorted_table" title="Sort by this column"><font color="#ffffff">Parameter</font></a> </th> <th bgcolor="#687684" valign="top" class="foswikiTableCol1"> <a rel="nofollow" href="/foswiki/bin/view/TWiki/CommandAndCGIScripts?template=edit;sortcol=1;table=6;up=0#sorted_table" title="Sort by this column"><font color="#ffffff">Description</font></a> </th> <th bgcolor="#687684" valign="top" class="foswikiTableCol2 foswikiLastCol"> <a rel="nofollow" href="/foswiki/bin/view/TWiki/CommandAndCGIScripts?template=edit;sortcol=2;table=6;up=0#sorted_table" title="Sort by this column"><font color="#ffffff">Default</font></a> </th> </tr> </thead> <tbody> <tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0"> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol0 foswikiFirstCol foswikiLast"> <code>action</code> </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol1 foswikiLast"> One of <code>create</code>, <code>createweb</code>, <code>changePassowrd</code>, <code>resetPassword</code>, <code>bulkRegister</code>, <code>deleteUserAccount</code>, <code>editSettings</code>, <code>saveSettings</code>, <code>restoreRevision</code> </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol2 foswikiLastCol foswikiLast"> none </td> </tr> </tbody></table> <p /> <h4><a name="action_create"></a> <code>action=create</code> </h4> Alternative entry point for creation, via <code>edit</code>, of a new topic, used by screens that support several actions using <code>manage</code>. <table cellspacing="0" id="table7" cellpadding="0" class="foswikiTable" rules="rows" border="1"> <thead> <tr class="foswikiTableOdd foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0"> <th bgcolor="#687684" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <a rel="nofollow" href="/foswiki/bin/view/TWiki/CommandAndCGIScripts?template=edit;sortcol=0;table=7;up=0#sorted_table" title="Sort by this column"><font color="#ffffff">Parameter</font></a> </th> <th bgcolor="#687684" valign="top" class="foswikiTableCol1"> <a rel="nofollow" href="/foswiki/bin/view/TWiki/CommandAndCGIScripts?template=edit;sortcol=1;table=7;up=0#sorted_table" title="Sort by this column"><font color="#ffffff">Description</font></a> </th> <th bgcolor="#687684" valign="top" class="foswikiTableCol2 foswikiLastCol"> <a rel="nofollow" href="/foswiki/bin/view/TWiki/CommandAndCGIScripts?template=edit;sortcol=2;table=7;up=0#sorted_table" title="Sort by this column"><font color="#ffffff">Default</font></a> </th> </tr> </thead> <tbody> <tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0"> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol0 foswikiFirstCol foswikiLast"> <code>topic</code> </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol1 foswikiLast"> Name of topic to create (can be web.topic) </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol2 foswikiLastCol foswikiLast"> none </td> </tr> </tbody></table> Other parameters are the same as for <code>edit</code>. <p /> <h4><a name="action_createweb"></a> <code>action=createweb</code> </h4> Create a new web <table cellspacing="0" id="table8" cellpadding="0" class="foswikiTable" rules="rows" border="1"> <thead> <tr class="foswikiTableOdd foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0"> <th bgcolor="#687684" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <a rel="nofollow" href="/foswiki/bin/view/TWiki/CommandAndCGIScripts?template=edit;sortcol=0;table=8;up=0#sorted_table" title="Sort by this column"><font color="#ffffff">Parameter</font></a> </th> <th bgcolor="#687684" valign="top" class="foswikiTableCol1"> <a rel="nofollow" href="/foswiki/bin/view/TWiki/CommandAndCGIScripts?template=edit;sortcol=1;table=8;up=0#sorted_table" title="Sort by this column"><font color="#ffffff">Description</font></a> </th> <th bgcolor="#687684" valign="top" class="foswikiTableCol2 foswikiLastCol"> <a rel="nofollow" href="/foswiki/bin/view/TWiki/CommandAndCGIScripts?template=edit;sortcol=2;table=8;up=0#sorted_table" title="Sort by this column"><font color="#ffffff">Default</font></a> </th> </tr> </thead> <tbody> <tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0"> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <code>newweb</code> </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol1"> Name of the new web </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol2 foswikiLastCol"> '' </td> </tr> <tr class="foswikiTableOdd foswikiTableRowdataBgSorted1 foswikiTableRowdataBg1"> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <code>baseweb</code> </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol1"> Name of the web to copy to create the new web </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol2 foswikiLastCol"> '' </td> </tr> <tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0"> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <code>webbgcolor</code> </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol1"> value for WEBBGCOLOR </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol2 foswikiLastCol"> '' </td> </tr> <tr class="foswikiTableOdd foswikiTableRowdataBgSorted1 foswikiTableRowdataBg1"> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <code>sitemapwhat</code> </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol1"> Value for SITEMAPWHAT </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol2 foswikiLastCol"> '' </td> </tr> <tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0"> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <code>sitemapuseto</code> </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol1"> Value for SITEMAPUSETO </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol2 foswikiLastCol"> '' </td> </tr> <tr class="foswikiTableOdd foswikiTableRowdataBgSorted1 foswikiTableRowdataBg1"> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <code>nosearchall</code> </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol1"> Value for NOSEARCHALL </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol2 foswikiLastCol"> '' </td> </tr> <tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0"> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol0 foswikiFirstCol foswikiLast"> <code>newtopic</code> </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol1 foswikiLastCol foswikiLast"> Value of %TOPIC% within the web creation message. Optionally used in some skins to signify a non-default home topic. </td> </tr> </tbody></table> <p /> <h4><a name="action_editSettings"></a> <code>action=editSettings</code> </h4> No parameters <p /> <h4><a name="action_saveSettings"></a> <code>action=saveSettings</code> </h4> <table cellspacing="0" id="table9" cellpadding="0" class="foswikiTable" rules="rows" border="1"> <thead> <tr class="foswikiTableOdd foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0"> <th bgcolor="#687684" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <a rel="nofollow" href="/foswiki/bin/view/TWiki/CommandAndCGIScripts?template=edit;sortcol=0;table=9;up=0#sorted_table" title="Sort by this column"><font color="#ffffff">Parameter</font></a> </th> <th bgcolor="#687684" valign="top" class="foswikiTableCol1"> <a rel="nofollow" href="/foswiki/bin/view/TWiki/CommandAndCGIScripts?template=edit;sortcol=1;table=9;up=0#sorted_table" title="Sort by this column"><font color="#ffffff">Description</font></a> </th> <th bgcolor="#687684" valign="top" class="foswikiTableCol2 foswikiLastCol"> <a rel="nofollow" href="/foswiki/bin/view/TWiki/CommandAndCGIScripts?template=edit;sortcol=2;table=9;up=0#sorted_table" title="Sort by this column"><font color="#ffffff">Default</font></a> </th> </tr> </thead> <tbody> <tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0"> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <code>text</code> </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol1"> Text of the topic </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol2 foswikiLastCol"> '' </td> </tr> <tr class="foswikiTableOdd foswikiTableRowdataBgSorted1 foswikiTableRowdataBg1"> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <code>originalrev</code> </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol1"> Revision that the edit started on </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol2 foswikiLastCol"> Most recent revision </td> </tr> <tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0"> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol0 foswikiFirstCol foswikiLast"> <code>redirectto</code> </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol1 foswikiLastCol foswikiLast"> If the savesettings process is successful, save will redirect to this topic or URL. The parameter value can be a <code>TopicName</code>, a <code>Web.TopicName</code>, or a URL.<br /> <strong>Note:</strong> Redirect to a URL only works if it is enabled in <code>configure</code> (Miscellaneous <code>{AllowRedirectUrl}</code>). </td> </tr> </tbody></table> All other parameters may be interpreted as form fields, depending on the current form definition in the topic. <p /> <h4><a name="action_bulkRegister"></a> <code>action=bulkRegister</code> </h4> See <a href="/foswiki/bin/view/TWiki/BulkRegistration">BulkRegistration</a>. <table cellspacing="0" id="table10" cellpadding="0" class="foswikiTable" rules="rows" border="1"> <thead> <tr class="foswikiTableOdd foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0"> <th bgcolor="#687684" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <a rel="nofollow" href="/foswiki/bin/view/TWiki/CommandAndCGIScripts?template=edit;sortcol=0;table=10;up=0#sorted_table" title="Sort by this column"><font color="#ffffff">Parameter</font></a> </th> <th bgcolor="#687684" valign="top" class="foswikiTableCol1"> <a rel="nofollow" href="/foswiki/bin/view/TWiki/CommandAndCGIScripts?template=edit;sortcol=1;table=10;up=0#sorted_table" title="Sort by this column"><font color="#ffffff">Description</font></a> </th> <th bgcolor="#687684" valign="top" class="foswikiTableCol2 foswikiLastCol"> <a rel="nofollow" href="/foswiki/bin/view/TWiki/CommandAndCGIScripts?template=edit;sortcol=2;table=10;up=0#sorted_table" title="Sort by this column"><font color="#ffffff">Default</font></a> </th> </tr> </thead> <tbody> <tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0"> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <code>OverwriteHomeTopics</code> </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol1"> Whether to overwrite existing home topics or not </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol2 foswikiLastCol"> false </td> </tr> <tr class="foswikiTableOdd foswikiTableRowdataBgSorted1 foswikiTableRowdataBg1"> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <code>EmailUsersWithDetails</code> </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol1"> Whether to mail registered users or not </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol2 foswikiLastCol"> false </td> </tr> <tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0"> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol0 foswikiFirstCol foswikiLast"> <code>LogTopic</code> </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol1 foswikiLast"> Topic to save the log in </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol2 foswikiLastCol foswikiLast"> Same as topic name, with 'Result' appended. </td> </tr> </tbody></table> <p /> <h4><a name="action_changePassword"></a> <code>action=changePassword</code> </h4> Change password, email address, or both, of a user. <table cellspacing="0" id="table11" cellpadding="0" class="foswikiTable" rules="rows" border="1"> <thead> <tr class="foswikiTableOdd foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0"> <th bgcolor="#687684" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <a rel="nofollow" href="/foswiki/bin/view/TWiki/CommandAndCGIScripts?template=edit;sortcol=0;table=11;up=0#sorted_table" title="Sort by this column"><font color="#ffffff">Parameter</font></a> </th> <th bgcolor="#687684" valign="top" class="foswikiTableCol1"> <a rel="nofollow" href="/foswiki/bin/view/TWiki/CommandAndCGIScripts?template=edit;sortcol=1;table=11;up=0#sorted_table" title="Sort by this column"><font color="#ffffff">Description</font></a> </th> <th bgcolor="#687684" valign="top" class="foswikiTableCol2 foswikiLastCol"> <a rel="nofollow" href="/foswiki/bin/view/TWiki/CommandAndCGIScripts?template=edit;sortcol=2;table=11;up=0#sorted_table" title="Sort by this column"><font color="#ffffff">Default</font></a> </th> </tr> </thead> <tbody> <tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0"> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <code>username</code> </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol1"> god alone knows </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol2 foswikiLastCol"> <em>none</em> </td> </tr> <tr class="foswikiTableOdd foswikiTableRowdataBgSorted1 foswikiTableRowdataBg1"> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <code>oldpassword</code> </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol1"> current password </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol2 foswikiLastCol"> <em>none</em> </td> </tr> <tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0"> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <code>password</code> </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol1"> new password </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol2 foswikiLastCol"> <em>none</em> </td> </tr> <tr class="foswikiTableOdd foswikiTableRowdataBgSorted1 foswikiTableRowdataBg1"> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <code>passwordA</code> </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol1"> new password confirmation </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol2 foswikiLastCol"> <em>none</em> </td> </tr> <tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0"> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol0 foswikiFirstCol foswikiLast"> <code>email</code> </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol1 foswikiLast"> new email address </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol2 foswikiLastCol foswikiLast"> <em>none</em> </td> </tr> </tbody></table> <code>password, =passwordA</code> and <code>email</code> are optional. If neither or <code>password</code> and <code>passwordA</code> is set, then the user password is left unchanged. If <code>email</code> is unset, their email is left unchanged. <p /> <h4><a name="action_resetPassword"></a> <code>action=resetPassword</code> </h4> Reset the password for a single or multiple users <table cellspacing="0" id="table12" cellpadding="0" class="foswikiTable" rules="rows" border="1"> <thead> <tr class="foswikiTableOdd foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0"> <th bgcolor="#687684" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <a rel="nofollow" href="/foswiki/bin/view/TWiki/CommandAndCGIScripts?template=edit;sortcol=0;table=12;up=0#sorted_table" title="Sort by this column"><font color="#ffffff">Parameter</font></a> </th> <th bgcolor="#687684" valign="top" class="foswikiTableCol1"> <a rel="nofollow" href="/foswiki/bin/view/TWiki/CommandAndCGIScripts?template=edit;sortcol=1;table=12;up=0#sorted_table" title="Sort by this column"><font color="#ffffff">Description</font></a> </th> <th bgcolor="#687684" valign="top" class="foswikiTableCol2 foswikiLastCol"> <a rel="nofollow" href="/foswiki/bin/view/TWiki/CommandAndCGIScripts?template=edit;sortcol=2;table=12;up=0#sorted_table" title="Sort by this column"><font color="#ffffff">Default</font></a> </th> </tr> </thead> <tbody> <tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0"> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <code>LoginName</code> </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol1"> <strong>list</strong> of usernames to reset </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol2 foswikiLastCol"> none - error if not set </td> </tr> <tr class="foswikiTableOdd foswikiTableRowdataBgSorted1 foswikiTableRowdataBg1"> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol0 foswikiFirstCol foswikiLast"> <code>Introduction</code> </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol1 foswikiLast"> message to be sent alongside the reset, most often used to announce to the user that they have been given an account. </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol2 foswikiLastCol foswikiLast"> '' </td> </tr> </tbody></table> <p /> This is used by <a href="/foswiki/bin/view/TWiki/BulkResetPassword">BulkResetPassword</a> and <a href="/foswiki/bin/view/TWiki/ResetPassword">ResetPassword</a>. Only administrators can provide a list of <a href="/foswiki/bin/view/TWiki/LoginName">LoginNames</a>, non-admins can only provide a single <a href="/foswiki/bin/view/TWiki/LoginName">LoginName</a>. <p /> <a href="/foswiki/bin/view/TWiki/BulkRegistration">BulkRegistration</a> provides the means to create multiple accounts but it does not announce those accounts to the users who own them. <a href="/foswiki/bin/view/TWiki/BulkResetPassword">BulkResetPassword</a> is used to assign the passwords, the Introduction is used to explain why they are receiving the mail. <p /> <h4><a name="action_delete_UserAccount"></a> <code>action=deleteUserAccount</code> </h4> Unregisters (removes) the currently logged-in user. <table cellspacing="0" id="table13" cellpadding="0" class="foswikiTable" rules="rows" border="1"> <thead> <tr class="foswikiTableOdd foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0"> <th bgcolor="#687684" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <a rel="nofollow" href="/foswiki/bin/view/TWiki/CommandAndCGIScripts?template=edit;sortcol=0;table=13;up=0#sorted_table" title="Sort by this column"><font color="#ffffff">Parameter</font></a> </th> <th bgcolor="#687684" valign="top" class="foswikiTableCol1"> <a rel="nofollow" href="/foswiki/bin/view/TWiki/CommandAndCGIScripts?template=edit;sortcol=1;table=13;up=0#sorted_table" title="Sort by this column"><font color="#ffffff">Description</font></a> </th> <th bgcolor="#687684" valign="top" class="foswikiTableCol2 foswikiLastCol"> <a rel="nofollow" href="/foswiki/bin/view/TWiki/CommandAndCGIScripts?template=edit;sortcol=2;table=13;up=0#sorted_table" title="Sort by this column"><font color="#ffffff">Default</font></a> </th> </tr> </thead> <tbody> <tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0"> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol0 foswikiFirstCol foswikiLast"> <code>password</code> </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol1 foswikiLast"> Users' password </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol2 foswikiLastCol foswikiLast"> none </td> </tr> </tbody></table> <p /> <h4><a name="action_restoreRevision"></a> <code>action=restoreRevision</code> </h4> Alternative entry point for <code>edit</code>, used by screens that support several actions using <code>manage. Parameters are as for =edit</code>. <p /> <h3><a name="oops"></a> <code>oops</code> </h3> This script is mainly used for rendering pages containing error messages, though it is also used for some functional actions such as manage pages (move topic etc). <p /> <code>oops</code> templates are used with the <code>oops</code> script to generate system messages. This is done to make internationalisation or other local customisations simple. <p /> The <code>oops</code> script supports the following parameters: <p /> <table cellspacing="0" id="table14" cellpadding="0" class="foswikiTable" rules="rows" border="1"> <thead> <tr class="foswikiTableOdd foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0"> <th bgcolor="#687684" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <a rel="nofollow" href="/foswiki/bin/view/TWiki/CommandAndCGIScripts?template=edit;sortcol=0;table=14;up=0#sorted_table" title="Sort by this column"><font color="#ffffff">Parameter</font></a> </th> <th bgcolor="#687684" valign="top" class="foswikiTableCol1"> <a rel="nofollow" href="/foswiki/bin/view/TWiki/CommandAndCGIScripts?template=edit;sortcol=1;table=14;up=0#sorted_table" title="Sort by this column"><font color="#ffffff">Description</font></a> </th> <th bgcolor="#687684" valign="top" class="foswikiTableCol2 foswikiLastCol"> <a rel="nofollow" href="/foswiki/bin/view/TWiki/CommandAndCGIScripts?template=edit;sortcol=2;table=14;up=0#sorted_table" title="Sort by this column"><font color="#ffffff">Default</font></a> </th> </tr> </thead> <tbody> <tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0"> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <code>template</code> </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol1"> Name of the template file to display </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol2 foswikiLastCol"> </td> </tr> <tr class="foswikiTableOdd foswikiTableRowdataBgSorted1 foswikiTableRowdataBg1"> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <code>def</code> </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol1"> Optional, can be set to the name of a single definition within <code>template</code>. This definition will be instantiated in the <code>template</code> wherever <code>%INSTANTIATE%</code> is seen. This lets you use a single template file for many messages. For an example, see <code>oopsmanagebad.tmpl</code>. </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol2 foswikiLastCol"> </td> </tr> <tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0"> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol0 foswikiFirstCol foswikiLast"> <code>paramN</code> </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol1 foswikiLast"> Where N is an integer from 1 upwards. These values will be substituted into <code>template</code> for <code>%PARAM1%</code> etc. </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol2 foswikiLastCol foswikiLast"> </td> </tr> </tbody></table> <p /> <h3><a name="preview"></a> <code>preview</code> </h3> This script is <em>deprecated</em>. Its functions are covered by the <code>save</code> script. <p /> <h3><a name="rdiff"></a> <code>rdiff</code> </h3> Renders the differences between version of a topic <p /> <table cellspacing="0" id="table15" cellpadding="0" class="foswikiTable" rules="rows" border="1"> <thead> <tr class="foswikiTableOdd foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0"> <th bgcolor="#687684" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <a rel="nofollow" href="/foswiki/bin/view/TWiki/CommandAndCGIScripts?template=edit;sortcol=0;table=15;up=0#sorted_table" title="Sort by this column"><font color="#ffffff">Parameter</font></a> </th> <th bgcolor="#687684" valign="top" class="foswikiTableCol1"> <a rel="nofollow" href="/foswiki/bin/view/TWiki/CommandAndCGIScripts?template=edit;sortcol=1;table=15;up=0#sorted_table" title="Sort by this column"><font color="#ffffff">Description</font></a> </th> <th bgcolor="#687684" valign="top" class="foswikiTableCol2 foswikiLastCol"> <a rel="nofollow" href="/foswiki/bin/view/TWiki/CommandAndCGIScripts?template=edit;sortcol=2;table=15;up=0#sorted_table" title="Sort by this column"><font color="#ffffff">Default</font></a> </th> </tr> </thead> <tbody> <tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0"> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol0 foswikiFirstCol"> rev1 </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol1"> the higher revision </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol2 foswikiLastCol"> </td> </tr> <tr class="foswikiTableOdd foswikiTableRowdataBgSorted1 foswikiTableRowdataBg1"> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol0 foswikiFirstCol"> rev2 </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol1"> the lower revision </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol2 foswikiLastCol"> </td> </tr> <tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0"> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol0 foswikiFirstCol"> render </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol1"> the rendering style {sequential, sidebyside, raw, debug} </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol2 foswikiLastCol"> DIFFRENDERSTYLE, <code>sequential</code> </td> </tr> <tr class="foswikiTableOdd foswikiTableRowdataBgSorted1 foswikiTableRowdataBg1"> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol0 foswikiFirstCol"> type </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol1"> {history, diff, last} history diff, version to version, last version to previous </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol2 foswikiLastCol"> <code>diff</code> </td> </tr> <tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0"> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol0 foswikiFirstCol foswikiLast"> context </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol1 foswikiLast"> number of lines of context </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol2 foswikiLastCol foswikiLast"> </td> </tr> </tbody></table> TODO: <ul> <li> add a {word} render style </li></ul> <p /> <h3><a name="register"></a> <code>register</code> </h3> <p /> <table cellspacing="0" id="table16" cellpadding="0" class="foswikiTable" rules="rows" border="1"> <thead> <tr class="foswikiTableOdd foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0"> <th bgcolor="#687684" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <a rel="nofollow" href="/foswiki/bin/view/TWiki/CommandAndCGIScripts?template=edit;sortcol=0;table=16;up=0#sorted_table" title="Sort by this column"><font color="#ffffff">Parameter</font></a> </th> <th bgcolor="#687684" valign="top" class="foswikiTableCol1"> <a rel="nofollow" href="/foswiki/bin/view/TWiki/CommandAndCGIScripts?template=edit;sortcol=1;table=16;up=0#sorted_table" title="Sort by this column"><font color="#ffffff">Description</font></a> </th> <th bgcolor="#687684" valign="top" class="foswikiTableCol2 foswikiLastCol"> <a rel="nofollow" href="/foswiki/bin/view/TWiki/CommandAndCGIScripts?template=edit;sortcol=2;table=16;up=0#sorted_table" title="Sort by this column"><font color="#ffffff">Default</font></a> </th> </tr> </thead> <tbody> <tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0"> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol0 foswikiFirstCol foswikiLast"> <code>action</code> </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol1 foswikiLast"> <code>register</code> or <code>verify</code> or <code>resetPassword</code> or <code>approve</code> </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol2 foswikiLastCol foswikiLast"> </td> </tr> </tbody></table> <p /> <strong><img src="/foswiki/pub/System/DocumentGraphics/warning.gif" alt="ALERT!" title="ALERT!" width="16" height="16" border="0" /> Note:</strong> The <code>register</code> script can only be called via the HTTP POST method except when the action is <code>verify</code>. Make sure you specify <code>method="post"</code> if you call the <code>register</code> script via a form action. It is not possible to call <code>register</code> from an <code><A href</code> link. The <code>verify</code> action is an exception as it is used to verify registration by clicking a href link from an email. <p /> <h3><a name="rename"></a> <code>rename</code> </h3> Used for renaming webs, topics and attachments. <p /> <table cellspacing="0" id="table17" cellpadding="0" class="foswikiTable" rules="rows" border="1"> <thead> <tr class="foswikiTableOdd foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0"> <th bgcolor="#687684" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <a rel="nofollow" href="/foswiki/bin/view/TWiki/CommandAndCGIScripts?template=edit;sortcol=0;table=17;up=0#sorted_table" title="Sort by this column"><font color="#ffffff">Parameter</font></a> </th> <th bgcolor="#687684" valign="top" class="foswikiTableCol1"> <a rel="nofollow" href="/foswiki/bin/view/TWiki/CommandAndCGIScripts?template=edit;sortcol=1;table=17;up=0#sorted_table" title="Sort by this column"><font color="#ffffff">Description</font></a> </th> <th bgcolor="#687684" valign="top" class="foswikiTableCol2 foswikiLastCol"> <a rel="nofollow" href="/foswiki/bin/view/TWiki/CommandAndCGIScripts?template=edit;sortcol=2;table=17;up=0#sorted_table" title="Sort by this column"><font color="#ffffff">Default</font></a> </th> </tr> </thead> <tbody> <tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0"> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <code>action</code> </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol1"> <code>renameweb</code> or anything else </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol2 foswikiLastCol"> </td> </tr> <tr class="foswikiTableOdd foswikiTableRowdataBgSorted1 foswikiTableRowdataBg1"> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <code>skin</code> </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol1"> skin(s) to use </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol2 foswikiLastCol"> </td> </tr> <tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0"> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <code>confirm</code> </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol1"> if defined, requires a second level of confirmation </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol2 foswikiLastCol"> </td> </tr> <tr class="foswikiTableOdd foswikiTableRowdataBgSorted1 foswikiTableRowdataBg1"> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <code>referring_topics</code> </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol1"> (internal use only) list of topics that refer to the web or topic being renamed </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol2 foswikiLastCol"> </td> </tr> <tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0"> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol0 foswikiFirstCol foswikiLast"> <code>redirectto</code> </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol1 foswikiLast"> If the rename process is successful, rename will redirect to this topic or URL. The parameter value can be a <code>TopicName</code>, a <code>Web.TopicName</code>, or a URL.<br /> <strong>Note:</strong> Redirect to a URL only works if it is enabled in <code>configure</code> (Miscellaneous <code>{AllowRedirectUrl}</code>). </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol2 foswikiLastCol foswikiLast"> </td> </tr> </tbody></table> <p /> <h4><a name="action_renameweb"></a> <code>action="renameweb"</code> </h4> Rename a web. <table cellspacing="0" id="table18" cellpadding="0" class="foswikiTable" rules="rows" border="1"> <thead> <tr class="foswikiTableOdd foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0"> <th bgcolor="#687684" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <a rel="nofollow" href="/foswiki/bin/view/TWiki/CommandAndCGIScripts?template=edit;sortcol=0;table=18;up=0#sorted_table" title="Sort by this column"><font color="#ffffff">Parameter</font></a> </th> <th bgcolor="#687684" valign="top" class="foswikiTableCol1"> <a rel="nofollow" href="/foswiki/bin/view/TWiki/CommandAndCGIScripts?template=edit;sortcol=1;table=18;up=0#sorted_table" title="Sort by this column"><font color="#ffffff">Description</font></a> </th> <th bgcolor="#687684" valign="top" class="foswikiTableCol2 foswikiLastCol"> <a rel="nofollow" href="/foswiki/bin/view/TWiki/CommandAndCGIScripts?template=edit;sortcol=2;table=18;up=0#sorted_table" title="Sort by this column"><font color="#ffffff">Default</font></a> </th> </tr> </thead> <tbody> <tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0"> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <code>newparentweb</code> </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol1"> new parent web name </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol2 foswikiLastCol"> existing parent </td> </tr> <tr class="foswikiTableOdd foswikiTableRowdataBgSorted1 foswikiTableRowdataBg1"> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol0 foswikiFirstCol foswikiLast"> <code>newsubweb</code> </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol1 foswikiLast"> new web name </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol2 foswikiLastCol foswikiLast"> </td> </tr> </tbody></table> <p /> <h4><a name="action_anything_else"></a> <code>action=<i>anything else</i></code> </h4> Rename a topic or an attachment. <table cellspacing="0" id="table19" cellpadding="0" class="foswikiTable" rules="rows" border="1"> <thead> <tr class="foswikiTableOdd foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0"> <th bgcolor="#687684" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <a rel="nofollow" href="/foswiki/bin/view/TWiki/CommandAndCGIScripts?template=edit;sortcol=0;table=19;up=0#sorted_table" title="Sort by this column"><font color="#ffffff">Parameter</font></a> </th> <th bgcolor="#687684" valign="top" class="foswikiTableCol1"> <a rel="nofollow" href="/foswiki/bin/view/TWiki/CommandAndCGIScripts?template=edit;sortcol=1;table=19;up=0#sorted_table" title="Sort by this column"><font color="#ffffff">Description</font></a> </th> <th bgcolor="#687684" valign="top" class="foswikiTableCol2 foswikiLastCol"> <a rel="nofollow" href="/foswiki/bin/view/TWiki/CommandAndCGIScripts?template=edit;sortcol=2;table=19;up=0#sorted_table" title="Sort by this column"><font color="#ffffff">Default</font></a> </th> </tr> </thead> <tbody> <tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0"> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <code>newweb</code> </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol1"> new web name </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol2 foswikiLastCol"> </td> </tr> <tr class="foswikiTableOdd foswikiTableRowdataBgSorted1 foswikiTableRowdataBg1"> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <code>newtopic</code> </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol1"> new topic name </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol2 foswikiLastCol"> </td> </tr> <tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0"> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <code>attachment</code> </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol1"> Attachment to move </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol2 foswikiLastCol"> <code>none</code> </td> </tr> <tr class="foswikiTableOdd foswikiTableRowdataBgSorted1 foswikiTableRowdataBg1"> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <code>template</code> </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol1"> template for error when an attachment doesn't exist, <code>deleteattachment</code> for when deleting an attachment </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol2 foswikiLastCol"> </td> </tr> <tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0"> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <code>currentwebonly</code> </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol1"> if defined, searches current web only for links to this topic </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol2 foswikiLastCol"> </td> </tr> <tr class="foswikiTableOdd foswikiTableRowdataBgSorted1 foswikiTableRowdataBg1"> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol0 foswikiFirstCol foswikiLast"> <code>nonwikiword</code> </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol1 foswikiLast"> if defined, a non-wikiword is acceptable for the new topic name </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol2 foswikiLastCol foswikiLast"> </td> </tr> </tbody></table> <p /> <strong><img src="/foswiki/pub/System/DocumentGraphics/warning.gif" alt="ALERT!" title="ALERT!" width="16" height="16" border="0" /> Note:</strong> The <code>rename</code> script can only be called via the HTTP POST method. Make sure you specify <code>method="post"</code> if you call the <code>rename</code> script via a form action. It is not possible to call <code>rename</code> from an <code><A href</code> link. <p /> <h3><a name="rest"></a> <code>rest</code> </h3> This REST (<a href="http://en.wikipedia.org/wiki/REST" target="_top">Representational State Transfer</a>) script can be invoked via http in the same way as the other scripts (see <strong>Invocation Examples</strong>, below) to execute a function that is associated to a "subject" and a "verb" (see below). These functions are usually registered by plugins using the <code>Foswiki::Func::registerRESTHandler</code> method. The <code>rest</code> script will print the result directly to the browser unless the <code>endPoint</code> parameter is specified, in which case it will output a redirect to the given topic. <p /> The <code>rest</code> script supports the following parameters: <table cellspacing="0" id="table20" cellpadding="0" class="foswikiTable" rules="rows" border="1"> <tbody> <tr class="foswikiTableOdd foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0"> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <code>username</code> </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol1 foswikiLastCol"> If <code>TemplateLogin</code>, or a similar login manager not embedded in the web server, is used, then you need to pass a username and password to the server. The <code>username</code> and <code>password</code> parameters are used for this purpose. </td> </tr> <tr class="foswikiTableEven foswikiTableRowdataBgSorted1 foswikiTableRowdataBg1"> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <code>password</code> </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol1 foswikiLastCol"> See <code>username</code> </td> </tr> <tr class="foswikiTableOdd foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0"> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <code>topic</code> </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol1 foswikiLastCol"> If defined as the full name (including web) of a topic, then when the script starts up plugins will be passed this as the "current" topic. If not defined, then <a href="/foswiki/bin/view/Main/WebHome">Main.WebHome</a> will be passed to plugins. </td> </tr> <tr class="foswikiTableEven foswikiTableRowdataBgSorted1 foswikiTableRowdataBg1"> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol0 foswikiFirstCol foswikiLast"> <code>endPoint</code> </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol1 foswikiLastCol foswikiLast"> Where to redirect the response once the request is served, in the form "Web.Topic" </td> </tr> </tbody></table> <p /> The function is free to use any other query parameters for its own purposes. <p /> <img src="/foswiki/pub/System/DocumentGraphics/warning.gif" alt="ALERT!" title="ALERT!" width="16" height="16" border="0" /> The <code>rest</code> script should <strong>always</strong> require authentication in any site that has logins. Otherwise there is a risk of opening up major security holes. So make sure you add it to the list of authenticated scripts if you are using <code>ApacheLogin</code>. <p /> <h4><a name="Invocation_Examples"></a> Invocation Examples </h4> <p /> The <code>rest</code> script assumes that it will be called with URL in the form: <p /> <code>http://my.host/bin/rest/<subject>/<verb></code> <p /> where <code><subject></code> must be the <a href="/foswiki/bin/view/TWiki/WikiWord">WikiWord</a> name of one of the installed <a href="/foswiki/bin/view/TWiki/Plugins">Plugins</a>, and the <code><verb></code> is the alias for the function registered using the <code>Foswiki::Func::registerRESTHandler</code> method. The <code><subject></code> and <code><verb></code> are then used to lookup and call the registered function. <p /> <code><subject></code> and <code><verb></code> are checked for illegal characters exactly in the same way as the web and topic names. <p /> As an example, the <a href="/foswiki/bin/view/TWiki/EmptyPlugin">EmptyPlugin</a> has registered a function to be used with the <code>rest</code> script under the subject <strong>EmptyPlugin</strong> and the verb <strong>example</strong>. Click below to see the <code>rest</code> script in action (run as guest). <p /> <a href="http://stalklubben.org/foswiki/bin/rest/EmptyPlugin/example?debugenableplugin=EmptyPlugin" target="_top">Call the Plugin</a> <p /> Note that for Plugins to register REST handlers, they must be enabled in <code>configure</code>. <p /> <h4><a name="Retrieving_passed_values"></a> Retrieving passed values </h4> Additional parameters can be recovered via the query object in the <code>$session</code>, for example with the url: <pre> http://my.host/bin/rest/MyPlugin/update?web=foo </pre> <p /> The url parameters can be processed using: <pre> my $query = $session->{request}; my $web = $query->{param}->{web}[0]; </pre> <p /> <h3><a name="save"></a> <code>save</code> </h3> The <code>save</code> script performs a range of save-related functions, as selected by the <code>action</code> parameter. <p /> <table cellspacing="0" id="table21" cellpadding="0" class="foswikiTable" rules="rows" border="1"> <thead> <tr class="foswikiTableOdd foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0"> <th bgcolor="#687684" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <a rel="nofollow" href="/foswiki/bin/view/TWiki/CommandAndCGIScripts?template=edit;sortcol=0;table=21;up=0#sorted_table" title="Sort by this column"><font color="#ffffff">Parameter</font></a> </th> <th bgcolor="#687684" valign="top" class="foswikiTableCol1"> <a rel="nofollow" href="/foswiki/bin/view/TWiki/CommandAndCGIScripts?template=edit;sortcol=1;table=21;up=0#sorted_table" title="Sort by this column"><font color="#ffffff">Description</font></a> </th> <th bgcolor="#687684" valign="top" class="foswikiTableCol2 foswikiLastCol"> <a rel="nofollow" href="/foswiki/bin/view/TWiki/CommandAndCGIScripts?template=edit;sortcol=2;table=21;up=0#sorted_table" title="Sort by this column"><font color="#ffffff">Default</font></a> </th> </tr> </thead> <tbody> <tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0"> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <code>action_save=1</code> </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol1"> <strong>default</strong>; save, return to view, dontnotify is <code>off</code> </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol2 foswikiLastCol"> </td> </tr> <tr class="foswikiTableOdd foswikiTableRowdataBgSorted1 foswikiTableRowdataBg1"> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <code>action_quietsave=1</code> </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol1"> save, and return to view, <code>dontnotify</code> is <code>on</code> </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol2 foswikiLastCol"> </td> </tr> <tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0"> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <code>action_checkpoint</code> </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol1"> save and redirect to the edit script, <code>dontnotify</code> is <code>on</code> </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol2 foswikiLastCol"> </td> </tr> <tr class="foswikiTableOdd foswikiTableRowdataBgSorted1 foswikiTableRowdataBg1"> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <code>action_cancel</code> </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol1"> exit without save, return to view </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol2 foswikiLastCol"> </td> </tr> <tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0"> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <code>action_preview</code> </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol1"> preview edited text </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol2 foswikiLastCol"> </td> </tr> <tr class="foswikiTableOdd foswikiTableRowdataBgSorted1 foswikiTableRowdataBg1"> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <code>action_addform</code> </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol1"> Redirect to the "change form" page. </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol2 foswikiLastCol"> </td> </tr> <tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0"> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <code>action_replaceform...</code> </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol1"> Redirect to the "change form" page. </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol2 foswikiLastCol"> </td> </tr> <tr class="foswikiTableOdd foswikiTableRowdataBgSorted1 foswikiTableRowdataBg1"> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <code>action_delRev</code> </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol1"> <strong>Administrators only</strong> delete the most recent revision of the topic - all other parameters are ignored. You have to be an administrator to use this, and not all store implementations will support it. </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol2 foswikiLastCol"> </td> </tr> <tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0"> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <code>action_repRev</code> </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol1"> <strong>Administrators only</strong> replace the text of the most recent revision of the topic with the text in the <code>text</code> parameter. <code>text</code> must included embedded meta-data tags. All other parameters are ignored. You have to be an administrator to use this, and not all store implementations will support it. </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol2 foswikiLastCol"> </td> </tr> <tr class="foswikiTableOdd foswikiTableRowdataBgSorted1 foswikiTableRowdataBg1"> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <code>onlynewtopic</code> </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol1"> If set, error if topic already exists </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol2 foswikiLastCol"> </td> </tr> <tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0"> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <code>onlywikiname</code> </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol1"> If set, error if topic name is not a <a href="/foswiki/bin/view/TWiki/WikiWord">WikiWord</a> </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol2 foswikiLastCol"> </td> </tr> <tr class="foswikiTableOdd foswikiTableRowdataBgSorted1 foswikiTableRowdataBg1"> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <code>dontnotify</code> </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol1"> if defined, suppress change notification </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol2 foswikiLastCol"> </td> </tr> <tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0"> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <code>templatetopic</code> </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol1"> Name of a topic to use as a template for the text and form (new topic <em>only</em>) </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol2 foswikiLastCol"> </td> </tr> <tr class="foswikiTableOdd foswikiTableRowdataBgSorted1 foswikiTableRowdataBg1"> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <code>text</code> </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol1"> New text of the topic </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol2 foswikiLastCol"> </td> </tr> <tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0"> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <code>forcenewrevision</code> </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol1"> if set, forces a revision even if STALklubben thinks one isn't needed </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol2 foswikiLastCol"> </td> </tr> <tr class="foswikiTableOdd foswikiTableRowdataBgSorted1 foswikiTableRowdataBg1"> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <code>topicparent</code> </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol1"> If 'none' remove any current topic parent. If the name of a topic, set the topic parent to this. </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol2 foswikiLastCol"> </td> </tr> <tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0"> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <code>formtemplate</code> </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol1"> if defined, use the named template for the form (will remove the form is set to 'none') </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol2 foswikiLastCol"> </td> </tr> <tr class="foswikiTableOdd foswikiTableRowdataBgSorted1 foswikiTableRowdataBg1"> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <code>editaction</code> </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol1"> When action is <code>checkpoint</code>, <code>add form</code> or <code>replace form...</code>, this is used as the <code>action</code> parameter to the <code>edit</code> script that is redirected to after the save is complete. </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol2 foswikiLastCol"> </td> </tr> <tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0"> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <code>originalrev</code> </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol1"> Revision on which the edit started. </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol2 foswikiLastCol"> </td> </tr> <tr class="foswikiTableOdd foswikiTableRowdataBgSorted1 foswikiTableRowdataBg1"> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <code>edit</code> </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol1"> The script to use to edit the topic when action is <code>checkpoint</code> </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol2 foswikiLastCol"> <code>edit</code> </td> </tr> <tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0"> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <code>editparams</code> </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol1"> The parameter string to use to edit the topic </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol2 foswikiLastCol"> </td> </tr> <tr class="foswikiTableOdd foswikiTableRowdataBgSorted1 foswikiTableRowdataBg1"> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol0 foswikiFirstCol foswikiLast"> <code>redirectto</code> </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol1 foswikiLast"> The save process will redirect to this topic or URL if it is successful. (Typically this would be the URL that was being viewed when edit was invoked). The parameter value can be a <code>TopicName</code>, a <code>Web.TopicName</code>, or a URL.<br /> <strong>Note:</strong> Redirect to a URL only works if it is enabled in <code>configure</code> (Miscellaneous <code>{AllowRedirectUrl}</code>). </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol2 foswikiLastCol foswikiLast"> view topic being edited </td> </tr> </tbody></table> <p /> Any errors will cause a redirect to an <code>oops</code> page. <p /> The parameters are interpreted in according to the following rules. <p /> <ol> <li> The first sequence of ten or more <code>X</code> characters in the topic name will be converted to a number such that the resulting topic name is unique in the target web. </li> <li> When the action is <code>save</code>, <code>checkpoint</code>, <code>quietsave</code>, or <code>preview</code>: <ol> <li> The new text is taken from the <code>text</code> parameter, if it is defined, <ul> <li> otherwise it is taken from the <code>templatetopic</code>, if it is defined, (new topic <em>only</em>) </li> <li> otherwise it is taken from the previous version of the topic, if any, </li></ul> </li> <li> The name of the new form is taken from the <code>formtemplate</code>, if defined <ul> <li> otherwise it is taken from the <code>templatetopic</code>, if defined, (new topic <em>only</em>) </li> <li> otherwise it is taken from the previous version of the topic, if any, </li> <li> otherwise no form is attached. </li></ul> </li> <li> The value for each field in the form is taken from the query, if it is defined <ul> <li> otherwise it is taken from the <code>templatetopic</code>, if defined, (new topic <em>only</em>) </li> <li> otherwise it is taken from the previous version of the topic, if any, </li> <li> otherwise it defaults to the empty string. </li></ul> </li></ol> </li></ol> <p /> Merging is only enabled if the topic text comes from <code>text</code> and <code>originalrev</code> is > 0 and is not the same as the revision number of the most recent revision. If merging is enabled both the topic and the meta-data are merged. <p /> Form field values are passed in parameters named 'field' - for example, if I have a field <code>Status</code> the parameter name is <code>Status</code>. <p /> <strong><img src="/foswiki/pub/System/DocumentGraphics/warning.gif" alt="ALERT!" title="ALERT!" width="16" height="16" border="0" /> Note:</strong> The <code>save</code> script can only be called via HTTP POST method. Make sure you specify <code>method="post"</code> if you call the <code>save</code> script via a form action. Example: <pre> <form name="new" action="%SCRIPTURLPATH{save}%/Sandbox/" method="post"> ... </form> </pre> It is not possible to call <code>save</code> from an <code><A href</code> link. <p /> <h3><a name="search"></a> <code>search</code> </h3> CGI gateway to the <code>%SEARCH%</code> functionality driven by the following CGI parameters: <p /> <table cellspacing="0" id="table22" cellpadding="0" class="foswikiTable" rules="rows" border="1"> <thead> <tr class="foswikiTableOdd foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0"> <th bgcolor="#687684" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <a rel="nofollow" href="/foswiki/bin/view/TWiki/CommandAndCGIScripts?template=edit;sortcol=0;table=22;up=0#sorted_table" title="Sort by this column"><font color="#ffffff">Parameter:</font></a> </th> <th bgcolor="#687684" valign="top" class="foswikiTableCol1"> <a rel="nofollow" href="/foswiki/bin/view/TWiki/CommandAndCGIScripts?template=edit;sortcol=1;table=22;up=0#sorted_table" title="Sort by this column"><font color="#ffffff">Description:</font></a> </th> <th bgcolor="#687684" valign="top" class="foswikiTableCol2 foswikiLastCol"> <a rel="nofollow" href="/foswiki/bin/view/TWiki/CommandAndCGIScripts?template=edit;sortcol=2;table=22;up=0#sorted_table" title="Sort by this column"><font color="#ffffff">Default:</font></a> </th> </tr> </thead> <tbody> <tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0"> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <code>"text"</code> </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol1"> Search term. Is a keyword search, literal search or regular expression search, depending on the <code>type</code> parameter. <a href="/foswiki/bin/view/TWiki/SearchHelp">SearchHelp</a> has more </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol2 foswikiLastCol"> required </td> </tr> <tr class="foswikiTableOdd foswikiTableRowdataBgSorted1 foswikiTableRowdataBg1"> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <code>search="text"</code> </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol1"> (Alternative to above) </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol2 foswikiLastCol"> N/A </td> </tr> <tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0"> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <code>web="Name"</code> <br /> <code>web="Main, Know"</code> <br /> <code>web="all"</code> </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol1"> Comma-separated list of webs to search. See <a href="/foswiki/bin/view/System/Macros#VarSEARCH">Macros#VarSEARCH</a> for more details. </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol2 foswikiLastCol"> Current web </td> </tr> <tr class="foswikiTableOdd foswikiTableRowdataBgSorted1 foswikiTableRowdataBg1"> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <code>topic="WebPreferences"</code> <br /> <code>topic="*Bug"</code> </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol1"> Limit search to topics: A topic, a topic with asterisk wildcards, or a list of topics separated by comma. </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol2 foswikiLastCol"> All topics in a web </td> </tr> <tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0"> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <code>excludetopic="Web*"</code> <br /> <code>excludetopic="WebHome, WebChanges"</code> </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol1"> Exclude topics from search: A topic, a topic with asterisk wildcards, or a list of topics separated by comma. </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol2 foswikiLastCol"> None </td> </tr> <tr class="foswikiTableOdd foswikiTableRowdataBgSorted1 foswikiTableRowdataBg1"> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <code>type="keyword"</code> <br /> <code>type="literal"</code> <br /> <code>type="regex"</code> </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol1"> Do a keyword search like <code>soap "web service" -shampoo</code>; a literal search like <code>web service</code>; or <a href="/foswiki/bin/view/TWiki/RegularExpression">RegularExpression</a> search like <code>soap;web service;!shampoo</code> </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol2 foswikiLastCol"> <code>%SEARCHVAR- DEFAULTTYPE%</code> <a href="/foswiki/bin/view/TWiki/DefaultPreferences">preferences</a> setting (literal) </td> </tr> <tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0"> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <code>scope="topic"</code> <br /> <code>scope="text"</code> <br /> <code>scope="all"</code> </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol1"> Search topic name (title); the text (body) of topic; or all (both) </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol2 foswikiLastCol"> <code>"text"</code> </td> </tr> <tr class="foswikiTableOdd foswikiTableRowdataBgSorted1 foswikiTableRowdataBg1"> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <code>order="topic"</code> <br /> <code>order="created"</code> <br /> <code>order="modified"</code> <br /> <code>order="editby"</code> <br /> <code>order=<br /> "formfield(name)"</code> </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol1"> Sort the results of search by the topic names, topic creation time, last modified time, last editor, or named field of <a href="/foswiki/bin/view/TWiki/DataForms">DataForms</a>. The sorting is done web by web; in case you want to sort across webs, create a <a href="/foswiki/bin/view/TWiki/FormattedSearch">formatted</a> table and sort it with <a href="/foswiki/bin/view/TWiki/TablePlugin">TablePlugin</a>'s initsort </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol2 foswikiLastCol"> Sort by topic name </td> </tr> <tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0"> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <code>limit="all"</code> <br /> <code>limit="16"</code> </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol1"> Limit the number of results returned. This is done after sorting if <code>order</code> is specified </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol2 foswikiLastCol"> All results </td> </tr> <tr class="foswikiTableOdd foswikiTableRowdataBgSorted1 foswikiTableRowdataBg1"> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <code>date="..."</code> </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol1"> limits the results to those pages with latest edit time in the given <a href="/foswiki/bin/view/TWiki/TimeSpecifications#TimeIntervals">time interval</a>. </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol2 foswikiLastCol"> All results </td> </tr> <tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0"> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <code>reverse="on"</code> </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol1"> Reverse the direction of the search </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol2 foswikiLastCol"> Ascending search </td> </tr> <tr class="foswikiTableOdd foswikiTableRowdataBgSorted1 foswikiTableRowdataBg1"> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <code>casesensitive="on"</code> </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol1"> Case sensitive search </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol2 foswikiLastCol"> Ignore case </td> </tr> <tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0"> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <code>bookview="on"</code> </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol1"> <a href="/foswiki/bin/view/TWiki/BookView">BookView</a> search, e.g. show complete topic text. Very resource demanding. Use only with small result sets </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol2 foswikiLastCol"> Show entire topic content of found topics </td> </tr> <tr class="foswikiTableOdd foswikiTableRowdataBgSorted1 foswikiTableRowdataBg1"> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <code>nonoise="on"</code> </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol1"> Shorthand for <code>nosummary="on" nosearch="on" nototal="on" zeroresults="off" noheader="on" noempty="on"</code> </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol2 foswikiLastCol"> Off </td> </tr> <tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0"> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <code>nosummary="on"</code> </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol1"> Show topic title only </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol2 foswikiLastCol"> Show topic summary </td> </tr> <tr class="foswikiTableOdd foswikiTableRowdataBgSorted1 foswikiTableRowdataBg1"> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <code>nosearch="on"</code> </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol1"> Suppress search string </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol2 foswikiLastCol"> Show search string </td> </tr> <tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0"> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <code>noheader="on"</code> </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol1"> Suppress search header <br /> <span style='background: #FFB0B0;'> <strong>Topics: Changed: By:</strong> </span> </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol2 foswikiLastCol"> Show search header </td> </tr> <tr class="foswikiTableOdd foswikiTableRowdataBgSorted1 foswikiTableRowdataBg1"> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <code>nototal="on"</code> </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol1"> Do not show number of topics found </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol2 foswikiLastCol"> Show number </td> </tr> <tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0"> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <code>zeroresults="off"</code> </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol1"> Suppress all output if there are no hits </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol2 foswikiLastCol"> <code>zeroresults="on"</code>, displays: "Number of topics: 0" </td> </tr> <tr class="foswikiTableOdd foswikiTableRowdataBgSorted1 foswikiTableRowdataBg1"> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <code>noempty="on"</code> </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol1"> Suppress results for webs that have no hits. </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol2 foswikiLastCol"> Show webs with no hits </td> </tr> <tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0"> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <code>header="..."</code> <br /> <code>format="..."</code> </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol1"> Custom format results: see <strong><a href="/foswiki/bin/view/TWiki/FormattedSearch">FormattedSearch</a></strong> for usage & examples </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol2 foswikiLastCol"> Results in table </td> </tr> <tr class="foswikiTableOdd foswikiTableRowdataBgSorted1 foswikiTableRowdataBg1"> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <code>expandvariables="on"</code> </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol1"> Expand embedded macros before applying a <a href="/foswiki/bin/view/TWiki/FormattedSearch">FormattedSearch</a> on a search hit. Useful to show the expanded text, e.g. to show the result of a <a href="/foswiki/bin/view/TWiki/SpreadSheetPlugin">SpreadSheetPlugin</a> <code>%CALC{}%</code> instead of the formula </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol2 foswikiLastCol"> Raw text </td> </tr> <tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0"> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <code>multiple="on"</code> </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol1"> Multiple hits per topic. Each hit can be <a href="/foswiki/bin/view/TWiki/FormattedSearch">formatted</a>. The last token is used in case of a regular expression ";" <em>and</em> search </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol2 foswikiLastCol"> Only one hit per topic </td> </tr> <tr class="foswikiTableOdd foswikiTableRowdataBgSorted1 foswikiTableRowdataBg1"> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <code>nofinalnewline="on"</code> </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol1"> If <code>on</code>, the result of the macro does not end in a line by itself. Any text continuing immediately after the search macro on the same line will be rendered as part of the table generated by the search, if appropriate. </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol2 foswikiLastCol"> <code>off</code> </td> </tr> <tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0"> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol0 foswikiFirstCol foswikiLast"> <code>separator=", "</code> </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol1 foswikiLast"> Line separator between hits </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol2 foswikiLastCol foswikiLast"> Newline <code>"$n"</code> </td> </tr> </tbody></table> <p /> <h3><a name="statistics"></a> <code>statistics</code> </h3> Refresh the <a href="/foswiki/bin/view/TWiki/WebStatistics">WebStatistics</a> topics in range of webs. <table cellspacing="0" id="table23" cellpadding="0" class="foswikiTable" rules="rows" border="1"> <thead> <tr class="foswikiTableOdd foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0"> <th bgcolor="#687684" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <a rel="nofollow" href="/foswiki/bin/view/TWiki/CommandAndCGIScripts?template=edit;sortcol=0;table=23;up=0#sorted_table" title="Sort by this column"><font color="#ffffff">Parameter</font></a> </th> <th bgcolor="#687684" valign="top" class="foswikiTableCol1"> <a rel="nofollow" href="/foswiki/bin/view/TWiki/CommandAndCGIScripts?template=edit;sortcol=1;table=23;up=0#sorted_table" title="Sort by this column"><font color="#ffffff">Description</font></a> </th> <th bgcolor="#687684" valign="top" class="foswikiTableCol2 foswikiLastCol"> <a rel="nofollow" href="/foswiki/bin/view/TWiki/CommandAndCGIScripts?template=edit;sortcol=2;table=23;up=0#sorted_table" title="Sort by this column"><font color="#ffffff">Default</font></a> </th> </tr> </thead> <tbody> <tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0"> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <code>webs</code> </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol1"> comma-separated list of webs to run stats on </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol2 foswikiLastCol"> all accessible webs </td> </tr> <tr class="foswikiTableOdd foswikiTableRowdataBgSorted1 foswikiTableRowdataBg1"> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol0 foswikiFirstCol foswikiLast"> <code>logdate</code> </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol1 foswikiLast"> YYYYMM to generate statistics for </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol2 foswikiLastCol foswikiLast"> current month </td> </tr> </tbody></table> <p /> for example: <ol> <li> from browser <a href="http://stalklubben.org/foswiki/bin/statistics" target="_top">http://stalklubben.org/foswiki/bin/statistics</a> updates <em>all user webs</em> </li> <li> from browser <a href="http://stalklubben.org/foswiki/bin/statistics?webs=Userweb,Sandbox" target="_top">http://stalklubben.org/foswiki/bin/statistics?webs=Userweb,Sandbox</a> updates <em>Userweb,Sandbox</em> </li> <li> from browser <a href="http://stalklubben.org/foswiki/bin/statistics/TWiki" target="_top">http://stalklubben.org/foswiki/bin/statistics/TWiki</a> updates TWiki </li> <li> from command line bin/statistics updates <em>all user webs</em> </li> <li> from command line bin/statistics -webs=Userweb,Sandbox updates <em>Userweb,Sandbox</em> </li> <li> from command line bin/statistics TWiki.WebHome updates TWiki </li></ol> <p /> see <a href="/foswiki/bin/view/TWiki/SiteTools#WebStatistics_site_statistics">SiteTools#WebStatistics_site_statistics</a> for updating statistics using cron. <p /> <h3><a name="upload"></a> <code>upload</code> </h3> Uploads an attachment to a topic. The HTTP request is expected to be in <code>multipart/form-data</code> format. <table cellspacing="0" id="table24" cellpadding="0" class="foswikiTable" rules="rows" border="1"> <thead> <tr class="foswikiTableOdd foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0"> <th bgcolor="#687684" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <a rel="nofollow" href="/foswiki/bin/view/TWiki/CommandAndCGIScripts?template=edit;sortcol=0;table=24;up=0#sorted_table" title="Sort by this column"><font color="#ffffff">Parameter</font></a> </th> <th bgcolor="#687684" valign="top" class="foswikiTableCol1"> <a rel="nofollow" href="/foswiki/bin/view/TWiki/CommandAndCGIScripts?template=edit;sortcol=1;table=24;up=0#sorted_table" title="Sort by this column"><font color="#ffffff">Description</font></a> </th> <th bgcolor="#687684" valign="top" class="foswikiTableCol2 foswikiLastCol"> <a rel="nofollow" href="/foswiki/bin/view/TWiki/CommandAndCGIScripts?template=edit;sortcol=2;table=24;up=0#sorted_table" title="Sort by this column"><font color="#ffffff">Default</font></a> </th> </tr> </thead> <tbody> <tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0"> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <code>hidefile</code> </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol1"> if defined, will not show file in attachment table </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol2 foswikiLastCol"> </td> </tr> <tr class="foswikiTableOdd foswikiTableRowdataBgSorted1 foswikiTableRowdataBg1"> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <code>filepath</code> </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol1"> local (client) path name of the file being uploaded. This is used to look up the data for the file in the HTTP query. </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol2 foswikiLastCol"> </td> </tr> <tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0"> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <code>filename</code> </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol1"> deprecated, do not use </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol2 foswikiLastCol"> </td> </tr> <tr class="foswikiTableOdd foswikiTableRowdataBgSorted1 foswikiTableRowdataBg1"> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <code>filecomment</code> </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol1"> Comment to associate with file in attachment table </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol2 foswikiLastCol"> </td> </tr> <tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0"> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <code>createlink</code> </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol1"> if defined, will create a link to file at end of topic </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol2 foswikiLastCol"> </td> </tr> <tr class="foswikiTableOdd foswikiTableRowdataBgSorted1 foswikiTableRowdataBg1"> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <code>changeproperties</code> </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol1"> if defined, this is a property change operation <strong>only</strong> - no file will be uploaded. </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol2 foswikiLastCol"> null </td> </tr> <tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0"> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <code>redirectto</code> </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol1 foswikiLastCol"> URL to redirect to after upload. <code>{AllowRedirectUrl}</code> must be enabled in <code>configure</code>. The parameter value can be a <code>TopicName</code>, a <code>Web.TopicName</code>, or a URL. Redirect to a URL only works if it is enabled in <code>configure</code>, and is ignored if <code>noredirect</code> is specified.<br /> <strong>Note:</strong> Redirect to a URL only works if it is enabled in <code>configure</code> (Miscellaneous <code>{AllowRedirectUrl}</code>). </td> </tr> <tr class="foswikiTableOdd foswikiTableRowdataBgSorted1 foswikiTableRowdataBg1"> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol0 foswikiFirstCol foswikiLast"> <code>noredirect</code> </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol1 foswikiLastCol foswikiLast"> Normally it will redirect to 'view' when the upload is complete, but also designed to be useable for REST-style calling using the 'noredirect' parameter. If this parameter is set it will return an appropriate HTTP status code and print a message to STDOUT, starting with 'OK' on success and 'ERROR' on failure. </td> </tr> </tbody></table> <p /> <strong>Tips</strong> <ul> <li> You can use a tool like <code>curl</code> to upload files from the command line using this script. </li> <li> You can call upload easily from XmlHttpRequest in Javascript. </li></ul> <p /> <strong><img src="/foswiki/pub/System/DocumentGraphics/warning.gif" alt="ALERT!" title="ALERT!" width="16" height="16" border="0" /> Note:</strong> The <code>upload</code> script can only be called via HTTP POST method. Make sure you specify <code>method="post"</code> if you call the <code>upload</code> script via a form action. It is not possible to call <code>upload</code> from an <code><A href</code> link. <p /> <h3><a name="view"></a> <code>view</code> </h3> Used for viewing topics. <p /> <table cellspacing="0" id="table25" cellpadding="0" class="foswikiTable" rules="rows" border="1"> <thead> <tr class="foswikiTableOdd foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0"> <th bgcolor="#687684" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <a rel="nofollow" href="/foswiki/bin/view/TWiki/CommandAndCGIScripts?template=edit;sortcol=0;table=25;up=0#sorted_table" title="Sort by this column"><font color="#ffffff">Parameter</font></a> </th> <th bgcolor="#687684" valign="top" class="foswikiTableCol1"> <a rel="nofollow" href="/foswiki/bin/view/TWiki/CommandAndCGIScripts?template=edit;sortcol=1;table=25;up=0#sorted_table" title="Sort by this column"><font color="#ffffff">Description</font></a> </th> <th bgcolor="#687684" valign="top" class="foswikiTableCol2 foswikiLastCol"> <a rel="nofollow" href="/foswiki/bin/view/TWiki/CommandAndCGIScripts?template=edit;sortcol=2;table=25;up=0#sorted_table" title="Sort by this column"><font color="#ffffff">Default</font></a> </th> </tr> </thead> <tbody> <tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0"> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <code>raw=on</code> </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol1"> Shows the text of the topic in a scrollable textarea </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol2 foswikiLastCol"> </td> </tr> <tr class="foswikiTableOdd foswikiTableRowdataBgSorted1 foswikiTableRowdataBg1"> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <code>raw=debug</code> </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol1"> As <code>raw=on</code>, but also shows the metadata (forms etc) associated with the topic. </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol2 foswikiLastCol"> </td> </tr> <tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0"> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <code>raw=text</code> </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol1 foswikiLastCol"> Shows only the source of the topic, as plain text (Content-type: text/plain). Only shows the body text, <strong>not</strong> the form or other meta-data. </td> </tr> <tr class="foswikiTableOdd foswikiTableRowdataBgSorted1 foswikiTableRowdataBg1"> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <code>raw=all</code> </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol1"> Shows only the source of the topic, as plain text (Content-type: text/plain), <strong>with embedded meta-data</strong>. This may be useful if you want to extract the source of a topic to a local file on disc. </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol2 foswikiLastCol"> </td> </tr> <tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0"> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <code>section</code> </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol1"> Allows to view only a part of the topic delimited by a named section (see <a href="/foswiki/bin/view/System/VarSTARTSECTION">VarSTARTSECTION</a>). If the given section is not present, no topic content is displayed. </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol2 foswikiLastCol"> </td> </tr> <tr class="foswikiTableOdd foswikiTableRowdataBgSorted1 foswikiTableRowdataBg1"> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <code>contenttype</code> </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol1"> Allows you to specify a different <strong>Content-Type:</strong> (e.g. <code>contenttype=text/plain</code>) </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol2 foswikiLastCol"> </td> </tr> <tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0"> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <code>rev</code> </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol1"> Revision to view (e.g. <code>rev=45</code>) </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol2 foswikiLastCol"> </td> </tr> <tr class="foswikiTableOdd foswikiTableRowdataBgSorted1 foswikiTableRowdataBg1"> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <code>template</code> </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol1"> Allows you to specify a different skin template, overriding the 'view' template the view script would normally use. The default template is <code>view</code>. For example, you could specify <a href="/foswiki/bin/view/TWiki/CommandAndCGIScripts?template=edit" target="_top">/foswiki/bin/view/TWiki/CommandAndCGIScripts?template=edit</a>. This is mainly useful when you have specialised templates for a Wiki Application. </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol2 foswikiLastCol"> </td> </tr> <tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0"> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol0 foswikiFirstCol foswikiLast"> <code>topic</code> </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol1 foswikiLast"> redirects (at the beging of the cgi script running) to show the spcified Web.Topic, or, redirects to a URL, if allowed by {AllowRedirectUrl} and {PermittedRedirectHostUrls} </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol2 foswikiLastCol foswikiLast"> </td> </tr> </tbody></table> <p /> <img src="/foswiki/pub/System/DocumentGraphics/warning.gif" alt="ALERT!" title="ALERT!" width="16" height="16" border="0" /> For historical reasons, the view script has a special interpretation of the <code>text</code> skin. This skin cannot be redefined. <p /> <h3><a name="viewfile"></a> <code>viewfile</code> </h3> Used for viewing attachments. Normally, a site will publish the attachments (<code>pub</code>) directory using a URL. However if it contains sensitive information, you will want to protect attachments using <a href="/foswiki/bin/view/TWiki/AccessControl">AccessControls</a>. In this case, you can use the <code>viewfile</code> script to give access to attachments while still checking access controls. <p /> <table cellspacing="0" id="table26" cellpadding="0" class="foswikiTable" rules="rows" border="1"> <thead> <tr class="foswikiTableOdd foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0"> <th bgcolor="#687684" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <a rel="nofollow" href="/foswiki/bin/view/TWiki/CommandAndCGIScripts?template=edit;sortcol=0;table=26;up=0#sorted_table" title="Sort by this column"><font color="#ffffff">Parameter</font></a> </th> <th bgcolor="#687684" valign="top" class="foswikiTableCol1"> <a rel="nofollow" href="/foswiki/bin/view/TWiki/CommandAndCGIScripts?template=edit;sortcol=1;table=26;up=0#sorted_table" title="Sort by this column"><font color="#ffffff">Description</font></a> </th> <th bgcolor="#687684" valign="top" class="foswikiTableCol2 foswikiLastCol"> <a rel="nofollow" href="/foswiki/bin/view/TWiki/CommandAndCGIScripts?template=edit;sortcol=2;table=26;up=0#sorted_table" title="Sort by this column"><font color="#ffffff">Default</font></a> </th> </tr> </thead> <tbody> <tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0"> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol0 foswikiFirstCol"> <code>filename</code> </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol1"> name of attachment </td> <td bgcolor="#ffffff" valign="top" class="foswikiTableCol2 foswikiLastCol"> </td> </tr> <tr class="foswikiTableOdd foswikiTableRowdataBgSorted1 foswikiTableRowdataBg1"> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol0 foswikiFirstCol foswikiLast"> <code>rev</code> </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol1 foswikiLast"> Revision to view </td> <td bgcolor="#edf4f9" valign="top" class="foswikiTableCol2 foswikiLastCol foswikiLast"> </td> </tr> </tbody></table> <p /> Instead of using the <code>filename</code> parameter, you can append the attachment name to the end of the URL path (after the topic) e.g. <code>http://stalklubben.org/foswiki/bin/viewfile/Webname/TopicName/Attachment.gif</code> <p /> <h2><a name="Command_Line_Scripts"></a> Command Line Scripts </h2> Details on command line scripts located in the <code>tools</code> directory. <p /> <h3><a name="geturl_pl"></a> <code>geturl.pl</code> </h3> This is a very simple script to get the content of a web site. It is marked as <em>deprecated</em> and might be removed (or enhanced) in a future release. Its functions are covered by the standard <code>wget</code> and <code>curl</code> commands. <ul> <li> Usage: <code>geturl.pl <host> <path> [<port> [<header>]]</code> </li> <li> Example: <code>geturl.pl some.domain /some/dir/file.html 80</code> </li> <li> Will get: <code>http://some.domain:80/some/dir/file.html</code> </li></ul> <p /> <h3><a name="rewriteshebang_pl"></a> <code>rewriteshebang.pl</code> </h3> Simple script to rewrite the <code>#!/usr/bin/perl</code> shebang lines specific to your local Perl installation. It will rewrite the first line of all your cgi scripts so they use a different shebang line. Use it if your perl is in a non-standard location, or you want to use a different interpreter (such as 'speedy'). <p /> <h3><a name="tick_foswiki_pl"></a> <code>tick_foswiki.pl</code> </h3> This script executes a number of non-essential regular administration tasks that will help keep your site healthy and happy, such as removing expired sessions and lease files. <p /> It is intended to be run as a cron job or a scheduled task once a week. Example crontab entry:<br /> <code>0 0 * * 0 cd /usr/local/foswiki/bin && perl ../tools/tick_foswiki.pl</code> <p /> <strong>Note:</strong> The script has to be run by a user who can write files created by the webserver user. <p /> <hr /> <strong>Related Topics:</strong> <a href="/foswiki/bin/view/TWiki/AdminDocumentationCategory">AdminDocumentationCategory</a>, <a href="/foswiki/bin/view/TWiki/DeveloperDocumentationCategory">DeveloperDocumentationCategory</a>
%FORMFIELDS%
Topic preferences:
►
Parent topic:
Show on screen:
Data form
Attachments
Comments
Access keys
S = Save
W = Save and Continue
P = Preview
C = Cancel
Documentation
GoodStyle
TextFormatting
Macros
Formatted Search
Form based input
Including
Plugins
TWikiCompatibilityPlugin
(Foswiki-1.0.9, $Rev: 6017 (2010-01-11) $)
: add TWiki personality to Foswiki
SpreadSheetPlugin
(10 Nov 2009, $Rev: 5484 (2009-11-10) $)
: Add spreadsheet calculations like "$SUM($ABOVE())" to Foswiki tables and other topic text
ApprovalPlugin
(1.0, $Rev: 3923 (2009-05-16) $)
: Defines a set of states for one more or topics, with each state requiring approval by one or more users.
BreadCrumbsPlugin
(v2.42, $Rev: 4694 (2009-08-20) $)
: A flexible way to display breadcrumbs navigation
CalendarPlugin
(Dakar, $Rev: 2934 (2009-03-09) $)
: Show a monthly calendar with highlighted events
CommentPlugin
(12 Sep 2009, $Rev: 4843 (2009-09-11) $)
: Quickly post comments to a page without an edit/preview/save cycle
CompareRevisionsAddonPlugin
(18 Sep 2009, $Rev: 4995 (2009-09-19) $)
:
DatabasePlugin
(Dakar, $Rev: 0 (28 nov. 2008) $)
: Provide access to data in a SQL database
EditTablePlugin
(4.34, $Rev: 5854 (2009-12-23) $)
: Edit tables using edit fields, date pickers and drop down boxes
ExcelImportExportPlugin
(Foswiki, $Rev: 0$)
: Renders an attached Excel spreadsheet as Foswiki table
FilterPlugin
(1.80, $Rev: 3491 (2009-04-17) $)
: Substitute and extract information from content by using regular expressions
FlexWebListPlugin
(v1.30, $Rev: 3493 (2009-04-17) $)
: Flexible way to display hierarchical weblists
GluePlugin
(2.20, $Rev: 3494 (2009-04-17) $)
: Enable markup to span multiple lines
HistoryPlugin
(1.4, $Rev: 1340 1401 (17 Dec 2008) $)
: Shows a complete history of a document
IfDefinedPlugin
(v2.00, $Rev: 3637 (2009-04-23) $)
: Render content conditionally
ImageGalleryPlugin
(5.01, $Rev: 4425 (2009-07-03) $)
: Displays image gallery with auto-generated thumbnails from attachments
InterwikiPlugin
(20 Sep 2009, $Rev: 5022 (2009-09-20) $)
: Link
ExternalSite
?
:Page text to external sites based on aliases defined in a rules topic
JQueryPlugin
(1.15, $Rev: 1988 (15 Jan 2009) $)
: jQuery JavaScript library for Foswiki
MenuListPlugin
($Date: 2009-03-20 03:32:09 +1100 (Fri, 20 Mar 2009) $, 3193)
: dynamic Folding menu list
NatEditPlugin
(v3.32, $Rev: 1993 (15 Jan 2009) $)
: A Wikiwyg Editor
NatSkinPlugin
(3.00-pre36, $Rev: 1995 (15 Jan 2009) $)
: Theming engine for
NatSkin
PreferencesPlugin
(20 Sep 2009, $Rev: 5037 (2009-09-20) $)
: Allows editing of preferences using fields predefined in a form
RenderListPlugin
(2.2, $Rev: 5042 (2009-09-20) $)
: Render bullet lists in a variety of formats
SlideShowPlugin
(02 Aug 2008, $Rev: 2742 (2009-02-26) $)
: Create web based presentations based on topics with headings.
SmiliesPlugin
(20 Sep 2009, $Rev: 5046 (2009-09-20) $)
: Render smilies like
as icons
SubscribePlugin
(03 Dec 2008, $Rev: 13787 (18 May 2007) $)
: Subscribe to web notification
TablePlugin
(1.045, $Rev: 6110 (2010-01-21) $)
: Control attributes of tables and sorting of table columns
TagMePlugin
(11 Jun 2009, $Rev: 4104 (2009-06-11) $)
: Tag wiki content collectively to find content by keywords
TinyMCEPlugin
(29 Dec 2009, $Rev: 5860 (2009-12-28) $)
: Integration of the Tiny MCE WYSIWYG Editor
TocPlugin
(2.0, $Rev: 5851 (2009-12-22) $)
: Sophisticated table of contents generation
TreeBrowserPlugin
(v2.0, $Rev: 5479 (2009-11-10) $)
: Renders a list as a collapsable/expandable tree.
TreePlugin
(1.9.1, $Rev: 6156 (2010-01-27) $)
: Renders topics' parent-child relationships as hierarchical tree view. Useful for dynamic site maps and threads.
TwistyPlugin
(1.5.4, $Rev: 6281 (2010-02-12) $)
: Twisty section Javascript library to open/close content dynamically
UploadPlugin
(1.11, $Rev: 4414 (2009-07-03) $)
: Attach multiple files to a topic in one go
VotePlugin
(1.33, $Rev: 5560 (2009-11-17) $)
: Simple way to count votes
WysiwygPlugin
Save
Save and Continue
Preview
Cancel
Force new revision