Resource | Required Server Environment * |
---|---|
Perl | 5.005_03 or higher (5.8.4 or higher is recommended) |
RCS | 5.7 or higher (including GNU diff ) Optional, TWiki includes a pure perl implementation of RCS that can be used instead (although it's slower) |
GNU diff | GNU diff 2.7 or higher is required when not using the all-Perl RcsLite. Install on PATH if not included with RCS (check version with diff -v ) Must be the version used by RCS, to avoid problems with binary attachments - RCS may have hard-coded path to diff |
GNU patch | For upgrades only: GNU patch is required when using the TWiki:Codev.UpgradeTWiki script |
Other external programs | fgrep, egrep |
Cron/scheduler | • Unix: cron • Windows: cron equivalents |
Web server | Apache is well supported; see TWiki:TWiki.InstallingTWiki#OtherWebServers for other servers |
Module | Preferred version![]() |
---|---|
Algorithm::Diff (included) | |
Error (included) | |
Text::Diff (included) | |
File::Temp | (included with perl 5.6 and later) |
Config | >=0 |
File::Find | >=1.05 |
IO::File | >=1.10 |
Time::Local | >=1.11 |
CGI::Carp | >=1.26 |
FileHandle | >=2.01 |
File::Copy | >=2.06 |
Data::Dumper | >=2.121 |
Cwd | >=3.05 |
File::Spec | >=3.05 |
Module | Preferred version | Description |
---|---|---|
CGI::Cookie | >=1.24 | Used for session support |
CGI::Session | >=3.95 | Used for session support |
Digest::base | ||
Digest::SHA1 | ||
Jcode | Used for I18N support with perl 5.6 | |
Locale::Maketext::Lexicon | >=0 | Used for I18N support |
Net::SMTP | >=2.29 | Used for sending mail |
Unicode::Map | Used for I18N support with perl 5.6 | |
Unicode::Map8 | Used for I18N support with perl 5.6 | |
Unicode::MapUTF8 | Used for I18N support with perl 5.6 | |
Unicode::String | Used for I18N support with perl 5.6 | |
URI | Used for configure |
configure
script, or if you're still trying to get to that point, check from the command line like this:
perl -e 'use FileHandle; print $FileHandle::VERSION."\n"'
data
and pub
directories and to lib/LocalSite.cfg
. Everything else should be read-only.
/usr/bin/perl
. If it's somewhere else, change the path to Perl in the first line of each script in the twiki/bin
directory. .cgi
or .pl
). If necessary, rename all files in twiki/bin
(i.e. rename view
to view.pl
etc). If you do this, make sure you set the ScriptSuffix
option in configure
(Step 6).
/twiki/bin/LocalLib.cfg
. /twiki/bin/LocalLib.cfg.txt
. $twikiLibPath
, which must point to the absolute file path of your twiki/lib
e.g. /home/httpd/twiki/lib
. $CPANBASE
to point to your personal CPAN install. Don't forget that the webserver user has to be able to read those files as well.
bin/configure
script from your browser. httpd.conf
file in twiki_httpd_conf.txt
at the root of the package. This file also contains advice on securing your installation. There's also a script called tools/rewriteshebang.pl
to help you in fixing up the shebang lines in your CGI scripts.
configure
script from your browser, and resolve any errors or warnings it tells you about.
http://yourdomain.com/twiki/bin/view
and start TWiki-ing away!
configure
script and make sure you have resolved all errors, and are happy that you understand any warnings.
"UpgradeTwiki"
, and is found in the root of the distribution. It can be run by any user, though you will need to make sure you correct the permissions so that the webserver user can write all files in the new installation when you have finished. The upgrade script does not write to your existing installation.
The upgrade script will upgrade the TWiki core only. Plugins will need to be upgraded separately.
Note: To upgrade from a Beta, do not use UpgradeTWiki. Instead follow the steps outlined in Upgrading a Beta, below.
It will:
UpgradeTwiki
script available, see TWiki:Codev.UpgradeTWiki
distro/
distro/
new_twiki
. This directory must not already exist.
distro/
and run: ./UpgradeTwiki <full path to existing_twiki's setlib.cfg> <full path to new_twiki>
configure
script
UpgradeTwiki
will give you the final instructions.
Visit TWiki:Codev.KnownIssuesOfTWiki04x00x00 and fix known issues that apply to you.
There are a few points worth noting:
UpgradeTwiki
may not be able to merge all the changes you made in your existing TWiki into the new installation, but it will tell you which ones it couldn't deal with
UpgradeTwiki
creates the new installation in a new directory tree. It makes a complete copy of all your existing data, so: data/
directory in your existing installation, these are reproduced as actual directories in the new structure. It is up to you to pull these sub-directories out again and re-symlink as needed
UpgradeTwiki
doesn't deal with custom templates or Plugins, you will have to reinstall these in the new installation.
tools/upgrade_emails.pl
.
find data -name '*,v' -exec rcs -r -u -M '{}' \;
find pub -name '*,v' -exec rcs -r -u -M '{}' \;
configure
interface for the new install. configure
, then copy the new TWiki.cfg
to LocalSite.cfg
, and edit LocalSite.cfg
. Remove all the settings that you didn't change in your previous install, and change the remaining settings to the values from your old TWiki.cfg.
tools/upgrade_emails.pl
.
bin/LocalLib.cfg
and lib/LocalSite.cfg
files
* Set FAVICON = %PUBURLPATH%/%TWIKIWEB%/%WEBPREFSTOPIC%/favicon.ico
.htpasswd
files on the server. These files can be unique to TWiki, or can be shared with other applications (such as an Apache webserver). A variety of password encodings are supported for flexibility when re-using existing files. See the descriptive comments in the Security Settings section of the configure
interface for more details.
configure
interface.
none
in configure) TWiki::Client::TemplateLogin
in configure) configure
interface to TWiki::Client::TemplateLogin
login manager (on the Security Settings pane).
.htpasswd
files, check that a new line with the username and encrypted password is added to the .htpasswd
file. If not, you probably got a path wrong, or the permissions may not allow the webserver user to write to that file.
pub
area, unless they are only accessed through the viewfile
script. If your pub
directory is set up in the webserver to allow open access you may want to add .htaccess
files in there to restrict access.
name=""
parameter of the input tags must start with: "Twk0..."
(if this is an optional entry), or "Twk1..."
(if this is a required entry). This ensures that the fields are carried over into the user home page correctly.
TWiki::Client::ApacheLogin
in configure) REMOTE_USER
environment variable, which is set when you enable authentication in the webserver.
The advantage of this scheme is that if you have an existing website authentication scheme using Apache modules such as mod_auth_ldap
or mod_auth_mysql
you can just plug in directly to them.
The disadvantage is that because the user identity is cached in the browser, you can log in, but you can't log out again unless you restart the browser.
TWiki maps the REMOTE_USER
that was used to log in to the webserver to a WikiName using the table in TWikiUsers. This table is updated whenever a user registers, so users can choose not to register (in which case their webserver login name is used for their signature) or register (in which case that login name is mapped to their WikiName).
The same private .htpasswd
file used in TWiki Template Login can be used to authenticate Apache users, using the Apache Basic Authentication support. This allows the TWiki registration support to maintain usernames and passwords.
Warning: Do not use the Apache htpasswd
program with .htpasswd
files generated by TWiki! htpasswd
wipes out email addresses that TWiki plants in the info fields of this file.
mod_auth
TWiki::Client::ApacheLogin
login manager.
.htpasswd
entries.
.htaccess
file in the twiki/bin
directory.twiki/bin/.htaccess.txt
that you can copy and change. The comments in the file explain what need to be done..htaccess
does not have the desired effect, you may need to "AllowOverride All" for the directory in httpd.conf
(if you have root access; otherwise, e-mail web server support) pub
area, unless they are only accessed through the viewfile
script. If your pub
directory is set up to allow open access you may want to add .htaccess
files in there as well to restrict access
name=""
parameter of the input tags must start with: "Twk0..."
(if this is an optional entry), or "Twk1..."
(if this is a required entry). This ensures that the fields are carried over into the user home page correctly. .htpasswd
file. If not, you may have got a path wrong, or the permissions may not allow the webserver user to write to that file.
bin/logon
script accomplishes this. The bin/logon
script must be setup in the bin/.htaccess
file to be a script which requires a valid user
. However, once authenticated, it will simply redirect the user to the view URL for the page from which the logon
script was linked.
%SESSION_VARIABLE{ "varName" }% %SESSION_VARIABLE{ "varName" set="varValue" }% %SESSION_VARIABLE{ "varName" clear="" }%Note that you cannot override access controls preferences this way.
pthoeny
. This name is normally passed to TWiki by the REMOTE_USER
environment variable, and used internally. Login Usernames are maintained by your system administrator.
PeterThoeny
, is recorded when you register using TWikiRegistration; doing so also generates a personal home page in the Main web.
configure
. The default is to use your WikiName as a login name.
NOTE: To correctly enter a WikiName - your own or someone else's - be sure to include the Main web name in front of the Wiki username, followed by a period, and no spaces, for exampleMain.WikiUsername
or%MAINWEB%.WikiUsername
. This pointsWikiUsername
to the Main web, where user home pages are located, no matter which web it's entered in. Without the web prefix, the name appears as a NewTopic? everywhere but in the Main web.
TWiki/ChangePassword
)
TWiki/ResetPassword
)
TWiki/ChangeEmailAddress
)
configure
.htaccess
Web | Sitemap | VIEW | CHANGE | RENAME | |||
---|---|---|---|---|---|---|---|
Listed | DENY | ALLOW | DENY | ALLOW | DENY | ALLOW | |
Main ... | on | TWikiAdminGroup, TWikiRegistrationAgent? | TWikiAdminGroup | ||||
TWiki ... | on | TWikiAdminGroup | TWikiAdminGroup | ||||
GradStudentGuide ... | on | ||||||
Sandbox ... | on | ||||||
WelcomeToExeter ... | on | ||||||
Zen ... | on |
Main
web, such as the TWikiAdminGroup. To create a new group, visit TWikiGroups and enter the name of the new group ending in Group
into the "new group" form field. This will create a new group topic with two important settings: Set GROUP = < list of Users and/or Groups >
Set ALLOWTOPICCHANGE = < list of Users and/or Groups >
Set GROUP = Main.SomeUser, Main.OtherUser, Main.SomeGroup
Set ALLOWTOPICCHANGE = Main.TWikiAdminGroup
TWikiAdminGroup
. The name of this topic is defined by the {SuperAdminGroup} configure setting. Example group setting: Set GROUP= Main.ElizabethWindsor, Main.TonyBlair
Set DENYWEBVIEW = < comma-delimited list of Users and Groups >
Set ALLOWWEBVIEW = < comma-delimited list of Users and Groups >
Set DENYWEBCHANGE = < comma-delimited list of Users and Groups >
Set ALLOWWEBCHANGE = < comma-delimited list of Users and Groups >
Set DENYWEBRENAME = < comma-delimited list of Users and Groups >
Set ALLOWWEBRENAME = < comma-delimited list of Users and Groups >
Set ALLOWWEBVIEW =
Set DENYWEBVIEW =
Set DENYTOPICVIEW = < comma-delimited list of Users and Groups >
Set ALLOWTOPICVIEW = < comma-delimited list of Users and Groups >
Set DENYTOPICCHANGE = < comma-delimited list of Users and Groups >
Set ALLOWTOPICCHANGE = < comma-delimited list of Users and Groups >
Set DENYTOPICRENAME = < comma-delimited list of Users and Groups >
Set ALLOWTOPICRENAME = < comma-delimited list of Users and Groups >
Set ALLOWTOPICVIEW =
Set DENYTOPICVIEW =
mod_rewrite
module, and configure your webserver to redirect accesses to attachments to the TWiki viewfile
script. For example,
ScriptAlias /twiki/bin/ /filesystem/path/to/twiki/bin/ Alias /twiki/pub/ /filesystem/path/to/twiki/pub/ RewriteEngine on RewriteCond %{REQUEST_URI} !^/+twiki/+pub/+TWiki/+.+ RewriteRule ^/+twiki/+pub/+([^/]+)/+((([^/]+)/+)+)(.+) /twiki/bin/viewfile/$1/$4?filename=$5 [L,PT] </verbatim That way all the controls that apply to the topic also apply to attachments to the topic. Other types of webserver have similar support. __Note:__ Images embedded in topics will load much slower since each image will be delivered by the =viewfile= script. ---+++ How TWiki evaluates ALLOW/DENY settings When deciding whether to grant access, TWiki evaluates the following rules in order (read from the top of the list; if the logic arrives at *PERMITTED* or *DENIED* that applies immediately and no more rules are applied). You need to read the rules bearing in mind that VIEW, CHANGE and RENAME access may be granted/denied separately. 1 If the user is a [[#SuperAdminGroup][super-user]] * access is *PERMITTED*. 1 If DENYTOPIC is set to a list of wikinames * people in the list will be *DENIED*. 1 If DENYTOPIC is set to _empty_ ( i.e. <tt>Set DENYTOPIC =</tt> ) * access is *PERMITTED* _i.e_ no-one is denied access to this topic 1 If ALLOWTOPIC is set 1 people in the list are *PERMITTED* 1 everyone else is *DENIED* * Note that this means that setting ALLOWTOPIC to empty _denies access to everyone except admins_ (unless DENYTOPIC is also set to empty, as described above) 1 If DENYWEB is set to a list of wikiname * people in the list are *DENIED* access 1 If ALLOWWEB is set to a list of wikinames * people in the list will be *PERMITTED* * everyone else will be *DENIED* * Note that setting ALLOWWEB to empty _denies access to everyone except admins_ 1 If you got this far, access is *PERMITTED* ---++ Access Control quick recipes ---+++ Obfuscating Webs Another way of hiding webs is to keep them hidden by not publishing the URL and by preventing the ==all webs== search option from accessing obfuscated webs. Do so by enabling the ==NOSEARCHALL== variable in %WEBPREFSTOPIC%: * ==Set <nop>NOSEARCHALL = on== This setup can be useful to hide a new web until content its ready for deployment, or to hide view access restricted webs. __%X% Note:__ Obfuscating a web without view access control is *very* insecure, as anyone who knows the URL can access the web. ---+++ Authenticate all Webs and Restrict Selected Webs Use the following setup to authenticate users for topic viewing in all webs and to restrict access to selected webs. Requires TWikiUserAuthentication to be enabled. 1. *Restrict* view access to selected Users and Groups. Set one or both of these variables in its %WEBPREFSTOPIC% topic: * ==Set <nop>DENYWEBVIEW = < list of Users and Groups >== * ==Set <nop>ALLOWWEBVIEW = < list of Users and Groups >== * __Note:__ =DENYWEBVIEW= is evaluated before =ALLOWWEBVIEW=. Access is denied if the authenticated person is in the =DENYWEBVIEW= list, or not in the =ALLOWWEBVIEW= list. Access is granted in case =DENYWEBVIEW= and =ALLOWWEBVIEW= is not defined. ---+++ Authenticate and Restrict Selected Webs Only Use the following setup to provide unrestricted viewing access to open webs, with authentication only on selected webs. Requires TWikiUserAuthentication to be enabled. 1. *Restrict* view access to selected Users and Groups. Set one or both of these variables in its %WEBPREFSTOPIC% topic: * ==Set <nop>DENYWEBVIEW = < list of Users and Groups >== * ==Set <nop>ALLOWWEBVIEW = < list of Users and Groups >== * __Note:__ =DENYWEBVIEW= is evaluated before =ALLOWWEBVIEW=. Access is denied if the authenticated person is in the =DENYWEBVIEW= list, or not in the =ALLOWWEBVIEW= list. Access is granted in case =DENYWEBVIEW= and =ALLOWWEBVIEW= is not defined. ---+++ Hide Control Settings __%T% Tip:__ To hide access control settings from normal browser viewing, place them in HTML comment markers. <blockquote> ==<!--== <br /> == * Set <nop>DENYTOPICCHANGE = %MAINWEB%.<nop>SomeGroup== <br /> ==-->== </blockquote>
Formatting Command: | You write: | You get: | |||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Paragraphs: Blank lines will create new paragraphs. |
1st paragraph 2nd paragraph | 1st paragraph 2nd paragraph | |||||||||||||||||||||||||
Headings: Three or more dashes at the beginning of a line, followed by plus signs and the heading text. One plus creates a top level heading, two pluses a second level heading, etc. The maximum heading depth is 6. You can create a table of contents with the %TOC% variable. If you want to exclude a heading from the TOC, put !! after the ---+ .
![]() |
---++ Sushi ---+++ Maguro ---+++!! Not in TOC |
SushiMaguroNot in TOC |
|||||||||||||||||||||||||
Bold Text: Words get shown in bold by enclosing them in * asterisks.
|
*Bold* | Bold | |||||||||||||||||||||||||
Italic Text: Words get shown in italic by enclosing them in _ underscores.
|
_Italic_ | Italic | |||||||||||||||||||||||||
Bold Italic: Words get shown in bold italic by enclosing them in __ double-underscores.
|
__Bold italic__ | Bold italic | |||||||||||||||||||||||||
Fixed Font: Words get shown in fixed font by enclosing them in = equal signs.
|
=Fixed font= |
Fixed font
|
|||||||||||||||||||||||||
Bold Fixed Font: Words get shown in bold fixed font by enclosing them in double equal signs.
|
==Bold fixed== |
Bold fixed
|
|||||||||||||||||||||||||
![]() * _ __ = == ) indicator
with normal punctuation, such as commas and full stops.
![]() |
_This works_, _this does not _ |
This works, _this does not _ |
|||||||||||||||||||||||||
Verbatim (Literal) Text: Surround code excerpts and other formatted text with <verbatim> and </verbatim> tags.![]() verbatim tags disable HTML code. Use <pre> and </pre> tags instead if you want the HTML code within the tags to be interpreted.![]() |
<verbatim> class CatAnimal { void purr() { <code here> } } </verbatim> |
class CatAnimal { void purr() { <code here> } } |
|||||||||||||||||||||||||
Separator (Horizontal Rule): Three or more three dashes at the beginning of a line.. |
------- |
|
|||||||||||||||||||||||||
Bulleted List: Multiple of three spaces, an asterisk, and another space. ![]() |
* level 1 * level 2 * back on 1 * A bullet broken over three lines * last bullet |
|
|||||||||||||||||||||||||
Numbered List: Multiple of three spaces, a type character, a dot, and another space. Several types are available besides a number:
|
1. Sushi 1. Dim Sum 1. Fondue A. Sushi A. Dim Sum A. Fondue i. Sushi i. Dim Sum i. Fondue |
|
|||||||||||||||||||||||||
Definition List: Three spaces, a dollar sign, the term, a colon, a space, followed by the definition. |
$ Sushi: Japan $ Dim Sum: S.F. |
|
|||||||||||||||||||||||||
Table: Each row of the table is a line containing of one or more cells. Each cell starts and ends with a vertical bar '|'. Any spaces at the beginning of a line are ignored.
![]() |^| multiple-span row functionality and additional rendering features
|
| *L* | *C* | *R* | | A2 | B2 | C2 | | A3 | B3 | C3 | | multi span ||| | A5-7 | 5 | 5 | |^| six | six | |^| seven | seven | | split\ | over\ | 3 lines | | A9 | B9 | C9 | |
|
|||||||||||||||||||||||||
WikiWord Links: CapitalizedWordsStuckTogether (or WikiWords) will produce a link automatically if preceded by whitespace or parenthesis. ![]() Otherweb.TopicName . ![]() |
WebStatistics Sandbox.WebNotify Sandbox.WebHome | WebStatistics WebNotify Sandbox | |||||||||||||||||||||||||
Anchors: You can define a reference inside a TWiki topic (called an anchor name) and link to that. To define an anchor write #AnchorName at the beginning of a line. The anchor name must be a WikiWord. To link to an anchor name use the [[MyTopic#MyAnchor]] syntax. You can omit the topic name if you want to link within the same topic.
|
[[WikiWord#NotThere]] [[#MyAnchor][Jump]] #MyAnchor To here | WikiWord#NotThere Jump To here | |||||||||||||||||||||||||
Forced Links: You can create a forced internal link by enclosing words in double square brackets. Text within the brackets may contain optional spaces; the topic name is formed by capitalizing the initial letter and by removing the spaces; for example, [[text formatting FAQ]] links to topic TextFormattingFAQ. You can also refer to a different web and use anchors.
![]() |
[[wiki syntax]] [[Main.TWiki users]] escaped: ![[wiki syntax]] | wiki syntax Main.TWiki users escaped: [[wiki syntax]] | |||||||||||||||||||||||||
Specific Links: You can create a link where you specify the link text and the URL separately using nested square brackets [[reference][text]] . Internal link references (e.g. WikiSyntax) and URLs (e.g. http://TWiki.org/) are both supported.
The rules described under Forced Links apply for internal link references.
![]() |
[[WikiSyntax][wiki syntax]] [[http://gnu.org][GNU]] | wiki syntax GNU | |||||||||||||||||||||||||
Prevent a Link: Prevent a WikiWord from being linked by prepending it with an exclamation point. |
!SunOS | SunOS | |||||||||||||||||||||||||
Disable Links: You can disable automatic linking of WikiWords by surrounding text with <noautolink> and </noautolink> tags.![]() |
<noautolink> RedHat & SuSE </noautolink> | RedHat & SuSE | |||||||||||||||||||||||||
Mailto Links: E-mail addresses are linked automatically. To create e-mail links that have more descriptive link text, specify subject lines or message bodies, or omit the e-mail address, you can write [[mailto:user@domain][descriptive text]] .
|
a@b.com [[mailto:a@b.com]\ [Mail]] [[mailto:?subject=\ Hi][Hi]] | a@b.com Mail Hi |
<strike>deleted text</strike>
to get <body>
and </body>
tags.
<p />
paragraph tags on empty lines, which causes problems if done between HTML tags that do not allow paragraph tags, like for example between table tags.
<...>
- of an HTML tag are on the same line, or the tag will be broken.
<script>
tags for your TWiki applications. However note that your TWiki administrator can disable <script>
in topics, and may have chosen to do so for security considerations. TWiki markup and TWikiVariables are not expanded inside script tags.
http://...
, https://...
, ftp://...
, gopher://...
, news://...
, file://...
, telnet://...
and mailto:...@...
are linked automatically.
name@domain.com
are linked automatically.
[[Square bracket rules]]
let you easily create non-WikiWord links. [[http://yahoo.com Yahoo home page]]
as an easier way of doing external links with descriptive text for the link, such as Yahoo home page.
%
that are expanded on the fly. Some variables take arguments, such as %INCLUDE%
. For those variables, the arguments are included in curly braces ({ and }).
Variable | In brief | Full documentation |
---|---|---|
%TOC% | Automatically generates a table of contents based on headings in a topic - see the top of this page for an example. | VarTOC |
%WEB% | The current web, is TWiki. | VarWEB |
%TOPIC% | The current topic name, is TWikiDocumentation. | VarTOPIC |
%ATTACHURL% | The attachment URL of the current topic. Example usage: If you attach a file to a topic you can refer to it as %ATTACHURL%/image.gif to show the URL of the file or the image in your text. | VarATTACHURL |
%INCLUDE{"SomeTopic"}% | Server side include, includes another topic. The current web is the default web. Example: %INCLUDE{"TWiki.SiteMap"}% | VarINCLUDE |
%SEARCH{"sushi"}% | Inline search showing the search result embedded in a topic. FormattedSearch gives you control over formatting, useful for creating web-based applications. | VarSEARCH |
%BR%
to start a new line.
%RED% Red %ENDCOLOR% and %BLUE% blue %ENDCOLOR% colors
to get: Red and blue colors.
%ICON{"help"}%
, %ICON{"tip"|%
, and %icon{"warning"}%
to get: !%SOMEVARIABLE%
to get: %SOMEVARIABLE%.
%PLUGINDESCRIPTIONS%
:
"$SUM( $ABOVE() )"
to tables located in Astrophysics Wiki topics.ExternalSite:Page
text to external sites based on aliases defined in a rules topic :-)
for :cool:
for :cool:<filename>
is not displayed. How can I show it as it is? '<'
and '>'
characters have a special meaning in HTML, they define HTML tags. You need to escape them, so write '<'
instead of '<'
, and '>'
instead of '>'
. 'prog <filename>'
to get 'prog <filename>'
.
'&'
character sometimes not displayed? '&'
character has a special meaning in HTML, it starts a so called character entity, i.e. '©'
is the ©
copyright character. You need to escape '&'
to see it as it is, so write '&'
instead of '&'
. 'This & that'
to get 'This & that'
.
%VARIABLE%
or %VARIABLE{ parameter="value" }%
- that expand into content whenever a topic is rendered for viewing. There are two types of variables: %CALC{}%
variable)
%T%
to get %TOPIC%
to get TWikiVariables
(a predefined variable)
%CALC{ "$UPPER(Text)" }%
to get TEXT
(a variable defined by Plugin)
!%TOPIC%
to get %TOPIC%
%ALLVARIABLES%
to get a full listing of all variables defined for a particular topic
%MYVAR%
, %MyVar%
, %My2ndVar%
, and %My_Var%
are all valid variable names. Variables are case sensitive. %MyVAR%
and %MYVAR%
are not the same variable.
By convention all settings, predefined variables and variables used by plugins are always UPPER-CASE.
[multiple of 3 spaces] * [space] Set [space] VARIABLENAME [space] = [space] value
Examples:Spaces between the = sign and the value will be ignored. You can split a value over several lines by indenting following lines with spaces - as long as you don't try to use * as the first character on the following line.
Set VARIABLENAME = value
Set VARIABLENAME = value
Example:Whatever you include in your Variable will be expanded on display, exactly as if it had been entered directly.* Set VARIABLENAME = value starts here and continues here
Example: Create a custom logo variableYou can also set preferences variables on a topic by clicking the link
- To place a logo anywhere in a web by typing
%MYLOGO%
, define the Variable on the web's WebPreferences topic, and upload a logo file, ex:mylogo.gif
. You can upload by attaching the file to WebPreferences, or, to avoid clutter, to any other topic in the same web, e.g.LogoTopic
. Sample variable setting in WebPreferences:
Set MYLOGO = %PUBURL%/%WEB%/LogoTopic/mylogo.gif
Edit topic preference settings
under More topic actions
. Preferences set in this manner are not visible in the topic text, but take effect nevertheless.
Local
in place of Set
in the variable definition. For example, if the user sets the following in their home topic:
* Set EDITBOXHEIGHT = 10 * Local EDITBOXHEIGHT = 20Then when they are editing any other topic, they will get a 10 high edit box. However when they are editing their home topic, they will get a 20 high edit box.
Local
can be used wherever a preference needs to take a different value depending on where the current operation is being performed.
Use this powerful feature with great care! %ALLVARIABLES%
can be used to get a listing of the values of all variables in their evaluation order, so you can see variable scope if you get confused.
%BR%
- line break
%BULLET%
- bullet sign
%BB%
- line break and bullet combined
%BB2%
- indented line break and bullet
%RED% text %ENDCOLOR%
- colored text (also %YELLOW%
, %ORANGE%
, %PINK%
, %PURPLE%
, %TEAL%
, %NAVY%
, %BLUE%
, %AQUA%
, %LIME%
, %GREEN%
, %OLIVE%
, %MAROON%
, %BROWN%
, %BLACK%
, %GRAY%
, %SILVER%
, %WHITE%
)
%H%
- %I%
- %M%
- %N%
- %P%
- %Q%
- %S%
- %T%
- %U%
- %X%
- %Y%
- %SEARCH%
, are powerful and general tools.
%INCLUDINGTOPIC%
, %INCLUDE%
, and the mighty %SEARCH%
.
%ACTIVATEDPLUGINS%
%ALLVARIABLES%
%ATTACHURL%
https://wiki.astro.ex.ac.uk/pub/TWiki/VarATTACHURL
%ATTACHURL%/image.gif
%ATTACHURLPATH%
/pub/TWiki/VarATTACHURLPATH
configure
. This is used in certain password encodings, and in login templates as part of the login prompt.
%AUTHREALM%
%TOPIC%
if there is no INCLUDE
%BASETOPIC%
%WEB%
in case there is no include.
%BASEWEB%
%DATE%
30 Sep 2023
%DISPLAYTIME%
30 Sep 2023 - 13:44
%GMTIME%
%DISPLAYTIME{"format"}%
%DISPLAYTIME{"$hou:$min"}%
expands to 13:44
"\n"
) and linefeed ("\r"
)
"<"
, ">"
, "&"
, single quote ('
) and double quote ("
)
"%"
, "["
, "]"
, "@"
, "_"
, "*"
, "="
and "|"
%ENCODE{"string"}%
Parameter: | Description: | Default: |
---|---|---|
"string" | String to encode | required (can be empty) |
type="entity" | Encode special characters into HTML entities, like a double quote into " | URL encoding |
type="url" | Encode special characters for URL parameter use, like a double quote into %22 | (this is the default) |
%ENCODE{"spaced name"}%
expands to spaced%20name
<input type="text" name="address" value="%ENCODE{ "any text" type="entity" }%" />
%ENDSECTION{"name"}%
%ENDSECTION{type="include"}%
Parameter: | Description: |
---|---|
"name" | Name of the section. |
type="..." | Type of the section being terminated; supported types "section" , "include" , "templateonly" . |
STARTSECTION
is named, the corresponding ENDSECTION
must also be named with the same name. If the STARTSECTION
specifies a type, then the corresponding ENDSECTION
must also specify the same type. If the section is unnamed, ENDSECTION
will match with the nearest unnamed %STARTSECTION%
of the same type above it.
%FAILEDPLUGINS%
%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 |
format="..." | Format string. $value expands to the field value, and $title expands to the field title | "$value" |
default="..." | Text shown when no value is defined for the field | "" |
alttext="..." | Text shown when field is not found in the form | "" |
%FORMFIELD{"ProjectName" topic="Projects.SushiProject" default="(not set)" alttext="ProjectName field found"}%
%GMTIME%
30 Sep 2023 - 13:44
%GMTIME{"format"}%
Variable: | Unit: | Example |
---|---|---|
$seconds | seconds | 59 |
$minutes | minutes | 59 |
$hours | hours | 23 |
$day | day of month | 31 |
$wday | day of the Week (Sun, Mon, Tue, Wed, Thu, Fri, Sat) | Thu |
$dow | day of the week (Sun = 0) | 2 |
$week | number of week in year (ISO 8601) | 34 |
$month | month in ISO format | Dec |
$mo | 2 digit month | 12 |
$year | 4 digit year | 1999 |
$ye | 2 digit year | 99 |
$tz | either "GMT" (if set to gmtime), or "Local" (if set to servertime) | GMT |
$iso | ISO format timestamp | 2023-09-30T13:44:28Z |
$rcs | RCS format timestamp | 2023/09/30 13:44:28 |
$http | E-mail & http format timestamp | Sat, 30 Sep 2023 13:44:28 GMT |
$epoch | Number of seconds since 00:00 on 1st January, 1970 | 1696081468 |
%GMTIME{"$day $month, $year - $hour:$min:$sec"}%
expands to 30 Sep, 2023 - 13:44:28
%GROUPS%
%HOMETOPIC%
WebHome
, renders as WebHome
%HTTP%
%HTTP{"Header-name"}%
%HTTP% | |
%HTTP{"Accept-language"}% | en-US,en;q=0.5 |
%HTTP{"User-Agent"}% | CCBot/2.0 (https://commoncrawl.org/faq/) |
%HTTP_HOST%
wiki.astro.ex.ac.uk
%HTTP%
but operates on the HTTPS environment variables present when the SSL protocol is in effect. Can be used to determine whether SSL is turned on.
%HTTPS%
%HTTPS{"Header-name"}%
%ICON{"name"}%
%ICON{"flag-gray"}%
returns %ICON{"pdf"}%
returns %ICON{"smile.pdf"}%
returns %ICON{"/dont/you/dare/smile.pdf"}%
returns %ICON{"http://twiki.org/doc/xhtml.xsl"}%
returns arrowbright
, bubble
, choice-yes
, hand
bmp
, doc
, gif
, hlp
, html
, mp3
, pdf
, ppt
, txt
, xls
, xml
, zip
%ICON{"name"}%
generates the full HTML img tag. Specify image name or full filename (see ICON for details on filenames.)
%ICONURL{"name"}%
%ICONURL{"arrowbright"}%
returns https://wiki.astro.ex.ac.uk/pub/TWiki/TWikiDocGraphics/arrowbright.gif
%ICONURL{"novel.pdf"}%
returns https://wiki.astro.ex.ac.uk/pub/TWiki/TWikiDocGraphics/pdf.gif
%ICONURL{"/queen/boheme.mp3"}%
returns https://wiki.astro.ex.ac.uk/pub/TWiki/TWikiDocGraphics/mp3.gif
%ICONURLPATH{"name"}%
%ICONURLPATH{"locktopic"}%
returns /pub/TWiki/TWikiDocGraphics/locktopic.gif
%ICONURLPATH{"eggysmell.xml"}%
returns /pub/TWiki/TWikiDocGraphics/xml.gif
%ICONURLPATH{"/doc/xhtml.xsl"}%
returns /pub/TWiki/TWikiDocGraphics/xsl.gif
%IF{"CONDITION" then="THEN" else="ELSE"}%
shows "THEN"
if "CONDITION"
evaluates to TRUE
, otherwise "ELSE"
will be shown
%IF{"defined FUNFACTOR" then="FUNFACTOR is defined" else=" is not defined"}%
renders as ==
%INCLUDE{"page" ...}%
Parameter: | Description: | Default: |
---|---|---|
"SomeTopic" | The name of a topic located in the current web, i.e. %INCLUDE{"WebNotify"}% | |
"Web.Topic" | A topic in another web, i.e. %INCLUDE{"TWiki.SiteMap"}% | |
"http://..." | A full qualified URL, i.e. %INCLUDE{"http://twiki.org:80/index.html"}% . Supported content types are text/html and text/plain . ![]() | |
pattern="..." | A RegularExpression pattern to include a subset of a topic or page | none |
rev="2" | Include a previous topic revision; N/A for URLs | top revision |
raw="on" | When a page is included, normally Astrophysics Wiki will process it, doing the following: 1) Alter relative links to point back to originating host, 2) Remove some basic HTML tags (html, head, body, script) and finally 3) Remove newlines from tags spanning multiple lines. If you prefer to include exactly what is in the source of the originating page set this to on . | disabled |
warn="off" | Warn if topic include fails: Fail silently (if off ); output default warning (if set to on ); else, output specific text (use $topic for topic name) | %INCLUDEWARNING% preferences setting |
section="name" | Includes only the specified named section, as defined in the included topic by the STARTSECTION and ENDSECTION variables | |
PARONE="val 1" | Any other parameter will be defined as a variable within the scope of the included topic. The example parameters on the left will result in %PARONE% and %PARTWO% being defined within the included topic. |
raw
parameter)
%TOPIC%
in case there is no include
%INCLUDINGTOPIC%
%WEB%
if there is no INCLUDE.
%INCLUDINGWEB%
LANGUAGE
preference is set, it's used as user's language instead of any language detected from the browser.
LANGUAGE
at a non per-user way, so each user can choose his/her preferred language.
PO
files) to TWiki. Those are the languages in which TWiki's user interface is available.
%LANGUAGES{...}%
Parameter: | Description: | Default: |
---|---|---|
format | format for each item. See below for variables available in the format string. | " * $langname" |
separator | separator between items. | "\n" (newline) |
marker="selected" | Text for $marker if the item matches selection | "selected" |
selection="%LANGUAGE%" | Current language to be selected in list | (none) |
format
variables: Variable | Meaning |
---|---|
$langname | language's name, as informed by the translators |
$langtag | language's tag. Ex: en , pt-br , etc. |
<select>%LANGUAGES{format="<option $marker value='$langtag'>$langname</option>" selection="%LANGUAGE%"}%</select>
creates an option list of the available languages with the current language selected
%LOCALSITEPREFS%
Main.TWikiPreferences
, renders as TWikiPreferences
%LOGIN%
%LOGOUT%
%MAINWEB%
Main
%MAKETEXT{"string" args="..."}
Parameter | Description | Default |
---|---|---|
"text" or string="text" | The text to be displayed. | none |
args="param1, param2" | a comma-separated list of arguments to be interpolated in the string, replacing the [_N] placeholders in it. | none |
%MAKETEXT{string="Notes:"}%
%MAKETEXT{"If you have any questions, please contact [_1]." args="%WIKIWEBMASTER%"}%
%MAKETEXT{"Did you want to [[[_1]][reset [_2]'s password]]?" args="%TWIKIWEB%.ResetPassword,%WIKIUSERNAME%"}%
string
to the current user's language only if it has such string in its translation table for that language.
&
) followed by one letter (one of a...z, A...Z) (say, X
) in the translatable string will be translated to <span class='twikiAccessKey'>X</span>
. This is used to implement access keys. If you want to write an actual amperstand that stays just before a letter, write two consecutive amperstands (&&
): they will be transformed in just one.
_
) are reserved. You cannot use translatable phrases starting with an underscore.
%VARIABLES%
inside the translatable strings (since they will get expanded before the %MAKETEXT{...}%
itself is handled).
formfield
item is the most likely to be useful to casual users.
%META{ "item" ...}%
Item | Options | Description |
---|---|---|
"formfield" | name="..." - name of the field. The field value can be shortened as described in FormattedSearch for $formfield | Show a single form field |
"form" | none | Generates the table showing the form fields. See Form Templates |
"attachments" | all="on" to show hidden attachments | Generates the table showing the attachments |
"moved" | none | Details of any topic moves |
"parent" | dontrecurse="on" : By default recurses up tree, this has some cost. nowebhome="on" : Suppress WebHome. prefix="..." : Prefix that goes before parents, but only if there are parents, default "" . format="..." : format string used to display each partent topic, default "[[$web.$topic][$topic]]" suffix="..." : Suffix, only appears if there are parents, default "" . separator="..." : Separator between parents, default " > " . | Generates the parent link |
%METASEARCH{...}%
Parameter: | Description: | Default: |
---|---|---|
type="topicmoved" | What sort of search is required? "topicmoved" if search for a topic that may have been moved "parent" if searching for topics that have a specific parent i.e. its children "field" if searching for topics that have a particular form field value (use the name and value parameters to specify which field to search) | required |
web="%WEB%" | Wiki web to search: A web, a list of webs separated by whitespace, or all webs. | current web |
topic="%TOPIC%" | The topic the search relates to, for topicmoved and parent searches | current topic |
name | form field to search, for field type searches. May be a regular expression (see SEARCH). | |
value | form field value, for field type searches. May be a regular expression (see SEARCH). | |
title="Title" | Text that is prefixed to any search results | empty |
default="none" | Default text shown if no search hit | empty |
%METASEARCH{type="topicmoved" web="%WEB%" topic="%TOPIC%" title="This topic used to exist and was moved to: "}%
%METASEARCH{type="parent" web="%WEB%" topic="%TOPIC%" title="Children: "}%
%METASEARCH{type="field" name="Country" value="China"}%
%NOP%
%NOP{...}%
deprecated %STARTSECTION{type="templateonly"}%
.. %ENDSECTION{type="templateonly"}%
instead (see TWikiTemplates for more details).
%NOTIFYTOPIC%
WebNotify
, renders as WebNotify
%PLUGINDESCRIPTIONS%
"$SUM( $ABOVE() )"
to tables located in Astrophysics Wiki topics.ExternalSite:Page
text to external sites based on aliases defined in a rules topic :-)
for :cool:
for :cool:%PLUGINVERSION{"name"}%
to get the version of a specific plugin
%PLUGINVERSION{"InterwikiPlugin"}%
expands to $Rev: 8329$
%PLUGINVERSION%
to get the version of the API
1.1
%PUBURL%
https://wiki.astro.ex.ac.uk/pub
%PUBURL%/%WEB%/OtherTopic/image.gif
%PUBURLPATH%
/pub
%URLPARAM{}%
.
%QUERYSTRING%
rev=47;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;amp=;sortcol=1;table=2;up=0
%REMOTE_ADDR%
44.200.101.84
%REMOTE_PORT%
35964
%REMOTE_USER%
%REVINFO%
r1 - 25 Jun 2006 - 16:26:29 - TWikiContributor
%REVINFO{"format"}%
Parameter: | Description: | Default: |
---|---|---|
"format" | Format of revision information, see supported variables below | "r1.$rev - $date - $wikiusername" |
web="..." | Name of web | Current web |
topic="..." | Topic name | Current topic |
rev="1.5" | Specific revison number | Latest revision |
Variable: | Unit: | Example |
---|---|---|
$web | Name of web | Current web |
$topic | Topic name | Current topic |
$rev | Revison number. Prefix r1. to get the usual r1.5 format | 5 |
$date | Revision date | 11 Jul 2004 |
$time | Revision time | 23:24:25 |
$username | Login username of revision | jsmith |
$wikiname | WikiName of revision | JohnSmith |
$wikiusername | WikiName with Main web prefix | Main.JohnSmith |
%REVINFO{"$date - $wikiusername" rev="1.1"}%
returns revision info of first revision
viewauth.cgi
)
%SCRIPTNAME%
view
.pl
or .cgi
%SCRIPTSUFFIX%
%SCRIPTURL%
https://wiki.astro.ex.ac.uk/bin
%SCRIPTURL{"script"}%
https://wiki.astro.ex.ac.uk/bin/script
%SCRIPTURL{"viewauth"}%/%WEB%/%TOPIC%
which expands to https://wiki.astro.ex.ac.uk/bin/viewauth/TWiki/TWikiVariables
%SCRIPTURLPATH{"script"}%
instead, as it works with URL rewriting much better
%SCRIPTURL%
, but doesn't include the protocol and host part of the URL
%SCRIPTURLPATH%
/bin
%SCRIPTURL{"script"}%
, but doesn't include the protocol and host part of the URL
%SCRIPTURLPATH{"script"}%
/bin/script
%SEARCH{"text" ...}%
Parameter: | Description: | Default: |
---|---|---|
"text" | Search term. Is a keyword search, literal search or regular expression search, 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 |
type="keyword" type="literal" type="regex" | Do a keyword search like soap "web service" -shampoo ; a literal search like web service ; or RegularExpression search like soap;web service;!shampoo | %SEARCHVAR- DEFAULTTYPE% preferences setting (literal) |
scope="topic" scope="text" scope="all" | Search topic name (title); the text (body) of topic; or all (both) | "text" |
order="topic" order="created" order="modified" order="editby" order= | Sort the results of search by the topic names, topic creation time, last modified time, last editor, 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). | Sort by topic name |
limit="all" limit="16" | Limit the number of results returned. This is done after sorting if order is specified | All results |
date="..." | limits the results to those pages with latest edit time in the given TimeInterval. | 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 search header Topics: Changed: By: | Show search header, unless seach 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 |
header="..." format="..." | Custom format results: see FormattedSearch for usage, variables & examples | Results in table |
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 the format="" parameter contains a $pattern() that captures more than one line, i.e. contents of a textfield in a form. | "$n" (Newline) |
%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%" }%
%SERVERTIME%
30 Sep 2023 - 14:44
%GMTIME%
%SERVERTIME{"format"}%
%SERVERTIME{"$hou:$min"}%
expands to 14:44
%SESSIONID%
%SESSIONVAR%
%SESSION_VARIABLE{"name"}%
%SESSION_VARIABLE{"name" set="value"}%
%SESSION_VARIABLE{"name" clear=""}%
AUTHUSER
session variable, and is read-only
%SPACEDTOPIC%
Var%20*SPACEDTOPIC
%ENCODE{%SPACEOUT{"%TOPIC%" separator=" *"}%}%
%SPACEOUT{ "%TOPIC%" }%
TWiki Variables
Parameter: | Description: | Default: |
---|---|---|
separator | The separator to put between words e.g. %SPACEOUT{"DogsCatsBudgies" separator=", "}% -> Dogs, Cats, Budgies | ' ' |
[[WebHome][%SPACEOUT{"WebHome"}%]]
expands to Web Home
%STOPINCLUDE%
variable. A normal view of the topic shows everything exept the %STARTINCLUDE%
variable itself.
%STARTSECTION{type="include"}%
instead
%STARTINCLUDE%
%STARTSECTION{}%
and %ENDSECTION{}%
.
type="section"
- the default, used for a generic section, such as a named section used by INCLUDE.
type="include"
- like %STARTINCLUDE%
... %STOPINCLUDE%
except that you can have as many include blocks as you want (%STARTINCLUDE%
is restricted to only one).
type="templateonly"
- start position of text to be removed when a template topic is used. This is used to embed text that you do not want expanded when a new topic based on the template topic is created. See TWikiTemplates for more information.
%STARTSECTION{"name"}% ................ %ENDSECTION{"name"}%
%STARTSECTION{type="include"}% ........ %ENDSECTION{type="include"}%
%STARTSECTION{type="templateonly"}% ... %ENDSECTION{type="templateonly"}%
Parameter: | Description: | Default |
---|---|---|
"name" | Name of the section. Must be unique inside a topic. | Generated name |
type="..." | Type of the section; type "section" , "include" or "templateonly" | "section" |
_SECTION0
for the first unnamed section in the topic, _SECTION1
for the second, etc..
%STATISTICSTOPIC%
WebStatistics
, renders as WebStatistics
%STOPINCLUDE%
variable itself.
%STOPINCLUDE%
%TOC%
"---++ text"
) and HTML ("<h2>text</h2>"
) are taken into account. Any heading text after "!!"
is excluded from the TOC; for example, write "---+!! text"
if you do not want to list a header in the TOC
%TOC{"SomeTopic" ...}%