|
TWiki CGI and Command Line Scripts |
|
The main difference between invoking this script and using WebChanges is that WebChanges is based on a %SEARCH% , while this script reads the changes file in each web, making it much faster. |
|
< < | NOTE: The result from changes script and the topic WebChanges can be different, if the changes file is deleted from a web. In particular, in new installations the changes script will return no results while the WebChanges topic will. |
> > | Note: The result from changes script and the topic WebChanges can be different, if the changes file is deleted from a web. In particular, in new installations the changes script will return no results while the WebChanges topic will. |
|
configure
configure is the browser script used for inspection and configuration of the TWiki configuration. None of the parameters to this script are useable for any purpose except configure . See configure. |
| Form field values are passed in parameters named 'field' - for example, if I have a field Status the parameter name is Status .
- The first sequence of ten or more
X 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.
|
|
< < | NOTE: most skins support the definition of EDIT_SKIN , which is used as the value of the cover parameter in edit URLs. This allows you to override the default edit skin on a web, topic or user basis. |
> > | Note: Most skins support the definition of EDIT_SKIN , which is used as the value of the cover parameter in edit URLs. This allows you to override the default edit skin on a web, topic or user basis. |
|
login
Used for logging in when TWiki login is being used (e.g TemplateLoginManager). |
| manage
Performs a range of management functions.
|
|
< < |
action |
One of createweb , deleteUserAccount , editSettings or saveSettings |
none |
|
> > |
action |
One of createweb , renameweb , deleteUserAccount , editSettings or saveSettings |
none |
Note: The manage script can only be called via http POST method for createweb renameweb , and deleteUserAccount . |
|
action=createweb
|
|
sitemapuseto |
Value for SITEMAPUSETO |
'' |
nosearchall |
Value for NOSEARCHALL |
'' |
|
|
> > | action=renameweb
Parameter |
Description |
Default |
newsubweb |
Name of the web after move |
'' |
newparentweb |
New parent web name |
'' |
confirm |
If defined, requires a second level of confirmation. Supported values are "getlock", "continue", and "cancel" |
'' |
|
| action=editSettings
No parameters |
|
|
|
> > | Note: The register script can only be called via http POST method, not GET. Make sure to specify the "post" method if you call the register script via a form action. |
| rename |
|
< < | Used for renaming topics. |
> > | Used for renaming topics and attachments. |
|
|
|
nonwikiword |
if defined, a non-wikiword is acceptable for the new topic name |
|
redirectto |
If the rename process is successful, rename will redirect to this topic or URL. The parameter value can be a TopicName , a Web.TopicName , or a URL. Note: Redirect to a URL only works if it is enabled in configure (Miscellaneous {AllowRedirectUrl} ). |
|
|
|
> > | Note: The rename script can only be called via http POST method, not GET. Make sure you specify method="post" if you call the rename script via a form action. |
| rest
This REST (Representational State Transfer) script can be invoked via http in the same way as the other TWiki scripts (see Invocation Examples, 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 TWiki::Func::registerRESTHandler method. The rest script will print the result directly to the browser unless the endPoint parameter is specified, in which case it will output a redirect to the given topic. |
|
The function is free to use any other query parameters for its own purposes. |
|
< < | The rest script should always require authentication in any TWiki 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 ApacheLogin . |
> > | Note: The rest script should always require authentication in any TWiki 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 ApacheLogin . |
|
Invocation Examples |
|
Form field values are passed in parameters named 'field' - for example, if I have a field Status the parameter name is Status . |
|
> > | Note: The save script can only be called via http POST method, not GET. Make sure to specify the "post" method if you call the save script via a form action. Example:
<form name="new" action="%SCRIPTURLPATH{save}%/Sandbox/" method="post">
...
</form>
It is not possible to call save from an <a href=""> link. |
| search
CGI gateway to the %SEARCH% functionality driven by the following CGI parameters: |
|
You can use a tool like curl to upload files from the command line using this script. |
|
> > | Note: The upload script can only be called via http POST method, not GET. |
| view
Used for viewing topics. |