Difference: TWikiScripts (7 vs. 8)

Revision 82009-04-21 - Main.TWikiContributor

Line: 1 to 1
 

TWiki CGI and Command Line Scripts

Line: 49 to 49
  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.
Changed:
<
<
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.
Line: 73 to 73
 Form field values are passed in parameters named 'field' - for example, if I have a field Status the parameter name is Status.
  1. 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.
Changed:
<
<
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).
Line: 88 to 88
 

manage

Performs a range of management functions.
Parameter Description Default
Changed:
<
<
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

Parameter Description Default
Line: 99 to 101
 
sitemapuseto Value for SITEMAPUSETO ''
nosearchall Value for NOSEARCHALL ''
Added:
>
>

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
Line: 173 to 181
 
Parameter Description Default
action register or verify or resetPassword or approve  
Added:
>
>
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

Changed:
<
<
Used for renaming topics.
>
>
Used for renaming topics and attachments.
 
Parameter Description Default
skin skin(s) to use  
Line: 187 to 197
 
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}).
 
Added:
>
>
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.
Line: 198 to 210
  The function is free to use any other query parameters for its own purposes.
Changed:
<
<
ALERT! 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.
>
>
ALERT! 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

Line: 265 to 277
  Form field values are passed in parameters named 'field' - for example, if I have a field Status the parameter name is Status.
Added:
>
>
ALERT! 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:
Line: 323 to 343
  You can use a tool like curl to upload files from the command line using this script.
Added:
>
>
ALERT! Note: The upload script can only be called via http POST method, not GET.
 

view

Used for viewing topics.
 
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback
Note: Please contribute updates to this topic on TWiki.org at TWiki:TWiki.TWikiScripts