%COLORPICKER{}%
variable is handled by the ColorPickerPlugin.
%COLORPICKER{ name="..." value="..." }%
Parameter | Description | Default | Example |
---|---|---|---|
name | Name of input field | (required) | name="text_color" |
value | Initial color value, in hexadecimal notation for the combination of Red, Green, and Blue color values (RGB). | (none) | value="#0000ff" |
size | Size of input field | (browser default) | size="12" |
class | CSS class of input field | (none) | class="twikiInputField" |
Additional parameters can be supplied; they will be added to the HTML input field. |
<form action="...">
%COLORPICKER{ name="text_color" size="12" value="#123456" class="twikiInputField" }%
<form>
%COMMENT%
without parameters shows a simple text box.
%COMMENT{}%
can handle the following parameters: Parameter | Description | Default |
---|---|---|
type | This is the name of the template to use for this comment. Comment templates are defined in a TWiki template - see customization. If this attribute is not defined, the type is whatever is defined by COMMENTPLUGIN_DEFAULT_TYPE, either in this topic or in your WebPreferences. | "below" |
default | Default text to put into the textarea of the prompt. | |
target | Name of the topic to add the comment to | the current topic |
location | Regular expression specifying the comment location in the target topic. Read carefully the CommentPlugin documentation! | |
mode | For compatibility with older versions only, synonymous with type | |
nonotify | Set to "on" to disable change notification for target topics | "off" |
noform | Set to "on" to disable the automatic form that encloses your comment block - remember to insert <form> tags yourself! See CommentPluginExamples#noform for an example. | "off" |
nopost | Set to "on" to disable insertion of the posted text into the topic. | "off" |
remove | Set to "on" to remove the comment prompt after the first time it is clicked. | "off" |
button | Button label text | "Add comment" |
emailto | Send comment by email. Use comma "," to seperate multiple email addresses. This feature is disabled by default. To enable this feature, please set up "$TWiki::cfg{Plugins}{CommentPlugin}{EmailEnabled} = 1;". |
%DATEPICKER{}%
variable is handled by the DatePickerPlugin.
%DATEPICKER{ name="..." value="..." }%
Parameter | Description | Default | Example |
---|---|---|---|
name | Name of input field. φ: No output is shown if the name parameter is missing, but the CSS and Javascript are loaded. | (requiredφ) | name="Start" |
value | Initial date value. | "" (today) | value="2012-12-31" |
format | Format of resulting date value. • %a - abbreviated weekday name• %A - full weekday name• %b - abbreviated month name• %B - full month name• %C - century number• %d - the day of the month (00 ... 31)• %e - the day of the month (0 ... 31)• %H - hour (00 ... 23)• %I - hour (01 ... 12)• %j - day of the year ( 000 ... 366)• %k - hour (0 ... 23)• %l - hour (1 ... 12)• %m - month (01 ... 12)• %M - minute (00 ... 59)• %n - a newline character• %p - "PM" or "AM"• %P - "pm" or "am"• %S - second (00 ... 59)• %s - number of seconds since Epoch (since Jan 01 1970 00:00:00 UTC)• %t - a tab character• %U , %W , %V - the week number. The week 01 is the week that has the Thursday in the current year, which is equivalent to the week that contains the fourth day of January. Weeks start on Monday.• %u - the day of the week (1 ... 7, 1 = MON)• %w - the day of the week (0 ... 6, 0 = SUN)• %y - year without the century (00 ... 99)• %Y - year including the century (ex. 2012)• %% - a literal % character | "%Y-%m-%d" | format="%e %b %Y" |
id | ID of input field, optional. | "id_" + name | id="idStart" |
size | Size of input field, in number of characters. | (calculated as needed) | size="12" |
class | CSS class of input field. | "twikiInputField" | class="dateField" |
Additional HTML input field attributes, such as alt , disabled , maxlength , onblur , onchange , onfocus , readonly , style , tabindex , title |
<form action="...">
%DATEPICKER{ name="Start_Date" }%
<form>
%EDITFORMFIELD{"fieldname" form="...Form"}%
- create form field defined in a TWiki Form template
%EDITFORMFIELD{"fieldname" topic="..."}%
- create form field based on a topic that has a TWiki Form & initialize its value
%EDITFORMFIELD{"fieldname" type="..."}%
- create an HTML input field
Parameter: | Description: | Default: |
---|---|---|
"fieldname" | The name of a TWiki form field or HTML form field. | Required |
form="..." | Name of form template topic, such as "BugForm" . Specify topic name or Web.TopicName | Either form or topic is required unless type is specified |
topic="..." | Name of topic containing form, such as "Bug1234" . Specify topic name or Web.TopicName | |
format="..." | Format string. Supported variables: • $inputfield - rendered form input field. • $title - raw field name (includes space and other special characters). • $name - field name (sanitized title). • $size - size of field or selector. • $value - initial value, or select options. • $tooltip - tooltip message. • $attributes - type attributes, such as H for hidden, M for mandatory. • $extra - extra information, such as * for mandatory field. See details in TWikiForms#FormFieldTypes. This parameter is ignored if type="..." is specified. | "$inputfield" |
value="..." | Initial value of input field. If omitted and if topic="..." is specified, the value is taken from the named form field. | "" |
type="start" | Special case: Start an HTML form. Parameters: "form" type="start" action="save" topic="..." method="" • action : Specify a TWiki script (view , edit , save , ...), or a full action URL, default "view" . • topic : Specify topic name or Web.TopicName , default current topic; ignored if full action URL is provided. • method : HTML form action method, default "post" for save action, else "get" . | "" |
type="end" | Special case: End an HTML form. Parameters: "form" type="end" | "" |
type="..." | Special case: Create an input field regardless of the type defined in the TWikiForm. Used mainly for hidden fields and submit button. The nameless parameter is the field name. Supported types: • "fieldname" type="hidden" value="..." - hidden input field. • "fieldname" type="submit" value="..." - submit button, value is button label. • "fieldname" type="button" value="..." onclick="..." - regular button, value is button label. • "fieldname" type="text" value="..." size="80" - text input field. • "fieldname" type="checkbox" value="..." text="..." - checkbox, text is display text. • "fieldname" type="radio" value="..." text="..." - radio button, text is display text. • In addition, any valid XHML and HTML5 input type is supported, such as type="date" , type="file" , type="image" . Additional type-specific parameters can be supplied, such as alt="" , checked="checked" , class="" , max="" , min="" , src="" , style="" , width="" . Consult HTML documentation. | "" |
%EDITFORMFIELD{ "ReleaseType" form="PackageForm" value="Beta-1" }%
%EDITFORMFIELD{ "form" type="start" action="save" topic="%BASEWEB%.%BASETOPIC%" method="post" }%
| Priority: | %EDITFORMFIELD{ "Priority" topic="%BASETOPIC%" }% |
| Status: | %EDITFORMFIELD{ "Status" topic="%BASETOPIC%" }% |
| | %EDITFORMFIELD{ "form" type="submit" value="Update" }% |
%EDITFORMFIELD{ "Updated" type="hidden" value="%SERVERTIME{$year-$mo-$day}%" }%
%EDITFORMFIELD{ "form" type="end" }%
%EDITTABLE{}%
variable is handled by the EditTablePlugin
%EDITTABLE{ attributes }%
Attribute | Comment | Default |
---|---|---|
header | Specify the header format of a new table like "|*Food*|*Drink*|" . Useful to start a table with only a button | (no header) |
format | The format of one column when editing the table. A cell can be a text input field, or any of these edit field types: • Text input field (1 line): | text, <size>, <initial value> | • Textarea input field: | textarea, <rows>x<columns>, <initial value> | • Drop down box: | select, <size>, <option 1>, <option 2>, etc* | * only one item can be selected • Radio buttons: | radio, <size*>, <option 1>, <option 2>, etc | * size indicates the number of buttons per line in edit mode • Checkboxes: | checkbox, <size*>, <option 1>, <option 2>, etc | * size indicates the number of checkboxes per line in edit mode • Fixed label: | label, 0, <label text> | • Row number: | row, <offset> | • Date: | date, <size>, <initial value>, <DHTML date format*> | * see Date Field Type | "text, 16" for all cells |
changerows | Rows can be added and removed if "on" Rows can be added but not removed if "add" Rows cannot be added or removed if "off" | CHANGEROWS plugin setting |
quietsave | Quiet Save button is shown if "on" , hidden if "off" | QUIETSAVE plugin setting |
include | Other topic defining the EDITTABLE parameters. The first %EDITTABLE% in the topic is used. This is useful if you have many topics with the same table format and you want to update the format in one place. | (none) |
helptopic | Topic name containing help text shown below the table when editing a table. The %STARTINCLUDE% and %STOPINCLUDE% variables can be used in the topic to specify what is shown. | (no help text) |
headerislabel | Table header cells are read-only (labels) if "on" ; header cells can be edited if "off" or "0" | "on" |
editbutton | Set edit button text, e.g. "Edit this table" ; set button image with alt text, e.g. "Edit table, %PUBURL%/%SYSTEMWEB%/TWikiDocGraphics/edittopic.gif" ; hide edit button at the end of the table with "hide" (Note: Button is automatically hidden if an edit button is present in a cell) | EDITBUTTON plugin setting |
buttonrow | Set to top to put the edit buttons above the table. | bottom |
javascriptinterface | Use javascript to directly move and delete row without page refresh. Enable with "on" , disable with "off" . | JAVASCRIPTINTERFACE plugin setting |
redirectto | Set up a return page after saving changes. e.g By setting redirectto="%BASEPAGE%", you can return to base page if your editable table is included by another page. | (none) |
%EDITTABLE{ format="| text, 20 | select, 1, one, two, three |" changerows="on" }%
| *Name* | *Type* |
| Foo | two |
%FORMFIELD{"fieldname"}%
Parameter: | Description: | Default: |
---|---|---|
"fieldname" | The name of a TWiki form field | required |
topic="..." | Topic where form data is located. May be of the form Web.TopicName | Current topic |
rev="..." | Get the form field value from the specified topic revision, range "1" to top revision of topic. "0" is equivalent to the top revision | The rev URL parameter value if present, otherwise the top revision |
format="..." | Format string. Supported variables: • $value - form field value • $value(20, -<br />) - value hyphenated every 20 characters using separator -<br /> • $value(30, ...) - value shortened to 30 characters • $length - length of value (can be used to test if value is set) • $title - raw field name (includes space and other special characters) • $name - field name (sanitized title) • $attributes - form field attributes • $formtopic - name of form definition topic | "$value" |
default="..." | Text shown when no value is defined for the field | "" |
alttext="..." | Text shown when field is not found in the form | "" |
newline="$br" | Convert newlines in textarea to other delimiters. Variable $br expands to <br /> tag, and $n to a newline. Other text is encoded based on encode parameter. | no conversion |
encode="html" | Encode special characters into HTML entities. If a FORMFIELD is passed into an HTML form field it should be encoded as "html" . Additional encodings available: encode="quote" , encode="moderate" , encode="safe" , encode="entity" and encode="url" . See ENCODE for details. | "" (no encoding) |
%FORMFIELD{"ProjectName" topic="Projects.SushiProject" default="(not set)" alttext="ProjectName field not found"}%
<input type="text" name="Address" value="%FORMFIELD{ "Address" encode="html" }%" />
%LDAP{"filter" format="format" ...}%
Parameter: | Description: | Default: |
---|---|---|
"uid=joeshmoe" | the LDAP query string | required |
filter="uid=joeshmoe" | (Alternative to above) | N/A |
host="..." | host IP or name to connect to | |
port="..." | port to of the host | |
version="..." | protocol version; possible values: 2,3 | |
ssl="..." | use ssl to bind to the server; possible values 0,1 | |
base="..." | base dn of the (sub)tree to search in; if base is written in brackets (e.g. 'base="(ou=people)"') then it is prepended to the default base | the default base of the LdapContrib |
scope="one" | scope of search; possible values: sub , base , one | sub |
format="..." | format string used to display a database record | $dn |
header="..." | header to prepend the output | no header |
footer="..." | footer to appended to the output | no footer |
sep="..." or separator="..." | separator between database records | $n (new line) |
sort="..." | name of attributes to sort the output | DN |
reverse="on" | reverse the result set; possible values: on , off | off |
limit="100" | maximum number of records to return | no limit |
skip="10" | number of records in the hit set to skip before displaying them | 0 (nothing is skipped) |
required="..." | a comma separated list of LDAP record attributes. If specified, the LDAP query results not having all of the specified attributes are eliminated | nothing is required |
hidenull="on" | wether to hide any output on an empty hit set; possible values: on , off | off |
default="..." | when the LDAP query yields no results, the value of this parameter is returned as the search result instead of null. Naturally, if hidenull is on, default doesn't have any effect | "" (null string) |
clear="..." | comma separated list of attributes to be removed from the output if they are not resolved | nothing is cleared |
header
, format
and footer
format strings may contain the following variables and the standard special tokens: Variable: | Description: |
---|---|
$count | the number of hits |
$index | the record number |
$<attr-name> | the value of the record attribute <attr-name> |
%LDAP{"objectClass=posixAccount" format="| $index | $cn | $mail |"}%
?refreshldap=on
to update.
Parameter: | Description: | Default: |
---|---|---|
format="..." | format string used to display a user record | ordered list of $displayName |
header="..." | header to prepend the output | no header |
footer="..." | footer to appended to the output | no footer |
sep="..." | separator between database records | $n (new line) |
limit="100" | maximum number of records to return | no limit |
skip="10" | number of records in the hit set to skip before displaying them | 0 (nothing is skipped) |
include="..." | regular expression a user's WikiName must match to be included in the output | |
exclude="..." | regular expression a user's WikiName must not match | |
hideunknown="off" | on/off, enable/disable filtering out users that did not log in yet and thus have no home topic (e.g. created by TWiki:Plugins/NewUsersPlugin) | on |
header
, format
and footer
format strings may contain the following variables and the standard special tokens: Variable: | Description: |
---|---|
$index | the record number |
$wikiName | the user's WikiName |
$loginName | the user's login name |
$displayName | a link pointing to the users home topic in the Main web, if it exists, and '<nop>$wikiName' otherwise |
$emails | the list of all known email addresses |
%LDAPUSERS{limit="10"}%
%SEARCH{"text" ...}%
Parameter: | Description: | Default: |
---|---|---|
"text" | Search term. Is a keyword search, literal search, regular expression search, or query, depending on the type parameter. SearchHelp has more | required |
search="text" | (Alternative to above) | N/A |
web="Name" web="Main, Know" web="all" | Comma-separated list of webs to search. You can specifically exclude webs from an all search using a minus sign - for example, web="all,-Secretweb" . The special word all means all webs that do not have the NOSEARCHALL variable set to on in their WebPreferences. Note that TWikiAccessControls are respected when searching webs; it is much better to use them than NOSEARCHALL . | Current web |
topic="WebPreferences" topic="*Bug" | Limit search to topics: A topic, a topic with asterisk wildcards, or a list of topics separated by comma. Note this is a list of topic names and must not include web names. | All topics in a web |
excludetopic="Web*" excludetopic="WebHome, WebChanges" | Exclude topics from search: A topic, a topic with asterisk wildcards, or a list of topics separated by comma. Note this is a list of topic names and must not include web names. | None |
scope="topic" scope="text" scope="all" | Search topic name (title); the text (body) of topic; or all (title and body) | "text" |
type="keyword" type="word" type="literal" type="regex" type="query" | Control how the search is performed when scope="text" or scope="all" keyword : use Google-like controls as in soap "web service" -shampoo ; searches word parts: using the example, topics with "soapsuds" will be found as well, but topics with "shampoos" will be excluded word : identical to keyword but searches whole words: topics with "soapsuds" will not be found, and topics with "shampoos" will not be excluded literal : search for the exact string, like web service regex : use a RegularExpression search like soap;web service;!shampoo ; to search on whole words use \bsoap\b query : query search of form fields and other meta-data, like (Firstname='Emma' OR Firstname='John') AND Lastname='Peel' | %SEARCHVAR- DEFAULTTYPE% preferences setting (literal) |
sort="topic" sort="created" sort="modified" sort="editby" sort="parent" sort= | Sort the results of search by the topic names, topic creation time, last modified time, last editor, parent topic name, or named field of TWikiForms. The sorting is done web by web; if you want to sort across webs, create a formatted table and sort it with TablePlugin's initsort. Note that dates are sorted most recent date last (i.e at the bottom of the table). Legacy order parameter is used in case sort is not specified. | Sort by topic name |
start="0" start="20" | Specify the number of results to skip. This is done after sorting if sort parameter is specified. This is intended for pagination of results. If this parameter is specified, %NTOPICS% in the search template is replaced with the number of topics matched. Without this parameter, %NTOPICS% doesn't exceed the limit value. | No results skipped |
limit="all" limit="16" | Limit the number of results returned. This is done after sorting if sort parameter is specified. This parameter specifing the number of results remains the same in the presense of the start parameter. Assuming there are more than 20 results matched, start="10" limit="10" results in 11th to 20th results are returned | All results |
date="..." | limits the results to those pages with latest edit time in the given time interval. | All results |
createdate="..." | similar to date but it's about create time instead of last edit. You can specify both date and createdate , in which case topics matching both conditions are shown. | All results |
reverse="on" | Reverse the direction of the search | Ascending search |
casesensitive="on" | Case sensitive search | Ignore case |
bookview="on" | BookView search, e.g. show complete topic text | Show topic summary |
nonoise="on" | Shorthand for nosummary="on" nosearch="on" nototal="on" zeroresults="off" noheader="on" noempty="on" | Off |
nosummary="on" | Show topic title only | Show topic summary |
nosearch="on" | Suppress search string | Show search string |
noheader="on" | Suppress default search header Topics: Changed: By: , unless a header is explicitly specified | Show default search header, unless search is inline and a format is specified (Cairo compatibility) |
nototal="on" | Do not show number of topics found | Show number |
zeroresults="off" | Suppress all output if there are no hits | zeroresults="on" , displays: "Number of topics: 0" |
noempty="on" | Suppress results for webs that have no hits. | Show webs with no hits |
headingoffset="2" | Adjust the level of headings in text of topics found, taking effect in $text and $pattern() of a FormattedSearch. A "2" or "+2" increases the level by two, e.g. a ---+ H1 turns into a ---+++ H3. Positive and negative values are supported. Adjusted min and max levels are H1 and H6, respectively. | no adjustment |
header="..." format="..." footer="..." | Custom format results. See FormattedSearch for usage, variables & examples | Results in table |
default="..." | Default message if there are no hits in a web. See FormattedSearch for usage, variables & examples | No output |
expandvariables="on" | Expand variables before applying a FormattedSearch on a search hit. Useful to show the expanded text, e.g. to show the result of a SpreadSheetPlugin %CALC{}% instead of the formula | Raw text |
multiple="on" | Multiple hits per topic. Each hit can be formatted. The last token is used in case of a regular expression ";" and search | Only one hit per topic |
nofinalnewline="on" | If on , the search variable does not end in a line by itself. Any text continuing immediately after the search variable on the same line will be rendered as part of the table generated by the search, if appropriate. | off |
recurse="on" | Recurse into subwebs, if subwebs are enabled. | off |
separator=", " | Line separator between search hits | "$n" (Newline) |
newline="%BR%" | Line separator within a search hit. Useful if you want to put multi-line content into a table cell, for example if the format="" parameter contains a $pattern() that captures more than one line, or contains a $formfield() that returns a multi-line textfield. | "$n" (Newline) |
encode="html" | Encode special characters into HTML entities. If a FORMFIELD is passed into an HTML form field it should be encoded as "html" . Additional encodings available: encode="quote" , encode="moderate" , encode="safe" , encode="entity" and encode="url" . See ENCODE for details. | no encoding |
%SEARCH{"wiki" web="Main" scope="topic"}%
%SEARCH{"FAQ" scope="topic" nosearch="on" nototal="on" header="| *Topic: * | *Summary: * |" format="| $topic | $summary |"}%
(displays results in a table with header - details)
%TABLE{}%
variable just before the %SEARCH{}%
to alter the output of a search. Example: %TABLE{ tablewidth="90%" }%
%VOTE{}%
variable is handled by the VotePlugin.
%VOTE{ id="..." select1="..., ..., ..." }%
Parameter | Description | Example |
---|---|---|
id | The identifier of the poll. You can have multiple independent votes in the same topic. | id="Dining" |
selectN | Defines the name of a select vote, where you select one from a ranges of options. N is a number that identifies this item within the poll e.g. select1 , select2 etc. You must number all select and stars parameters uniquely and sequentially (e.g. select1 stars2 select3 | select1="Drink" |
optionsN | Each selectN must have a corresponding optionsN that defines a comma-separated list of the options that can be selected between. | options1="Beer,Wine,Milk" |
starsN | Defines the name of a rate vote, where you rate something by giving it a number of stars. N is a number that identifies this item within the poll e.g. select1 , stars2 etc. You must number all select and stars parameters uniquely and sequentially (e.g. select1 stars2 select3 | stars2="Usability" |
widthN | Each starsN must have a corresponding widthN . This gives the number of stars to show e.g. width1="5" will show 5 stars. | width2="10" |
formatN | Defines the format of the results display. See formatting results, below. | format="$large" |
chartN | Defines the format of a single bar in the results bar chart generated for the corresponding select (for select type only). See formatting results, below. | chart="<p>$option $score</p>" |
separator | Defines the string to be used to separate each row in the result. | separator="<br/>" |
global | If set to "off" , this makes the id local to this topic (the default). If set to "on" it will be a global poll that can be accessed from many topics. | global="on" |
open | If set to "off" this is a closed vote. If set to "on" it is open (the default) | open="on" |
secret | If set to "off" , then the database will record who voted. If set to "on" , votes are secret (the default) | secret="on" |
saveto | If set to the name of a topic, the poll results will be appended to the end of that topic. The results are formatted as a TWiki table for easy post-processing. | saveto="Main.VoteResults" |
bayesian | If set to "on" , rating averages will be computed using the Bayesian average of this item against all the other items that have the same item in their stars field. This requires all the participating %VOTEs to be global , or to save their results to the same place using saveto . See http://www.thebroth.com/blog/118/bayesian-rating for more information about Bayesian rating. | bayesian="off" |
submit | If set to "off" , this makes the %VOTE display the results of the vote without prompting for any input. This is useful when - for example - you want to show the results of a global vote, without permitting more voting. |
%VOTE{ id="FavouriteMeal" select1="Drink" options1="Beer,Wine,Milk,Water" select2="Food" options2="Steak,Bread,Pasta,Pizza" }%
shows two selectors named "Drink" and "Food", respectively, and a "Vote" button