| Required Server Environment | ||
|---|---|---|
| Resource | Unix | Windows* |
| Perl | 5.005_03 or higher | |
| Non-standard Perl modules | Net::SMTP (or sendmail) | Net::SMTP, MIME::Base64, Digest::SHA1 |
| RCS | 5.7 or higher | |
| Other external programs | ls, fgrep, egrep | |
| Web server | Apache; others (with CGI support, authentication, extended path) | |
/home/httpd/twiki and unziptwiki/bin directory of TWiki must be set as a cgi-bin directory. Add /home/httpd/twiki/bin to file /etc/httpd/httpd.conf with only ExecCGI option.
twiki/pub directory of TWiki must be set so that it is visible as a URL. Add /home/httpd/twiki to file httpd.conf with normal access options (copy from /home/httpd/html ).
ScriptAlias for /twiki/bin and Alias for /twiki to file httpd.conf .
ScriptAlias must come before the Alias, otherwise, Apache will fail to correctly set up /twiki/bin/, by treating it as just another subdirectory of the /twiki/ alias.
twiki/data and twiki/templates directories should be set so that they are not visible as URLs. Add them to httpd.conf with deny from all.
Examplehttpd.confentries:ScriptAlias /twiki/bin/ "/home/httpd/twiki/bin/" Alias /twiki/ "/home/httpd/twiki/" <Directory "/home/httpd/twiki/bin"> Options +ExecCGI SetHandler cgi-script Allow from all </Directory> <Directory "/home/httpd/twiki/pub"> Options FollowSymLinks +Includes AllowOverride None Allow from all </Directory> <Directory "/home/httpd/twiki/data"> deny from all </Directory> <Directory "/home/httpd/twiki/templates"> deny from all </Directory>
/etc/rc.d/rc5.d/S85httpd restart .
twiki/bin directory is CGI-enabled by trying visiting it in your browser:
bin directory, http://yourdomain.com/twiki/bin/.
"Forbidden. You don't have permission to access /twiki/bin/ on this server".
"Index of /twiki/bin" - recheck your httpd.conf file.
pub)
If you are not able to create the
TWiki dir: What it is: Where to copy: Example: twikistart-up pages root TWiki dir /home/smith/twiki/twiki/binCGI bin CGI-enabled dir /home/smith/twiki/bintwiki/liblibrary files same level as twiki/bin/home/smith/twiki/libtwiki/pubpublic files htdoc enabled dir /home/smith/twiki/pubtwiki/datatopic data dir secure from public access /home/smith/twiki/datatwiki/templatesweb templates dir secure from public access /home/smith/twiki/templates
twiki/lib directory at the same level as the twiki/bin directory (e.g. because CGI bin directories can't be under your home directory and you don't have root access), you can create this directory elsewhere and edit the setlib.cfg file in the bin directory:
# -------------- Change these settings if required
$twikiLibPath = '/some/other/path/lib'; # Path to lib directory containing TWiki.pm
You can also edit $localPerlLibPath in the setlib.cfg file if you are not root and need to install additional CPAN modules, but can't update the main Perl installation files on the server. Just set this variable to the full pathname to your local lib directory, typically under your home directory.
/usr/bin/perl. If it's elsewhere, change the path to Perl in the first line of each script in the twiki/bin directory, or create a symbolic link from /usr/bin/perl.
.cgi extension to run. Some systems need .pl, the regular Perl extension. Modify all twiki/bin script filenames if necessary.
twiki/bin directory as executable to -rwxr-xr-x (755).
.tmpl files it is necessary to chown and chgrp -R twiki so all the files have the owner you want.
nobody ownership for all files manipulated by the CGI scripts (executed by the Web server), and user twiki for all other files. You can:
nobody with another user if your server executes scripts under a different name (ex: default for Debian is www-data).
testenv script from your browser: http://yourdomain.com/twiki/bin/testenv. It will show you the user name of the CGI scripts, a table listing all CGI environment variables, and a test of your twiki/lib/TWiki.cfg configuration file (you'll configure that in a minute).
twiki with your own username
twiki/data so that they are writable by user nobody. A simple way is to chmod them to -rw-rw-r-- (664) and to chown them to nobody.
twiki/data directory and its subdirectories so that files in there are writable by user nobody. A simple way is to chmod them to drwxrwxr-x (775) and to chown them to nobody.
twiki/pub directory and all its subdirectories so that files in there are writable by user nobody. A simple way is to chmod them to drwxrwxr-x (775) and to chown them to nobody.
twiki/data/*/*.txt,v RCS repository files in the installation package are locked by user nobody. If your CGI scripts are not running as user nobody, it's not possible to check in files (you'll see that the revision number won't increase after saving a topic). In this case, you need to unlock all repository files (check the RCS man pages) and lock them with a different user, ex www-data, or delete them all - new files will be automatically created the first time each topic is edited. A simple way to change ownership is with a search-and-replace in all files; for example, using perl:
cd twiki/data perl -pi~ -e 's/nobody:/www-data:/' */*,v
twiki/lib/TWiki.cfg, setting the variables to your needs.
$scriptSuffix variable to cgi or pl if required.
$storeTopicImpl = "RcsWrap"; for the RCS executables and make sure RCS is installed. Set $rcsDir in twiki/lib/TWiki.cfg to match the location of your RCS binaries. You can check this by issuing the command rcs at the prompt, it should result in something like "rcs: no input file".
diff, by typing diff -v - an error indicates you have a non-GNU diff, so install the GNU diffutils package and make sure that diff is on the PATH used by TWiki (see $safeEnvPath in the TWiki.cfg file).
$storeTopicImpl = "RcsLite"; for the Perl based RCS
twiki/data , twiki/templates and all their subdirectories should be set so that they are not visible through URLs. (Alternatively, move the directories to a place where they are not visible, and change the variables in twiki/lib/TWiki.cfg accordingly)
testenv script from your browser: http://yourdomain.com/twiki/bin/testenv. Check if your twiki/lib/TWiki.cfg configuration file settings are correct.
WIKIWEBMASTER email address, and other email settings required for registration and WebChangesAlert to work:
WIKIWEBMASTER should be set to the email address of the TWiki administrator
SMTPMAILHOST is typically set on Windows or other non-Unix/Linux systems, where sendmail or similar is not available. When this is set and the Perl module Net::SMTP is installed, TWiki will connect to this SMTP server (e.g. mail.yourdomain.com) to send email for user registration and WebChangesAlerts. If you do have a sendmail-type program, leave SMTPMAILHOST unset so that the external sendmail program is used instead (defined by $mailProgram in TWiki.cfg).
SMTPSENDERHOST is optional, and set to the domain name sending the email (e.g. twiki.yourdomain.com). For use where the SMTP server requires that you identify the TWiki server sending mail. If not set, Net::SMTP will guess it for you.
http://yourdomain.com/twiki/bin/view and start TWiki-ing away!
http://yourdomain.com/twiki/ to get the pre-TWiki index.html page, with a link to the view script. Customize this page if you want a public intro screen with a login link, instead of immediately calling up the .htaccess login dialog by going directly to view.
WEBCOPYRIGHT messages, and other preferences.
%VARIABLES%. Define site-level variables in the TWikiPreferences topic. See also: TWikiVariables.
.htaccess.txt in the twiki/bin directory to .htaccess and change it to your needs. For details, consult the HTTP server documentation (for Apache server: [1], [2]). In particular, the following red part needs to be configured correctly: Redirect /urlpathto/twiki/index.html http://yourdomain.com/urlpathto/twiki/bin/view AuthUserFile /filepathto/twiki/data/.htpasswd ErrorDocument 401 /urlpathto/twiki/bin/oops/TWiki/TWikiRegistration?template=oopsauth
.cgi or .pl file extension to the bin scripts, make sure to do the same for edit, view, preview, and all the other script names in .htaccess.
.htaccess does not have the desired effect, you need to enable it: Add "AllowOverride All" to the Directory [3] section of access.conf for your twiki/bin directory.
twiki/data/.htpasswd.txt file contains several TWiki core team user accounts and a guest user account. You probably want to remove those accounts by deleting the entries in .htpasswd. Do not remove the guest user if you want to allow guest logins.
.txt and .txt,v files in the twiki/data/TWiki directory.
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.
data/.htpasswd file. The .htpasswd file that comes with the TWiki installation includes user accounts for TWiki core team members that are used for testing on TWiki.org. You can edit the file and delete those lines.
twiki/data and check the file permission of the directory.
A..Z , a..z but not in WikiNotation. (The name should start with one (or more) uppercase letters, but have no uppercase letters after the first group -- if it starts with a lowercase letter or is a WikiWord, some features of TWiki will not work as expected.)
twiki/data/_default directory to the new data directory, preserving the original files' owner, group and permissions (on Unix, use cp -p). The data files must be writable by the owner the CGI scripts are running on (usually, nobody).
.txt and .txt,v files to -rw-rw-rw- (666) and then edit the topic using your browser; RCS will restore the file permissions correctly when saving the topic.
%WIKIWEBLIST% variable.
%WEBTOPICLIST% variable to contain the web-specific links you prefer.
%WEBCOPYRIGHT% can be set for an individual web).
twiki/templates/Someweb directory (otherwise, templates are inherited from twiki/templates).
Main.UserName or %MAINWEB%.UserName format. (The %MAINWEB% variable is an advantage if you ever change the Main web name, but the standard Main.UserName is easier for users to enter, which is the bottom line!
";" as the AND operator in FormattedSearch and WebSearch
$TWIKIROOT is the root of your current 01-Dec-2001 release.
Note: These steps assume a downtime during the time of upgrade. You could install the new version in parallel to the existing one and switch over in an instant without affecting the users. As a guideline, install the new version into $TWIKIROOT/bin1, $TWIKIROOT/lib1, $TWIKIROOT/templates1, $TWIKIROOT/data/TWiki1 (from data/TWiki), $TWIKIROOT/pub/TWiki1 (from pub/TWiki), and configure TWiki.cfg to point to the same data and pub directory like the existing installation. Once tested and ready to go, reconfigure $TWIKIROOT/bin1/setlib.cfg and $TWIKIROOT/lib1/TWiki.cfg, then rename $TWIKIROOT/bin to $TWIKIROOT/bin2, $TWIKIROOT/bin1 to $TWIKIROOT/bin. Do the same with the lib, templates and data/TWiki directories.
$TWIKIROOT/bin, $TWIKIROOT/pub, $TWIKIROOT/data, $TWIKIROOT/templates.
*.html and *.txt files in $TWIKIROOT with the new ones.
$TWIKIROOT/templates with the new ones.
$TWIKIROOT/bin with the new ones.
.cgi
$TWIKIROOT/bin/setlib.cfg and point $twikiLibPath to the absolute file path of $TWIKIROOT/lib
$TWIKIROOT/lib/TWiki.cfg to TWiki.cfg.save
TWiki.cfg configuration file in $TWIKIROOT/lib with the new one.
TWiki.pm library in $TWIKIROOT/lib with the new one.
$TWIKIROOT/lib with the new ones. Make sure to preserve any extra Plugins you might have in $TWIKIROOT/lib/TWiki/Plugins
bin/testenv script from the browser (e.g. http://localhost/bin/testenv) to verify if the cgi-scripts are running as user nobody.
*,v RCS repository files delivered with the installation package are locked by user nobody and need to be changed to the user of your cgi-scripts, e.g., www-data:
twiki/data/* directories where you unzipped the installation package: A simple way to switch the locker of the RCS files is to use sed in the :
for f in *,v; do sed 's/nobody\:/www-data\:/' $f > x; mv x $f; done
twiki/data/TWiki directory where you unzipped the installation package:
InterWikis.*, TWikiRegistration.*, Mail_notification.*, WebPreferences.*, WebStatistics.* and all WebTopic* files.
$TWIKIROOT/data/TWiki/TWikiPreferences.* to TWikiPreferencesSave.*.
*.txt and *.txt,v files from the temporary data/TWiki directory to your $TWIKIROOT/data/TWiki directory.
TWikiPreferencesSave.txt settings into $TWIKIROOT/data/TWiki/TWikiPreferences.txt.
*.txt and *.txt,v files from the temporary data/_default directory to your $TWIKIROOT/data/_default directory.
data/Sandbox directory from the temporary location to your $TWIKIROOT/data directory.
$TWIKIROOT/data are writable by your cgi-script user.
pub/TWiki from your temporary directory into your $TWIKIROOT/pub/TWiki directory.
$TWIKIROOT/pub/TWiki are writable by your cgi-script user.
$TWIKIROOT/bin/testenv script from your browser (e.g. http://localhost/bin/testenv) to see if it reports any issues; fix any potential problems.
.htpasswd if authentication is enabled.
Main web, like the TWikiAdminGroup. To create a new group:
Edit TWikiGroups by entering a new topic with a name that ends in Group. Example:
SomeGroup
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
Set DENYTOPICCHANGE = < list of Users and Groups >
Set ALLOWTOPICCHANGE = < list of Users and Groups >
Set DENYTOPICCHANGE = Main.SomeBadBoy, Main.SomeBadGirl, Main.SomeHackerGroup
Set ALLOWTOPICCHANGE = Main.SomeGoodGuy, Main.SomeGoodGirl, Main.TWikiAdminGroup
Set DENYWEBCHANGE = < list of Users and Groups >
Set ALLOWWEBCHANGE = < list of Users and Groups >
Set DENYTOPICRENAME = < list of Users and Groups >
Set ALLOWTOPICRENAME = < list of Users and Groups >
Set DENYTOPICRENAME = Main.SomeBadBoy, Main.SomeBadGirl, Main.SomeHackerGroup
Set ALLOWTOPICRENAME = Main.SomeGoodGuy, Main.SomeGoodGirl, Main.TWikiAdminGroup
Set DENYWEBRENAME = < list of Users and Groups >
Set ALLOWWEBRENAME = < list of Users and Groups >
DENYTOPICVIEW / ALLOWTOPICVIEW preferences variables, provided that the view script is authenticated. However this setup is not recommended since all content is searchable within a web - a search will turn up view restricted topics.
all webs search option from accessing obfuscated webs. Do so by enabling the NOSEARCHALL variable in WebPreferences:
Set NOSEARCHALL = on
Set DENYWEBVIEW = < list of Users and Groups >
Set ALLOWWEBVIEW = < list of Users and Groups >
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.
NOSEARCHALL variable in its WebPreferences topic:
Set NOSEARCHALL = on
view to the list of authenticated scripts in the .htaccess file.
view script is authenticated, which means that all Users have to login, even for read-only access. (An open guest account, like TWikiGuest, can get around this, allowing anyone to login to a common account with, for example, view-only access for public webs.) TWikiInstallationGuide has more on Basic Authentication, using the .htaccess file.
Set DENYWEBVIEW = < list of Users and Groups >
Set ALLOWWEBVIEW = < list of Users and Groups >
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.
NOSEARCHALL variable in its WebPreferences topic:
Set NOSEARCHALL = on
$doRememberRemoteUser flag in lib/TWiki.cfg as described in TWikiUserAuthentication?. TWiki will now remember the IP address of an authenticated user.
view script to viewauth (or better, create a symbolic link)
viewauth to the list of authenticated scripts in the .htaccess file. The view script should not be listed in the .htaccess file.
view script to the viewauth script once (this happens only if the user has never edited a topic). Doing so will ask for authentication. The viewauth script shows the requested topic if the user could log on and if the user is authorized to see that web.
$superAdminGroup variable in lib/TWiki.cfg to the name of a group of Users who are always allowed to edit/view topics.
$superAdminGroup = "TWikiAdminGroup";
| Formatting Command: | Example: You write: | You get: | |||||||||||||||
|
Paragraphs: Blank lines will create new paragraphs. |
1st paragraph 2nd paragraph | 1st paragraph 2nd paragraph | |||||||||||||||
|
Headings: At least three dashes at the beginning of a line, followed by plus signs and the heading text. One plus creates a level 1 heading (most important), two pluses a level 2 heading; the maximum is level 6. Note: A Table of Content can be created automatically with the %TOC% variable, see TWikiVariables. 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.
|
---++ Sushi ---+++ Maguro |
SushiMaguro |
|||||||||||||||
|
Bold Text: Words get bold by enclosing them in * asterisks.
|
*Bold* | Bold | |||||||||||||||
|
Italic Text: Words get italic by enclosing them in _ underscores.
|
_Italic_ | Italic | |||||||||||||||
|
Bold Italic: Words get _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
|
|||||||||||||||
Note: Make sure to "stick" the * _ = == signs to the words, e.g. take away spaces.
|
_This works_, _this not _ | This works, _this not _ | |||||||||||||||
|
Verbatim Mode: Surround code excerpts and other formatted text with <verbatim> and </verbatim> tags. Note: Use <pre> and </pre> tags instead if you want that HTML code is interpreted. Note: Each tag must be on a line by itself. |
<verbatim>
class CatAnimal {
void purr() {
<code here>
}
}
</verbatim>
|
class CatAnimal {
void purr() {
<code here>
}
}
|
|||||||||||||||
|
Separator: At least three dashes at the beginning of a line. |
------- |
|
|||||||||||||||
|
List Item: Three spaces and an asterisk. |
* bullet item |
|
|||||||||||||||
|
Nested List Item: Six, nine, ... spaces and an asterisk. |
* nested stuff
|
|
|||||||||||||||
|
Ordered List: Three spaces and a number. |
1 Sushi 1 Dim Sum |
|
|||||||||||||||
|
Definition List: Three spaces, the term, a colon, a space, followed by the definition. Note: Terms with spaces are not supported. In case you do have a term with more then one word, separate the words with dashes or with the non-breaking-space entity.
|
Sushi: Japan Dim Sum: S.F. |
|
|||||||||||||||
|
Table: Optional spaces followed by the cells enclosed in vertical bars. Note: | *bold* | cells are rendered as table headers. Note: | spaced | cells are rendered center aligned. Note: | spaced | cells are rendered right aligned. Note: | 2 colspan || cells are rendered as multi-span columns. Note: In case you have a long row and you want it to be more readable when you edit the table you can split the row into lines that end with a '\' backslash character. |
| *L* | *C* | *R* | | A2 | 2 | 2 | | A3 | 3 | 3 | | multi span ||| | A4 \ | next \ | next | |
|
|||||||||||||||
|
WikiWord Links: CapitalizedWordsStuckTogether (or WikiWords) will produce a link automatically. Note: In case you want to link to a topic in a different TWiki web write Webname.TopicName.
|
WebNotify Know.ReadmeFirst | Mail notification ReadmeFirst? | |||||||||||||||
|
Forced Links: You can create a forced internal link by enclosing words in double square brackets. Note: Text within the brackets may contain optional spaces; the topic name is formed by capitalizing the initial letter and by removing the spaces; i.e. [[text formatting FAQ]] links to topic TextFormattingFAQ. You can also refer to a different web and use anchors.
|
[[wiki syntax]] [[Main.TWiki users]] | wiki syntax? Main.TWiki users | |||||||||||||||
|
Specific Links: Create a link where you can specify the link text and the link reference separately, using nested square brackets like [[reference][text]]. Internal link references (i.e. WikiSyntax) and external link references (i.e. http://TWiki.org/) are supported. The same Forced Links rules apply for internal link references. Anchor names can be added as well, like [[Home_#MyAnchor][go home]] and [[http://www.yahoo.com/#somewhere][Yahoo!]].
|
[[WikiSyntax][syntax]] [[http://gnu.org][GNU]] |
syntax
GNU |
|||||||||||||||
|
Easier External Links: An easier syntax for external links is now available: [[externalURL text]] - just hit the spacebar to separate the link URL from the descriptive text, e.g. [[http://gnu.org/ GNU]]. This also supports anchors, e.g. [[http://www.yahoo.com/#somewhere Yahoo!]].
|
[[http://gnu.org GNU]] |
GNU |
|||||||||||||||
|
Anchors: You can define a link 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.
|
[[WebHome#NotThere]] [[#MyAnchor][Jump]] #MyAnchor To here | Home #NotThere Jump To here | |||||||||||||||
|
Prevent a Link: Prevent a WikiWord from being linked by prepending it with the <nop> tag.
|
<nop>SunOS | SunOS | |||||||||||||||
|
Disable Links: You can disable automatic linking of WikiWords by surrounding text with <noautolink> and </noautolink> tags. Note: Each tag must be on a line by itself. Note: This also works for TWiki tables, but only if you add a blank line between the end of the table and the closing </noautolink> tag (known issue of the TablePlugin).
|
<noautolink> RedHat & SuSE </noautolink> |
|
|||||||||||||||
<...> - of an HTML tag must be on the same line, or the tag will be broken.
<, ex: a > b
http://..., https://..., ftp://... 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.
%TOC% : Automatically generates a table of contents based on headings in a topic - see the top of this page for an example.
%WEB% : The current web, is TWiki.
%TOPIC% : The current topic name, is TextFormattingRules.
%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.
%INCLUDE{"SomeTopic"}% : Server side include, includes another topic. The current TWiki web is the default web. Example: %INCLUDE{"TWiki.SiteMap"}%
%RED% Red %ENDCOLOR% and %BLUE% blue %ENDCOLOR% colors to get: Red and blue colors.
%PLUGINDESCRIPTIONS%:
*_text_* as bold italic text.
ExternalSite:Page text to external sites based on aliases defined in the InterWikis topic.
<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% - that expand into content whenever a page is opened. When a topic is rendered for viewing, VARIABLES are replaced by data, either user-entered, or info automatically generated by TWiki (like the date, or the current username). There are predefined variables, and Preference variables that you configure. You can also define custom variables, with new names and values.
lib/twiki.cfg file, when TWiki was installed, or taken from server info (like current username, or date and time). Many of the variables let you format the appearance of the display results.
%INCLUDINGTOPIC%, %INCLUDE%, and the mighty %SEARCH%.
% percent signs):
| Variable: | Expanded to: | |||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
%WIKIHOMEURL% |
The base script URL of TWiki, is the link of the Home icon in the upper left corner, is http://visiblearea.com/twiki | |||||||||||||||||||||||||||
%SCRIPTURL% |
The script URL of TWiki, is http://www.visiblearea.com/cgi-bin/twiki | |||||||||||||||||||||||||||
%SCRIPTURLPATH% |
The path of the script URL of TWiki, is /cgi-bin/twiki | |||||||||||||||||||||||||||
%SCRIPTSUFFIX% |
The script suffix, ex: .pl, .cgi is |
|||||||||||||||||||||||||||
%PUBURL% |
The public URL of TWiki, is http://www.visiblearea.com/twiki/pub Example: You can refer to a file attached to another topic as %PUBURL%/%WEB%/OtherTopic/image.gif |
|||||||||||||||||||||||||||
%PUBURLPATH% |
The path of the public URL of TWiki, is /twiki/pub | |||||||||||||||||||||||||||
%ATTACHURL% |
The attachment URL of the current topic, is http://www.visiblearea.com/twiki/pub/TWiki/TWikiVariables Example: If you attach a file you can refer to it as %ATTACHURL%/image.gif |
|||||||||||||||||||||||||||
%ATTACHURLPATH% |
The path of the attachment URL of the current topic, is /twiki/pub/TWiki/TWikiVariables | |||||||||||||||||||||||||||
%URLPARAM{"name"}% |
Returns the value of a URL parameter. Note that there is a low risk that this variable could be misused for cross-scripting. Ex: %URLPARAM{"skin"}% returns print for a .../view/TWiki/TWikiVariables?skin=print URL. Is |
|||||||||||||||||||||||||||
%URLENCODE{"string"}% |
Encodes a string for use as a URL parameter. Ex: %URLENCODE{"spaced name"}% returns spaced%20name |
|||||||||||||||||||||||||||
%WIKITOOLNAME% |
The name of your TWiki site - TWiki | |||||||||||||||||||||||||||
%WIKIVERSION% |
Your current TWiki version - 30 Dec 2002 | |||||||||||||||||||||||||||
%USERNAME% |
Your login username - TWikiGuest | |||||||||||||||||||||||||||
%WIKINAME% |
Your Wiki username. Same as %USERNAME% if not defined in the TWikiUsers topic. Is TWikiGuest | |||||||||||||||||||||||||||
%WIKIUSERNAME% |
Your %WIKINAME% including the Main web name - always use full signatures - Main.TWikiGuest | |||||||||||||||||||||||||||
%MAINWEB% |
The web containing TWikiUsers, OfficeLocations and TWikiGroups is Main | |||||||||||||||||||||||||||
%TWIKIWEB% |
The web containing all documentation and site-wide preference settings for TWiki - TWiki | |||||||||||||||||||||||||||
%WEB% |
The current web is TWiki | |||||||||||||||||||||||||||
%BASEWEB% |
The web name where the includes started, e.g. the web of the first topic of nested includes. Same as %WEB% in case there is no include. |
|||||||||||||||||||||||||||
%INCLUDINGWEB% |
The web name of the topic that includes the current topic - same as %WEB% if there is no INCLUDE. |
|||||||||||||||||||||||||||
%HOMETOPIC% |
The home topic in each web - Home | |||||||||||||||||||||||||||
%NOTIFYTOPIC% |
The notify topic in each web - Mail notification | |||||||||||||||||||||||||||
%WIKIUSERSTOPIC% |
The index topic of all registered users - TWikiUsers | |||||||||||||||||||||||||||
%WIKIPREFSTOPIC% |
The site-wide preferences topic - TWikiPreferences | |||||||||||||||||||||||||||
%WEBPREFSTOPIC% |
The local web preferences topic in each web - WebPreferences | |||||||||||||||||||||||||||
%STATISTICSTOPIC% |
The web statistics topic WebStatistics | |||||||||||||||||||||||||||
%TOPIC% |
The current topic name - TWikiVariables | |||||||||||||||||||||||||||
%BASETOPIC% |
The name of the topic where a single or nested INCLUDE started - same as %TOPIC% if there is no INCLUDE. |
|||||||||||||||||||||||||||
%INCLUDINGTOPIC% |
The name of the topic that includes the current topic. Same as %TOPIC% in case there is no include. |
|||||||||||||||||||||||||||
%SPACEDTOPIC% |
The current topic name with added spaces, for regular expression search of Ref-By, is TWiki%20*Variables | |||||||||||||||||||||||||||
%TOPICLIST{"format"}% |
Topic index of a web. The "format" defines the format of one topic item. It may include variables: The $name variable gets expanded to the topic name; the $web variable gets expanded to the name of the web.
Parameters are format, separator and web:
%TOPICLIST{" * $web.$name"}% creates a bullet list of all topics.
%TOPICLIST{separator=", "}% creates a comma separated list of all topics.
%TOPICLIST{" <option>$name</option>"}% creates an option list (for drop down menus). |
|||||||||||||||||||||||||||
%WEBLIST{"format"}% |
Web index, ex: list of all webs. Hidden webs are excluded, e.g. webs with a NOSEARCHALL=on preference variable. The "format" defines the format of one web item. The $name variable gets expanded to the name of the web, $qname gets expanded to double quoted name, $marker to marker where web matches selection.
Parameters are format, separator and web:
%WEBLIST{" * [[$name.Home_]]"}% creates a bullet list of all webs.
%WEBLIST{"<option $marker value=$qname>$name</option>" webs="Trash,public" selection="TWiki" separator=" "}% Dropdown of all public Webs + Trash Web, current Web highlighted.
|
|||||||||||||||||||||||||||
%GMTIME% |
GM time, is Fri May 16 14:49:51 2008 | |||||||||||||||||||||||||||
%GMTIME{"format"}% |
Formatted GM time based on time variables.
%GMTIME{"$day $month, $year - $hour:$min:$sec"}% is 16 May, 2008 - 14:49:51 |
|||||||||||||||||||||||||||
%SERVERTIME% |
Server time, is Fri May 16 07:49:51 2008 | |||||||||||||||||||||||||||