netfrag.org . TWiki . TWikiDocumentation |
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 support for CGI, authentication, extended path) * |
/home/httpd/twiki
and unzip the TWiki distribution into this directory.
twiki/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.
Examplehttpd.conf
entries:ScriptAlias /twiki/bin/ "/home/httpd/twiki/bin/" Alias /twiki/ "/home/httpd/twiki/" <Directory "/home/httpd/twiki/bin"> Options +ExecCGI SetHandler cgi-script AllowOverride all Allow from all </Directory> <Directory "/home/httpd/twiki/pub"> Options FollowSymLinks +Includes AllowOverride None Allow 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
)
TWiki dir: What it is: Where to copy: Example: twiki/bin
CGI bin cgi-enabled dir /home/smith/public_html/cgi-bin
twiki/lib
library files same level as twiki/bin
/home/smith/public_html/lib
twiki/pub
public files htdoc enabled dir /home/smith/public_html/pub
twiki/data
topic data outside of htdoc tree (for security) /home/smith/twiki/data
twiki/templates
web templates outside of htdoc tree (for security) /home/smith/twiki/templates
/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 sed: for f in *,v; do sed 's/nobody\:/www-data\:/' $f > x; mv x $f; done
twiki/lib/TWiki.cfg
, setting the variables to your needs.
$scriptSuffix
variable to cgi
or pl
if required.
$rcsDir
in twiki/lib/TWiki.cfg
to mach the location of your RCS binaries.
twiki/data
, twiki/templates
and all its subdirectories should be set so that they are not visible as a URL. (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.
http://yourdomain.com/twiki/bin/view
and start TWiki-ing away!
WIKIWEBMASTER
email address, and other preferences.
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 /urlpath/to/TWiki/index.html http://your.domain.com/urlpath/to/TWiki/bin/view
AuthUserFile /filepath/to/TWiki/data/.htpasswd
ErrorDocument 401 /urlpath/to/TWiki/bin/oops/TWiki/TWikiRegistration?template=oopsauth
edit
, view
, preview
, etc entries in .htaccess
.
.htaccess
does not have the desired effect you need to enable it: Add "AllowOverride All" to the Directory section of access.conf
for your twiki/bin
directory.
.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 processed 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
, followed by a..z
and/or 0..9
characters, but not a WikiWord.
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!
format=""
parameter in %SEARCH{}%
variable for database like reporting.
SiteAlias:Page
; rules are defined in InterWikis. (Get more Plugins from the TWiki:Plugins web.)
%TOC%
variable generates a hierarchical table of contents from topic headings: <h1>...<h6>.
twiki/bin
directory into it's own twiki/lib
directory tree. The following files have been renamed and moved:
From TWiki 01-Dec-2000: | To TWiki 01-Dec-2001: |
---|---|
twiki/bin/wikicfg.pm | twiki/lib/TWiki.cfg |
twiki/bin/wiki.pm | twiki/lib/TWiki.pm |
twiki/bin/wikiaccess.pm | twiki/lib/TWiki/Access.pm |
twiki/bin/wikiprefs.pm | twiki/lib/TWiki/Prefs.pm |
twiki/bin/wikisearch.pm | twiki/lib/TWiki/Search.pm |
twiki/bin/wikistore.pm | twiki/lib/TWiki/Store.pm |
twiki/lib/TWiki/Plugins
directory contains the new Plugin modules.
$TWIKIROOT
is the root of your current 01-Sep-2001 release.
$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.
TWiki.pm
library in $TWIKIROOT/lib
with the new one.
*.pm
library files in $TWIKIROOT/lib/TWiki
and $TWIKIROOT/lib/TWiki/Plugins
with the new ones.
twiki/data/TWiki
directory where you unzipped the installation package:
TWikiPreferences.*
, TWikiWebsTable.*
, WebNotify.*
, WebPreferences.*
, WebStatistics.*
and all WebTopic*
files.
nobody
: The *,v
RCS repository files delivered with the installation package are locked by user nobody and need to be changed the user of your cgi-scripts, i.e. www-data
. A simple way to switch the locker of the RCS files is to use sed:
for f in *,v; do sed 's/nobody\:/www-data\:/' $f > x; mv x $f; done
*.txt
and *.txt,v
files from the temporary data/TWiki
directory to your $TWIKIROOT/data/TWiki
directory.
pub/TWiki/TWikiDocGraphics
directory into your $TWIKIROOT/pub/TWiki
directory.
Before Switch: | After Switch: | ||
---|---|---|---|
Current 01-Dec-2000: | New 01-Dec-2001: | Obsolete 01-Dec-2000: | New 01-Dec-2001: |
twiki/templates/ | twiki/templates2/ | twiki/templates1/ | twiki/templates/ |
twiki/bin/ | twiki/bin/2/ | (overwritten) | twiki/bin/ |
(N/A) | twiki/bin/lib/ | (N/A) | twiki/lib/ |
twiki/data/TWiki | twiki/data/TWiki2 | twiki/data/TWiki1 | twiki/data/TWiki |
(other directories do not change) |
$TWIKIROOT
is the root of your current 01-Dec-2000 release, ex: export TWIKIROOT=/some/dir/
twiki/bin
, twiki/pub
, twiki/data
, twiki/templates
.
mkdir -p ~/tmp/
cp -p ~/downloads/TWiki20011201.zip ~/tmp/
cd ~/tmp/
unzip ~/tmp/TWiki20011201.zip
twiki
):
mv ~/tmp/TWiki*.html $TWIKIROOT
mv ~/tmp/index.html $TWIKIROOT
mv ~/tmp/readme.txt $TWIKIROOT
mv ~/tmp/license.txt $TWIKIROOT
twiki/templates2
directory, ex:
mv ~/tmp/templates $TWIKIROOT/templates2
chmod 644 *.cgi
twiki/data/TWiki2
directory. Do the same to files attached to this web, ex:
mv ~/tmp/data/TWiki $TWIKIROOT/data/TWiki2
mv ~/tmp/pub/TWiki $TWIKIROOT/pub/TWiki2
twiki/data/Know2
directory, ex:
mv ~/tmp/data/Know $TWIKIROOT/data/Know2
mv ~/tmp/pub/Know $TWIKIROOT/pub/Know2
mv ~/tmp/data/_default $TWIKIROOT/data
mv ~/tmp/data/Trash $TWIKIROOT/data
mv ~/tmp/data/mime.types $TWIKIROOT/data
mv ~/tmp/pub/*.gif $TWIKIROOT/pub
TWiki2
and Know2
directories and its files. The files must be writable by the cgi-scripts (usually user nobody
).
nobody
: The *,v
RCS repository files delivered with the installation package are locked by user nobody and need to be changed the user of your cgi-scripts, i.e. www-data
. A simple way to switch the locker of the RCS files is to use sed:
for f in *,v; do sed 's/nobody\:/www-data\:/' $f > x; mv x $f; done
twiki/bin/2
directory, ex:
mv ~/tmp/bin $TWIKIROOT/bin/2
.cgi
cp -p $TWIKIROOT/bin/somescript $TWIKIROOT/bin/2
.htaccess.txt
to .htaccess
and customize it, ex:
cd $TWIKIROOT/bin/2
mv .htaccess.txt .htaccess
diff ../.htaccess .
chmod 755 *.cgi
twiki/bin/lib
directory, ex:
mv ~/tmp/lib $TWIKIROOT/bin
chmod 644 *.pm
twiki/bin/wikicfg.pm
into the new twiki/lib/TWiki.cfg
configuration file. Use the diff
command to find out the differences, ex:
cd $TWIKIROOT/bin/lib
diff ../wikicfg.pm TWiki.cfg
$scriptUrlPath = "/twiki/bin/2";
$templateDir = "/home/httpd/twiki/templates2";
extendHandleCommonTags
, extendGetRenderedVersionOutsidePRE
, extendGetRenderedVersionInsidePRE
from the old twiki/bin/wikicfg.pm
. This is now handled by the Default plugin twiki/lib/TWiki/Plugins/Default.pm
http://localhost/cgi-bin/view
http://localhost/cgi-bin/2/view
TWiki
web.
TWiki2
web, which gets renamed to TWiki
when you switch over the installation.
TWiki.TWikiRegistration
, merge your changes back into TWiki2.TWikiRegistration
.
TWiki.TWikiWebsTable
to TWiki2.TWikiWebsTable
.
TWiki
web.
TWiki2.TWikiPreferences
, merge the old TWiki.TWikiPreferences
settings and customize it.
WebPreferences
of all webs, add or change the following web preferences: (see TWiki.WebPreferences
)
web="all"
search:
* Set NOSEARCHALL = on
%WEB% . {}
decoration from the list (it is now in the templates), ex:
* Set WEBTOPICLIST = <a href="Home">Home</a>
| <a href="WebChanges">Changes</a>
| <a href="WebIndex">Index</a>
| <a href="WebSearch">Search</a>
| Go <input type="text" name="topic" size="16" />
* Set DENYWEBVIEW =
* Set ALLOWWEBVIEW =
* Set DENYWEBRENAME =
* Set ALLOWWEBRENAME =
* Set FINALPREFERENCES = WEBTOPICLIST, DENYWEBVIEW, ALLOWWEBVIEW, DENYWEBCHANGE, ALLOWWEBCHANGE, DENYWEBRENAME, ALLOWWEBRENAME
WebSearch
of all webs, replace content with this one line:
%INCLUDE{"%TWIKIWEB%.WebSearch"}%
WebChanges
of all webs, replace content with this one line:
%INCLUDE{"%TWIKIWEB%.WebChanges"}%
twiki/templates
.
twiki/templates2
, which gets renamed to twiki/templates
when you switch over the installation.
=<p />
tag added.
WebForm
topic based on twikicatitems.tmpl
in each web that uses a Category Table. See details in TWikiForms and compare with the settings in the Know2.WebPreferences
topic.
twikicatitems.tmpl
file, it is still used for topics that are of the old format.
[T]
and [P]
is done so that search does not find the topic where this search string is located in!)
notedited.tmpl
template, create an equivalent WebTopicEditTemplate to conform with the new TemplateTopics. The new format replaces the notedited.tmpl
, notext.tmpl
and notwiki.tmpl
templates.
twiki/bin/2/view
to make sure everything works as expected.
$TWIKIROOT/bin/2/TWiki.cfg
and remove the /2
from $scriptUrlPath
and $templateDir
, ex:
$scriptUrlPath = "/twiki/bin";
$templateDir = "/home/httpd/twiki/templates";
TWiki2
web to TWiki
, including attachments, ex:
cd $TWIKIROOT/data
mv TWiki TWiki1
mv TWiki2 TWiki
cd $TWIKIROOT/pub
mv TWiki TWiki1
mv TWiki2 TWiki
templates2
directory to templates
, ex:
cd $TWIKIROOT
mv templates templates1
mv templates2 templates
lib
directory one level up from $TWIKIROOT/bin/lib
to $TWIKIROOT/lib
, ex:
cd $TWIKIROOT
mv bin/lib .
bin/2
to bin
, ex:
cd $TWIKIROOT/bin
cp -p bin/2/* .
cp -p bin/2/.htaccess .
$TWIKIROOT/bin/2
$TWIKIROOT/templates1
$TWIKIROOT/data/TWiki1
$TWIKIROOT/pub/TWiki1
~/tmp
EmptyPlugin
, DefaultPlugin
, and InterwikiPlugin
should be preinstalled. To check the InterwikiPlugin, go to its page.
extendHandleCommonTags
, extendGetRenderedVersionOutsidePRE
and extendGetRenderedVersionInsidePRE
in twiki/bin/wikicfg.pm
:
twiki/lib/TWiki/Plugins/Default.pm
%GMTIME{"..."}%
and %SERVERTIME{"..."}%
variables is now "$hour:$min"
instead of "hour:min"
. More in TWikiVariables.
| *bold* |
cells, | center aligned |
and | right aligned |
cells, span multiple columns using | empty cells |||
. More in TextFormattingRules.
Net::SMTP
module instead of sendmail
if installed.
<verbatim> ... </verbatim>
tags instead of <pre> ... </pre>
tags where appropriate. More in TextFormattingRules.
%STARTINCLUDE%
and %STOPINCLUDE%
variables to control what gets included of a topic. More in TWikiVariables.
$attachAsciiPath
in TWiki.cfg
defines which file types are stored in ASCII, otherwise, binary format is used. This means that the RCS version used should support binary files.
edit.new.tmpl
has been removed and replaced by template topics in the new TWikiTemplates.
warning.txt
file can appear in the data
directory. It may contain diagnostic info identifying problems that need fixing. This file could get fairly large if you have a lot of problems your site - you can delete it at any time.
REMOTE_USER
environment variable. This variable is set when you enable Basic Authentication (.htaccess) or SSL "secure server" authentication (https protocol).
TWiki uses visitor identification to keep track of who made changes to topics at what time and to manage a wide range of personal site settings. This gives a complete audit trail of changes and activity.
attach
, edit=
, installpasswd
, preview
, rename
, save
, upload
using the .htaccess file. The TWikiInstallationGuide has step-by-step instructions.
lib/TWiki.cfg
. It lets you combine open access to some functions, with authentication on others, with full user activity tracking:
REMOTE_USER
environment variable is set for the scripts that are under authentication. If, for example, the edit
, save
and preview
scripts are authenticated, but not view
, you would get your WikiName in preview
for the %WIKIUSERNAME%
variable, but view
will show TWikiGuest
instead of your WikiName.
view
, will show the correct username instead of TWikiGuest?.
$doRememberRemoteUser
flag in TWiki.cfg
. TWiki then persistently stores the IP address/username pairs in the file, $remoteUserFilename
, which is "$dataDir/remoteusers.txt"
by default.
pthoeny
. This name is normally passed to netfrag.org by the REMOTE_USER
environment variable, and used by internally by netfrag.org. 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.
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. Ex:This pointsMain.WikiUsername
or%MAINWEB%.WikiUsername
WikiUser
to the netfrag.org.Main web, where user registration pages are stored, 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
):
Change password
Forgot your old password? Then use ResetPassword instead. Please only use ResetPassword in case you really forgot your password. Thank you. After submitting this form your password will be changed.
TWiki/ResetPassword
):
Request for reset of password-- MikeMannix - 29 Aug 2001
Please only use this ResetPassword form in case you really forgot your password. Otherwise just change it using ChangePassword. Thank you. After submitting this form you will receive a page with yor new password appearing encrypted.
Main
web, like the TWikiAdminGroup. To start a new group:
SomeGroup
Set GROUP = Main.SomeUser, Main.OtherUser, Main.SomeOtherGroup
Set ALLOWTOPICCHANGE = Main.TWikiAdminGroup
* Set DENYTOPICCHANGE = Main.SomeBadBoy, Main.SomeBadGirl, Main.SomeHackerGroup
* Set ALLOWTOPICCHANGE = Main.SomeGoodGuy, Main.SomeGoodGirl, Main.TWikiAdminGroup
* Set DENYTOPICRENAME = Main.SomeBadBoy, Main.SomeBadGirl, Main.SomeHackerGroup
* Set ALLOWTOPICRENAME = Main.SomeGoodGuy, Main.SomeGoodGirl, Main.TWikiAdminGroup
.htaccess
file.
view
script from the .htaccess
file.
$doRememberRemoteUser
flag in lib/TWiki.cfg
as described in TWikiUserAuthentication. netfrag.org 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.
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.
NOSEARCHALL
variable in its WebPreferences, like:
<!--
Set DENYTOPICCHANGE = Main.SomeGroup
-->
$superAdminGroup
variable in lib/TWiki.cfg
to the name of a group of users that are always allowed to edit/view topics.
$superAdminGroup = "TWikiAdminGroup";
twiki/templates
directory and are named with the syntax: <scriptname>.<skin>.tmpl
. For example, the Printable skin for the view
template is view.print.tmpl
.
SKIN
Preference variable in TWikiPreferences, one of the WebPreferences, or in a user - TWikiGuest? - topic.
Set SKIN = print
?skin=name
to the URL, for this example:
?skin=name
URL parameter overrides the SKIN Preference value.
-- PeterThoeny - 14 Jul 2001 %VARIABLE%
- that expand into content whenever a page is opened. Variables are replaced by their actual values: stored data, or system info (like the date, or the current user). There are predefined variables, and Preference variables that you set. You can also define custom variables, with new names and values.
%
percent signs):
Variable: | Expanded to: | ||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
%WIKIHOMEURL% |
The base script URL of netfrag.org, is the link of the Home icon in the upper left corner, is http://TWiki.org/ | ||||||||||||||||||||||||||||||||||||||||||||||||
%SCRIPTURL% |
The script URL of netfrag.org, is https://netfrag.org/twiki/bin | ||||||||||||||||||||||||||||||||||||||||||||||||
%SCRIPTURLPATH% |
The path of the script URL of netfrag.org, is /twiki/bin | ||||||||||||||||||||||||||||||||||||||||||||||||
%SCRIPTSUFFIX% |
The script suffix, ex: .pl , .cgi is |
||||||||||||||||||||||||||||||||||||||||||||||||
%PUBURL% |
The public URL of TWiki, is https://netfrag.org/twiki/pub | ||||||||||||||||||||||||||||||||||||||||||||||||
%PUBURLPATH% |
The path of the public URL of netfrag.org, is /twiki/pub | ||||||||||||||||||||||||||||||||||||||||||||||||
%ATTACHURL% |
The attachment URL of the current topic, is https://netfrag.org/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. Ex: %URLPARAM{"skin"}% returns print for a .../view/TWiki/TWikiVariables?skin=print URL. Is print |
||||||||||||||||||||||||||||||||||||||||||||||||
%WIKITOOLNAME% |
Name of wiki tool, is netfrag.org | ||||||||||||||||||||||||||||||||||||||||||||||||
%WIKIVERSION% |
Wiki tool version is 04 Sep 2004 $Rev: 1742 $ | ||||||||||||||||||||||||||||||||||||||||||||||||
%USERNAME% |
Your login username is guest | ||||||||||||||||||||||||||||||||||||||||||||||||
%WIKINAME% |
Your Wiki username. Same as %USERNAME% if not defined in the TWikiUsers topic. Is TWikiGuest | ||||||||||||||||||||||||||||||||||||||||||||||||
%WIKIUSERNAME% |
Your %WIKINAME% including the Main web name. Usefull for signatures. Is Main.TWikiGuest | ||||||||||||||||||||||||||||||||||||||||||||||||
%MAINWEB% |
The Main web containing TWikiUsers, OfficeLocations? and TWikiGroups?. Is Main | ||||||||||||||||||||||||||||||||||||||||||||||||
%TWIKIWEB% |
The web containing all documentation and configuration of netfrag.org is 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% in case there is no include. |
||||||||||||||||||||||||||||||||||||||||||||||||
%HOMETOPIC% |
The home topic in each web. Is Home? | ||||||||||||||||||||||||||||||||||||||||||||||||
%NOTIFYTOPIC% |
The notify topic in each web. Is WebNotify | ||||||||||||||||||||||||||||||||||||||||||||||||
%WIKIUSERSTOPIC% |
The index topic of all registered users. Is TWikiUsers | ||||||||||||||||||||||||||||||||||||||||||||||||
%WIKIPREFSTOPIC% |
The web preferences topic. Is TWikiPreferences | ||||||||||||||||||||||||||||||||||||||||||||||||
%WEBPREFSTOPIC% |
The web preferences topic. Is WebPreferences | ||||||||||||||||||||||||||||||||||||||||||||||||
%STATISTICSTOPIC% |
The web statistics topic. Is WebStatistics | ||||||||||||||||||||||||||||||||||||||||||||||||
%TOPIC% |
The current topic name, is TWikiVariables | ||||||||||||||||||||||||||||||||||||||||||||||||
%BASETOPIC% |
The name of the topic where the includes started, e.g. the first topic of nested includes. Same as %TOPIC% in case 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, e.g. 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{"" webs="Trash,public" selection="TWiki" separator=" "}% Dropdown of all public Webs + Trash Web, current Web highlighted.
|
||||||||||||||||||||||||||||||||||||||||||||||||
%GMTIME% |
GM time, is 24 Nov 2024 - 18:30 | ||||||||||||||||||||||||||||||||||||||||||||||||
%GMTIME{"format"}% |
Formatted GM time based on time variables.
%GMTIME{"$day $month, $year - $hour:$min:$sec"}% is 24 Nov, 2024 - 18:30:34 |
||||||||||||||||||||||||||||||||||||||||||||||||
%SERVERTIME% |
Server time, is 24 Nov 2024 - 19:30 | ||||||||||||||||||||||||||||||||||||||||||||||||
%SERVERTIME{"format"}% |
Formatted server time. Example: %SERVERTIME{"$hou:$min"}% is 19:30 |
||||||||||||||||||||||||||||||||||||||||||||||||
%HTTP_HOST% |
HTTP_HOST environment variable, is netfrag.org | ||||||||||||||||||||||||||||||||||||||||||||||||
%REMOTE_ADDR% |
REMOTE_ADDR environment variable, is 18.191.200.223 | ||||||||||||||||||||||||||||||||||||||||||||||||
%REMOTE_PORT% |
REMOTE_PORT environment variable, is 53257 | ||||||||||||||||||||||||||||||||||||||||||||||||
%REMOTE_USER% |
REMOTE_USER environment variable, is | ||||||||||||||||||||||||||||||||||||||||||||||||
%INCLUDE{"page" ...}% |
Server side include to IncludeTopicsAndWebPages. Parameters are page name, and an optional pattern="(reg-exp)" . The page name is:
|
||||||||||||||||||||||||||||||||||||||||||||||||
%STARTINCLUDE% |
If present in included topic, start to include text from this location up to the end, or up to the location of the %STOPINCLUDE% variable. A normal view of the topic shows everyting exept the %STARTINCLUDE% variable itself. |
||||||||||||||||||||||||||||||||||||||||||||||||
%STOPINCLUDE% |
If present in included topic, stop to include text at this location and ignore the remaining text. A normal view of the topic shows everyting exept the %STOPINCLUDE% variable itself. |
||||||||||||||||||||||||||||||||||||||||||||||||
%TOC% |
Table of Contents of current topic. | ||||||||||||||||||||||||||||||||||||||||||||||||
%TOC{"SomeTopic" ...}% |
Table of Contents. Shows a TOC that is generated automatically based on headings of a topic. Headings in WikiSyntax ("---++ text" ) and HTML ("<h2>text<h2>" ) are taken into account. (But not "<H2>text</H2>" , which can be used to exclude a heading from the TOC.) Parameters are topic name, web and depth:
%TOC{depth="2"}% , %TOC{"TWikiDocumentation" web="TWiki"}%
| ||||||||||||||||||||||||||||||||||||||||||||||||
%SEARCH{"text" ...}% |
Inline search, shows a search result embedded in a topic. Parameters are the search term, web, scope, order and many more: [1]
%SEARCH{"wiki" web="Main" scope="topic"}% |
||||||||||||||||||||||||||||||||||||||||||||||||
%METASEARCH{...}% |
Special search of meta data
%METASEARCH{type="topicmoved" web="%WEB%" topic="%TOPIC%" title="This topic used to exist and was moved to: "}% , you may want to use this in WebTopicViewTemplate and WebTopicNonWikiTemplate%METASEARCH{type="parent" web="%WEB%" topic="%TOPIC%" title="Children: "}%
| ||||||||||||||||||||||||||||||||||||||||||||||||
%VAR{"NAME" web="Web"}% |
Get a preference value from a web other then the current one. Example: To get %WEBBGCOLOR% of the Main web write %VAR{"WEBBGCOLOR" web="Main"}% , is #444444 |
[1] Note: The search form uses identical names for input fields. [2] Note: A web can be excluded from aweb="all"
search if you define aNOSEARCHALL=on
variable in its WebPreferences.
Variable: | Level: | What: |
---|---|---|
%WIKIWEBMASTER% |
SL | Webmaster email address (sender of email notifications) , is webmaster@netfrag.org |
%WIKIWEBLIST% |
SL | List of netfrag.org webs (in upper right corner of topics) |
%WEBTOPICLIST% |
WL | Common links of web (second line of topics) |
%WEBCOPYRIGHT% |
SL , WL | Copyright notice (bottom right corner of topics) |
%WEBBGCOLOR% |
WL | Background color of web |
%NOSEARCHALL% |
WL | Exclude web from a web="all" search (set variable to on for hidden webs) |
%NEWTOPICBGCOLOR% |
SL , UL | Background color of non existing topic. ( UL needs authentication for topic views ) |
%NEWTOPICFONTCOLOR% |
SL , UL | Font color of non existing topic. ( UL needs authentication for topic views ) |
%EDITBOXWIDTH% |
SL , UL | Horizontal size of edit box, is 100 |
%EDITBOXHEIGHT% |
SL , UL | Vertical size of edit box, is 20 |
%RELEASEEDITLOCKCHECKBOX% |
SL , UL | Default state of the "Release edit lock" (UnlockTopic) check box in preview. Checkbox is initially checked if Set RELEASEEDITLOCKCHECKBOX = checked="checked" , or unchecked if empty. If checked, make sure to click on Edit to do more changes; do not go back in your browser to the edit page, or you risk that someone else will edit the topic at the same time! Value is: checked |
%DONTNOTIFYCHECKBOX% |
SL , UL | Default state of the "Minor Changes, Don't Notify" (DontNotify) check box in preview. Check box is initially checked if Set DONTNOTIFYCHECKBOX = checked="checked" , or unchecked if empty. Value is: checked |
%ATTACHLINKBOX% |
SL , UL | Default state of the link check box in the attach file page. Check box is initially checked if value is set to CHECKED , unchecked if empty. If checked, a link is created to the attached file at the end of the topic. Value is: |
%HTTP_EQUIV_ON_VIEW% |
SL | http-equiv meta tags for view, rdiff, attach, search* scripts. |
%HTTP_EQUIV_ON_EDIT% |
SL , UL | http-equiv meta tags for edit script. |
%HTTP_EQUIV_ON_PREVIEW% |
SL , UL | http-equiv meta tags for preview script. |
%DENYWEBCHANGE% |
WL | List of users and groups who are not allowed to change topics in the netfrag.org web. (More in TWikiAccessControl) |
%ALLOWWEBCHANGE% |
WL | List of users and groups who are allowed to change topics in the netfrag.org web. (More in TWikiAccessControl) |
%DENYTOPICCHANGE% |
(any topic) | List of users and groups who are not allowed to change the current topic. (More in TWikiAccessControl) |
%ALLOWTOPICCHANGE% |
(any topic) | List of users and groups who are allowed to change the current topic. (More in TWikiAccessControl) |
%DENYWEBRENAME% |
WL | List of users and groups who are not allowed to rename topics in the netfrag.org web. (More in TWikiAccessControl) |
%ALLOWWEBRENAME% |
WL | List of users and groups who are allowed to rename topics in the netfrag.org web. (More in TWikiAccessControl) |
%DENYTOPICRENAME% |
(any topic) | List of users and groups who are not allowed to rename the current topic. (More in TWikiAccessControl) |
%ALLOWTOPICRENAME% |
(any topic) | List of users and groups who are allowed to rename the current topic. (More in TWikiAccessControl) |
%FINALPREFERENCES% |
SL , WL | List of preferences that are not allowed to be overridden by next level preferences |
Set VARIABLENAME = value
Example: Create a custom logo variable-- PeterThoeny - 13 Sep 2001
- To place a logo anywhere in a web by typing
%MYLOGO%
, simply define the variable on the web's WebPreferences page. You also have to uploadlogo.gif
- this can be done by attaching a file toLogoTopic
(any topic name you choose):
Set MYLOGO = %PUBURL%/%MAINWEB%/LogoTopic/logo.gif
TWiki:Plugins
expands to TWiki:Plugins on TWiki.org. You can edit the predefined set of of Wiki-related sites, and add your own.
SomePlugin
), there's a separate development page.
Dev
(SomePluginDev
).
twiki/bin
and twiki/lib
directories for the Test version, adjusting the paths in the new lib/TWiki.cfg
, the twiki/data
; the twiki/templates
and twiki/pub
directories are shared.
Test
in the DISABLEDPLUGINS
variable in TWikiPreferences. Redefine the DISABLEDPLUGINS
variable in the Test web and do the testing there.
lib/TWiki/Plugins
directory are activated automatically unless disabled by the DISABLEDPLUGINS
Preferences variable in TWikiPreferences. You can optionally list the installed Plugins in the INSTALLEDPLUGINS
Preferences variable. This is useful to define the sequence of Plugin execution, or to specify other webs than the netfrag.org web for the Plugin topics. Settings in TWikiPreferences are:
Set INSTALLEDPLUGINS = DefaultPlugin, ...
Set DISABLEDPLUGINS = EmptyPlugin, ...
web.topicname
name, if specified in INSTALLEDPLUGINS
; next, the TWiki web is searched; and finally, the current web.
Plugin-specific settings are done in individual Plugin topics. Two settings are standard for each Plugin:
Set SHORTDESCRIPTION = Blah blah woof woof.
data/debug.txt
. Set to 0=off or 1=on:
Set DEBUG = 0
%<pluginname>_<var>%
, ex: %DEFAULTPLUGIN_SHORTDESCRIPTION%
shows the description of the DefaultPlugin.
%ACTIVATEDPLUGINS%
variable lists activated Plugins by name. (This variable is displayed in TWikiPreferences for debugging use.)
%PLUGINDESCRIPTIONS%
variable displays a bullet list with a one-line description of each active Plugins. This variable is based on the %<plugin>_SHORTDESCRIPTION%
Preferences variables of individual topics and is shown in TextFormattingRules.
DEMO: Automatically List Active Plugins Using Variables Using%ACTIVATEDPLUGINS%
:
On this TWiki site, the active Plugins are: DefaultPlugin, HeadlinesPlugin, InterwikiPlugin, TablePlugin, VisualConfirmPlugin. Using%
:PLUGINDESCRIPTIONS%
You can use any of these active TWiki Plugins:
- DefaultPlugin: This plugin can be used to specify some simple custom rendering rules. It also renders deprecated
*_text_*
as bold italic text.- HeadlinesPlugin: Build news portals that show headline news based on RSS news feeds from news sites.
- InterwikiPlugin: Link
ExternalSite:Page
text to external sites based on aliases defined in the InterWikis topic.- TablePlugin: Control attributes of tables and sorting of table columns
- VisualConfirmPlugin: Plugin for visual confirmation of new user registration.
lib/TWiki/Func.pm
implements ALL official Plugin functions. Plugins should ONLY use functions published in this module.
If you use functions not in Func.pm
, you run the risk of creating security holes. Also, your Plugin will likely break and require updating when you upgrade to a new version of TWiki.
outsidePREHandler
and insidePREHandler
are particularly expensive.
lib/TWiki/Plugins/EmptyPlugin.pm
module.
DISABLE_
from the function name.
GetVersion
detection routine are provided for automatic compatibility checking.
$VERSION='0.000'
variable, beginning at 1.000
.
initPlugin
handler should check all dependencies and return TRUE if the initialization is OK or FALSE if something went wrong.
initPlugin
handler).
$VERSION='1.000'
is the current setting in TWiki::Plugins.pm
and in the preinstalled system Plugins (DefaultPlugin, EmptyPlugin, InterwikiPlugin).
MyFirstPlugin.pm
MyFirstPlugin.txt
MyFirstPlugin
topic. Other needed Perl code is best placed in a lib/TWiki/Plugins/MyFirstPlugin/
directory.
The Plugin API handles the details of connecting your Perl module with main TWiki code. When you're familiar with the Plugin API, you're ready to develop Plugins.
lib/TWiki/Plugins/EmptyPlugin.pm
to <name>Plugin.pm
. EmptyPlugin.pm
contains no executable code, so it does nothing, but it's ready to be used. Customize it. Refer to the Plugin API specs for more information.
OUTLINE: Doc Topic Contents
Check EmptyPlugin on TWiki.org for the latest Plugin doc topic template. Here's a quick overview of what's covered: Syntax Rules: <Describe any special text formatting that will be rendered.>" MyFirstPlugin Settings: <Description and settings for custom Plugin %VARIABLES%, and those required by TWiki.>"How-to Instructions: <Step-by-step set-up guide, user help, whatever it takes to install and run, goes here.>" Test Example: <Include an example of the Plugin in action: if it works, the installation was a success!>" Plugin Info: <Version, credits, history, requirements - entered in a form, displayed as a table. Both are automatically generated when you create or edit a page in the TWiki:Plugins web.>"
- Plugins Preferences <If user settings are needed, explain... Entering valuse works exactly like TWikiPreferences and WebPreferences: six (6) spaces and then:>"
- Set <EXAMPLE = value added>
Plugin
, ex: MyFirstPlugin.pm
, and a documentation page with the same name(MyFirstPlugin.txt
).
lib/TWiki/Plugins/MyFirstPlugin.pm
data/TWiki/MyFirstPlugin.txt
pub/TWiki/MyFirstPlugin/uparrow.gif
[a required graphic]
MyFirstPlugin.zip
) and add the entire directory structure from Step 1. The archive should look like this:
lib/TWiki/Plugins/MyFirstPlugin.pm
data/TWiki/MyFirstPlugin.txt
pub/TWiki/MyFirstPlugin/uparrow.gif
MyFirstPlugin.txt
MyFirstPlugin.zip
Dev
, ex: MyFirstPluginDev
. This is the discussion page for future development. (User support for Plugins is handled in TWiki:Support.)
Trash
web.
[More]
(bottom right of page) on the topic to be changed, then, in the new screen, on [Rename/move]
.
Trash
to delete a topic
[Rename/Move]
: the topic will be renamed and links to the topic updated as requested.
[Rename/Move]
.
searchrenameview.tmpl
. First, matching topics in the current Web are listed - matches are to topic. Next, all Webs (including the current one) are listed that match web.topic. Because %SEARCH% is used, Webs marked in WebPreferences as NOSEARCHALL will not show up in the search for refernces to the topic being changed.
Changed references are kept are as short as possible, ex: topic is used in preference to web.topic.
Trash
web - NOT physically erased from the server. All webs share Trash
- in case of a name conflict with a topic already Trash
, the user is alerted and asked to choose a new name.
Trash
web should be be cleared periodically, by archiving the contents if required (recommended), then deleting the files from the Trash
directory.
%<nop>METASEARCH{type="topicmoved" web="%WEB%" topic="%TOPIC%" title="This topic used to exist and was moved to: "}%
<pre>
and <verbatim>
are honoured - no changes are made to text within these areas.
search
can show matches that will not be updated because of case differences. Other mismatches to actual rendered output are also possible as the approaches are so different.
The following shows some limitations of square bracket processing.
-- MikeMannix - 15 Sep 2001[[Old Topic]] => [[NewTopic][Old Topic]] [[old topic]] => [[NewTopic][old topic]] [[old t opic]] => not changed [[OldTopic]] => [[NewTopic]]
twiki/data/
, ex: twiki/data/Newweb
twiki/data/_default
.
% MAINWEB%
, default named Main
. That means, every WikiName signature - Main.SomeUserName
- points to it and would need updating (unless the variable, %MAINWEB%.SomeUserName
, is used throughout).
Oldwebname.
, including the dot so you'll find references like Oldwebname.SomeTopic
.
Newwebname.SomeTopic
or better yet, to %MAINWEB%.SomeTopic
.
WIKIWEBLIST
variable.
twiki/data
and rename or remove the web directory.
twiki/templates
and rename or remove the web directory if present.
twiki/pub
and rename or remove the web directory if present.
----- Revision r1.30 - 07 Sep 2001 - 07:46 - MikeMannix?
|