Розд╕ли:
╤нш╕ матер╕али цього сайту:
Служба новин @ linux.org.ua
Укра╖н╕зац╕я програмного забезпечення
Засоби для перекладач╕в
Перев╕рка правопису
Переклад з рос╕йсько╖ на укра╖нську
Проект англо-укра╖нського словника техн╕чних терм╕н╕в
Документац╕я
Поштов╕ розсилки
Форум
Рекомендован╕ посилання
Команда
|
TWiki Reference Manual (01-Dec-2001)
This page contains all documentation topics as one long, complete reference sheet.
Doubleclick anywhere to return to the top of the page.
Note: Read the most up to date version of this document at http://TWiki.org/cgi-bin/view/TWiki/TWikiDocumentation
Related Topics: TWiki Site, TWiki History, TWiki Planned Features, TWiki Enhancement Requests
Server and client system requirements for TWiki 01-Sep-2001
Maintaining minimum client and server requirements is necessary to keep TWiki deployment as broad as possible.
TWiki is written in Perl 5, uses a number of shell commands, and requires RCS (Revision Control System), a GNU Free Software package. TWiki is developed in a basic Linux/Apache environment. It also works with Microsoft Windows, and should have no problem on any other platform that meets the requirements:
| 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) * |
Current documentation covers Linux only. A TWikiOnWindows installation guide is next.
The TWiki standard installation has extremely low browser requirements:
- HTML 3.2 compliant
- generates XHTML 1.0 pages that are compatible with HTML 3.2
- minimal use of JavaScript in the user interface (degrades gracefully)
- no cookies
- no CSS
You can easily add capabilities, through customizing the templates, for one, while tailoring the browser requirements to your situation.
- The new TWiki Plugins feature currently does not have compatibility guidelines for developers. Plugins can require just about anything: browser-specific functions, stylesheets (CSS), DHTML, Java applets, cookies.
-- Mike Mannix - 15 Sep 2001
Installation instructions for the TWiki 01-Sep-2001 production release
These installation steps are based on the Apache Web server on Linux. TWiki runs on other Web servers and Unix systems, and should be fine with any OS and server that meet the system requirements. Documentation for other platforms is currently limited. For Windows, check TWiki:Codev/TWikiOnWindows. Search the TWiki:Codev web for other intallation notes.
Request and download the TWiki 01-Sep-2001 distribution in Unix ZIP format from http://TWiki.org/download.html. (To install TWiki on SourceForge, for use on a software development project, read TWiki:Codev/SourceForgeHowTo.)
NOTE: If you don't have access to your Web server configuration files - for example, if you're installing on an ISP-hosted account - use the alternative Step 1 instead.
- Create directory
/home/httpd/twiki and unzip the TWiki distribution into this directory.
- The
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.
- The
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 ).
- Now add
ScriptAlias for /twiki/bin and Alias for /twiki to file httpd.conf .
NOTE: The 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.
Example httpd.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>
- Restart Apache by
/etc/rc.d/rc5.d/S85httpd restart .
- Test that the
twiki/bin directory is CGI-enabled by trying visiting it in your browser:
- Enter the URL for the
bin directory, http://yourdomain.com/twiki/bin/.
- Your settings are OK if you get a message like
"Forbidden. You don't have permission to access /twiki/bin/ on this server".
- Settings are NOT correct if you get something like
"Index of /twiki/bin" - recheck your httpd.conf file.
To install TWiki on a system where you don't have server administrator privileges, for example, on a hosted Web account:
- Download and unzip TWiki on your local PC
- Using the table below, create a directory structure on your host server
- Upload the TWiki files by FTP (transfer as text except for the image files in
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 |
- Make sure Perl 5 and the Perl CGI library are installed on your system. The default location of Perl is
/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.
- IMPORTANT: On ISP-hosted accounts, Perl CGI scripts usually require a
.cgi extension to run. Some systems need .pl, the regular Perl extension. Modify all twiki/bin script filenames if necessary.
- Set the file permission of all Perl scripts in the
twiki/bin directory as executable to -rwxr-xr-x (755).
- To be able to edit the Perl scripts and
.tmpl files it is necessary to chown and chgrp -R twiki so all the files have the owner you want.
- NOTE: This Guide assumes user
nobody ownership for all files manipulated by the CGI scripts (executed by the Web server), and user twiki for all other files. You can:
- replace
nobody with another user if your server executes scripts under a different name (ex: default for Debian is www-data).
- HINT: Run the
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).
- replace user
twiki with your own username
- Set the permission of all files below
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.
- Set the permission of the
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.
- Set the permission of the
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.
- NOTE: The
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
- Edit the file
twiki/lib/TWiki.cfg, setting the variables to your needs.
- Set the file extension in the
$scriptSuffix variable to cgi or pl if required.
- Make sure RCS is installed. Set
$rcsDir in twiki/lib/TWiki.cfg to mach the location of your RCS binaries.
- Security issue: Directories
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)
- Test your settings by running the
testenv script from your browser: http://yourdomain.com/twiki/bin/testenv. Check if your twiki/lib/TWiki.cfg configuration file settings are correct.
- Point your Web browser at
http://yourdomain.com/twiki/bin/view and start TWiki-ing away!
- Edit the TWiki Preferences topic in the TWiki:TWiki web to set the
WIKIWEBMASTER email address, and other preferences.
- Edit the Web Preferences topic in each web, if necessary: set individual
WEBCOPYRIGHT messages, and other preferences.
- Enable email notification of topic changes, TWiki Site Tools has more.
- Edit the Web Notify topic in all webs and add the users you want to notify.
- Add the TWiki:Main/PoweredByTWikiLogo to your Web Home topic.
- You can add new
%VARIABLES%. Define site-level variables in the TWiki Preferences topic. See also: TWiki Variables.
That's it for the standard virgin installation of TWiki. Read on for server-level customization options.
With your new TWiki installation up and running, you can manage most aspects of your site from the browser interface. Only a few functions require access to the server file system, via Telnet or FTP. You can make these server-level changes during installation, and at any time afterwards.
- If TWiki is installed on a non-authenticated server - not using SSL - and you'd like to authenticate users:
- Rename file
.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
- NOTE: In case you renamed the CGI script files to have a file extension you need to reflect that in the
edit, view, preview, etc entries in .htaccess.
- NOTE: The browser should ask for login name and password when you click on the Edit link. In case
.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.
- Copy the TWiki Registration Pub topic to TWiki Registration. Do that by either editing the topics in theTWiki web, or by renaming the
.txt and .txt,v files in the twiki/data/TWiki directory.
- HINT: You can customize the registration form by deleting or adding input tags. The
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.
- Register yourself in the TWiki Registration topic.
- NOTE: When a user registers, a new line with the username and encrypted password is added to the
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.
- Create a new topic to check if authentication works.
- Edit the TWiki Admin Group topic in the TWiki:Main web to include users with system administrator status.
- Edit the TWiki Preferences topic in the TWiki:TWiki web to set access privileges.
- Edit the Web Preferences topic in each web, if necessary: set access priviliges.
To create a new web:
- Create a new web data directory under
twiki/data and check the file permission of the directory.
- Use a name starting with characters
A..Z, followed by a..z and/or 0..9 characters, but not a Wiki Word.
- Copy all files from the
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).
- HINT: You can set permissions of
.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.
- Add the new web to the web list (visible in the upper right corner of each topic) by editing the site-level preferences, TWiki Preferences:
- Add the new web to the
%WIKIWEBLIST% variable.
- Update the web settings by editing the WebPreferences topic of the new web:
- Customize the
%WEBTOPICLIST% variable to contain the web-specific links you prefer.
- Set the WEBBGCOLOR variable to a color. The number represents the unique color for the web.
- Set Plugins, access privileges, custom variables, other web-level options (ex:
%WEBCOPYRIGHT% can be set for an individual web).
- Add the new web to the color-coded web directory table by editing the TWiki Webs Table topic.
- Test the new web: view pages, create a new page.
That's it for a basic new web set-up!
Optionally, you can also:
- Create custom web-specific templates in a new
twiki/templates/Someweb directory (otherwise, templates are inherited from twiki/templates).
- Add TWiki Forms for form-based page input that's stored separately from the main free-form topic text.
NOTE: User home topics are located in the linux.org.ua.Main web - don't try to move them or create them in other webs. From any other web, user signatures have to point to linux.org.ua.Main web, using a 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!
See Appendix A: TWiki File System for an installed system snapshot and descriptions of all files in the TWiki 01-Sep-2001 distribution.
-- Peter Thoeny - 13 Sep 2001
-- Mike Mannix - 03 Dec 2001
Upgrade from TWiki 01-Dec-2000 or TWiki 01-Sep-2001 to TWiki 01-Dec-2001 (previous to new full release)
This guide describes how to upgrade either from TWiki 01-Dec-2000 or TWiki 01-Sep-2001 to TWiki 01-Dec-2001.
- The latest version of TWiki (01-Dec-2001) is a small incremental release over the 01-Sep-2001 version.
- The 01-Sep-2001 version involves several major new features and numerous enhancements to the last full version (01-Dec-2000). The file system set-up is almost identical, but much of the underlying data structure and processes is new. With all the changes, the upgrade procedure is straightforward, and your existing page data is imported directly.
- To upgrade from a 01-Dec-2000 or 01-Sep-2001 standard installation to the latest 01-Dec-2001 TWiki Production Release, follow the instructions below.
- To upgrade from a Beta of the new release, or if you made custom modifications to the application, read through all new reference documentation, then use the procedure below as a guideline.
The latest 01-Dec-2001 release includes the following new features and enhancements compared to the 01-Sep-2001 release:
- Formatted Search - New
format="" parameter in %SEARCH{}% variable for database like reporting.
- Various bug fixes
The 01-Sep-2001 release includes the following new features and enhancements compared to the 01-Dec-2000 release:
- TWiki Plugins - Easily install program enhancements using external plug-in modules. Developers can create plug-ins in Perl, with the TWiki Plugin API.
- Interwiki Plugin (preinstalled) - Link to external sites with text aliases,
SiteAlias:Page; rules are defined in Inter Wikis. (Get more Plugins from the TWiki:Plugins web.)
- TWiki Templates - New, more flexible template system.
- TWiki Skins - Overwrite template headers and footers; page content is unaffected.
- TWiki Meta Data - New data format
- TWiki.TWiki Forms - Create multiple input forms per web; data is rendered in HTML tables.
- Managing Topics - Individual topics can be renamed, moved and deleted through the browser. Deleted topics are stored in a common Trash web.
- Change passwords - Change and reset passwords using forms.
- TOC (Table of Contents) -
%TOC% variable generates a hierarchical table of contents from topic headings: <h1>...<h6>.
- Arbitrary Text for Wiki Word Links - Text formatting rules to generate automatic links from any combination of words and spaces.
- Attachments Under Revision Control - Changes made to files attached to topics are now saved under revision control (RCS).
- Super Administrator Group - Lets you to make the members of one user group - by default, TWikiAdminGroup - into TWiki superusers, with the ability to overwrite locked topics from the browser interface. (This gets around the problem of topic lockouts, caused by typos in access privilege definitions.)
- HierarchicalNavigation uses new Meta Data variables to link hierarchically.
- Convert to XHTML - Pages are rendered for display in XHTML 1.0, as far as possible without breaking HTML 3.2 compliance.
The TWiki directory structure remains the same, with one exception, the TWiki configuration file and Perl modules have been moved from the 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 |
A new twiki/lib/TWiki/Plugins directory contains the new Plugin modules.
This incremental update can be performed easily.
The following steps describe the upgrade assuming that $TWIKIROOT is the root of your current 01-Sep-2001 release.
- Back up and prepare:
- Back up all existing TWiki directories
$TWIKIROOT/bin, $TWIKIROOT/pub, $TWIKIROOT/data, $TWIKIROOT/templates.
- Create a temporary directory and unpack the ZIP file there.
- Update files in TWiki root:
- Overwrite all
*.html and *.txt files in $TWIKIROOT with the new ones.
- Update template files:
- Overwrite all template files in
$TWIKIROOT/templates with the new ones.
- Update script files:
- Overwrite all script files in
$TWIKIROOT/bin with the new ones.
- Update library files:
- Overwrite the
TWiki.pm library in $TWIKIROOT/lib with the new one.
- Overwrite all
*.pm library files in $TWIKIROOT/lib/TWiki and $TWIKIROOT/lib/TWiki/Plugins with the new ones.
- Update data/TWiki files: (in case you want the updated docs)
- Using your browser, merge the new TWiki.TWikiRegistration topic (or TWiki.TWikiRegistrationPub in case you used that one) into your existing TWiki.TWikiRegistration topic.
- In the temporary
twiki/data/TWiki directory where you unzipped the installation package:
- Remove the files you do not want to upgrade:
TWikiPreferences.*, TWikiWebsTable.*, WebNotify.*, WebPreferences.*, WebStatistics.* and all WebTopic* files.
- In case the cgi-scripts are not running as user
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
- Move all remaining
*.txt and *.txt,v files from the temporary data/TWiki directory to your $TWIKIROOT/data/TWiki directory.
- Update pub/TWiki files:
- Move the new
pub/TWiki/TWikiDocGraphics directory into your $TWIKIROOT/pub/TWiki directory.
The idea is to have the new and old installation work in parallel so that you can test the new installation before switching over. That way you can make the switch on your live TWiki installation within one minute without affecting the users.
| 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) |
Alternatively you could move the existing installation away, install the 01-Dec-2001 release into it's place and move your webs and pub files back.
Follow this step-by-step guide to upgrade from the 01-Dec-2000 TWiki to the 01-Dec-2001 release, importing your original page data and related files:
Two major areas of TWiki functionality - TWiki Templates and TWiki Forms (input forms associated with a topic)- are entirely different in the new TWiki. If you've customized your templates or use Category Tables, read those sections before starting your upgrade.
The following steps describe the upgrade on Unix. Windows setup is very similar. It's assumed that $TWIKIROOT is the root of your current 01-Dec-2000 release, ex: export TWIKIROOT=/some/dir/
- Back up all existing TWiki directories
twiki/bin, twiki/pub, twiki/data, twiki/templates.
- Create a temporary directory and unpack the ZIP file there:
mkdir -p ~/tmp/
cp -p ~/downloads/TWiki20011201.zip ~/tmp/
cd ~/tmp/
unzip ~/tmp/TWiki20011201.zip
- Move the document files to your TWiki root (
twiki ):
mv ~/tmp/TWiki*.html $TWIKIROOT
mv ~/tmp/index.html $TWIKIROOT
mv ~/tmp/readme.txt $TWIKIROOT
mv ~/tmp/license.txt $TWIKIROOT
- Move & rename the template directory to a temporary
twiki/templates2 directory, ex:
mv ~/tmp/templates $TWIKIROOT/templates2
- Pay attention to the file and directory permissions (security issue). Set file permissions, ex:
chmod 644 *.cgi
- Move the TWiki web to a temporary TWiki2
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
- Move & rename the Know web to a temporary
twiki/data/Know2 directory, ex:
mv ~/tmp/data/Know $TWIKIROOT/data/Know2
mv ~/tmp/pub/Know $TWIKIROOT/pub/Know2
- Move the _default and Trash web, ex:
mv ~/tmp/data/_default $TWIKIROOT/data
mv ~/tmp/data/Trash $TWIKIROOT/data
- Move the MIME types file, ex:
mv ~/tmp/data/mime.types $TWIKIROOT/data
- Move the TWiki logo files, ex:
mv ~/tmp/pub/*.gif $TWIKIROOT/pub
- Pay attention to the file permissions of the
TWiki2 and Know2 directories and its files. The files must be writable by the cgi-scripts (usually user nobody).
- In case the cgi-scripts are not running as user
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
Step 5: Install new CGI scripts
- Move & rename the CGI script directory to a temporary
twiki/bin/2 directory, ex:
mv ~/tmp/bin $TWIKIROOT/bin/2
- If necessary, change the script names to include the required extension, ex:
.cgi
- Copy any additional scripts you might have from the 01-Dec-2000 release, ex:
cp -p $TWIKIROOT/bin/somescript $TWIKIROOT/bin/2
- In case you use basic authentication, rename
.htaccess.txt to .htaccess and customize it, ex:
cd $TWIKIROOT/bin/2
mv .htaccess.txt .htaccess
diff ../.htaccess .
and merge the content
- Pay attention to the file and directory permissions (security issue). Set permissions, ex:
chmod 755 *.cgi
- Move the lib directory to a temporary
twiki/bin/lib directory, ex:
mv ~/tmp/lib $TWIKIROOT/bin
- Pay attention to the file and directory permissions (security issue). Set permissions, ex:
chmod 644 *.pm
- Merge the content of the old
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
- Make sure to set the correct temporary location of templates and scripts, ex:
$scriptUrlPath = "/twiki/bin/2";
$templateDir = "/home/httpd/twiki/templates2";
- Do not merge the functions
extendHandleCommonTags, extendGetRenderedVersionOutsidePRE, extendGetRenderedVersionInsidePRE from the old twiki/bin/wikicfg.pm. This is now handled by the Default plugin twiki/lib/TWiki/Plugins/Default.pm
- Test your new TWiki installation to see if you can view topics. Point your browser to the old installation and fix the URL to see the new installation, ex:
- Old URL:
http://localhost/cgi-bin/view
- New URL:
http://localhost/cgi-bin/2/view
You can do the following changes using your old TWiki 01-Dec-2000 or new TWiki 01-Dec-2001 installation. Pointing your browser to the old installation for edit-copy-edit-paste operations is recommended, so that users don't get surprised by meta data content showing up in topics.
- Remember that you now have two TWiki webs:
- The original
TWiki web.
- The new
TWiki2 web, which gets renamed to TWiki when you switch over the installation.
- In case you customized
TWiki.TWikiRegistration, merge your changes back into TWiki2.TWikiRegistration.
- Copy
TWiki.TWikiWebsTable to TWiki2.TWikiWebsTable.
- Do the same for any other topics you might have created in the
TWiki web.
- In
TWiki2.TWikiPreferences, merge the old TWiki.TWikiPreferences settings and customize it.
- Add your webs to WIKIWEBLIST
- Set the WIKIWEBMASTER
- Set the SMTPMAILHOST
- In
WebPreferences of all webs, add or change the following web preferences: (see TWiki.WebPreferences)
- Add a NOSEARCHALL in case you want to exclude the web from a
web="all" search:
* Set NOSEARCHALL = on
- In WEBTOPICLIST, remove the
%WEB% . {} decoration from the list (it is now in the templates), ex:
* Set WEBTOPICLIST = <a href="WebHome">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" />
- Add a these new preferences:
* Set DENYWEBVIEW =
* Set ALLOWWEBVIEW =
* Set DENYWEBRENAME =
* Set ALLOWWEBRENAME =
- Set the FINALPREFERENCES:
* Set FINALPREFERENCES = WEBTOPICLIST, DENYWEBVIEW, ALLOWWEBVIEW, DENYWEBCHANGE, ALLOWWEBCHANGE, DENYWEBRENAME, ALLOWWEBRENAME
- Optional: In
WebSearch of all webs, replace content with this one line:
%INCLUDE{"%TWIKIWEB%.WebSearch"}%
- Optional: In
WebChanges of all webs, replace content with this one line:
%INCLUDE{"%TWIKIWEB%.WebChanges"}%
NOTE: Skip this step if you did not customize your template files.
- Remember that you have now two template directories:
- The original
twiki/templates.
- The new
twiki/templates2, which gets renamed to twiki/templates when you switch over the installation.
- Customized templates and skins need to be upgraded to the new TWiki Templates. This isn't difficult, but you have be familiar with the new template set-up before starting the conversion. The safest way is to use the new templates as a base and to merge your changes back. Changes in new templates:
- Templates are now rendered by TWiki. You can use all Text Formatting Rules, but you have to escape unwanted ones. Also, remove empty lines unless you want a
=<p /> tag added.
- Added TWiki Meta Data rendering.
- Form Templates replace the TWikiCategoryTables:
- Create a replacement
WebForm topic based on twikicatitems.tmpl in each web that uses a Category Table. See details in TWiki Forms and compare with the settings in the Know2.WebPreferences topic.
NOTE: Do not remove the twikicatitems.tmpl file, it is still used for topics that are of the old format.
- Searches need to be adjusted to deal with format change. It is possible to define a regular expression search that can deal at the same time with topics in the old format and new format.
- Example: List all topics in the Know web that have a Topic Classification of Public FAQ:
%SEARCH{ "[T]opicClassification.*?(td..td|value\=).*?[P]ublicFAQ" casesensitive="on" regex="on" nosearch="on" web="Know"}% (The [T] and [P] is done so that search does not find the topic where this search string is located in!)
- Example: Create a link that lists all topics in the Know web with a Topic Classification of Public FAQ:
[[%SCRIPTURL%/search%SCRIPTSUFFIX%/Know/?scope=text &search=%5BT%5DopicClassification.*%3F%28td..td%7C value%5C%3D%29.*%3F%5BP%5DublicFAQ®ex=on][All Public FAQ]] All Public FAQ
- For each web that has a custom
notedited.tmpl template, create an equivalent Web Topic Edit Template to conform with the new Template Topics. The new format replaces the notedited.tmpl, notext.tmpl and notwiki.tmpl templates.
In this step, you move the working 01-Dec-2001 installation to the old 01-Dec-2000 installation, so that users don't have to change the URL.
- Test your new 01-Dec-2001 installation under
twiki/bin/2/view to make sure everything works as expected.
- NOTE: Don't worry about the Plugins, they'll work after the switch.
- Edit
$TWIKIROOT/bin/2/TWiki.cfg and remove the /2 from $scriptUrlPath and $templateDir, ex:
$scriptUrlPath = "/twiki/bin";
$templateDir = "/home/httpd/twiki/templates";
- Rename the
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
- Rename the
templates2 directory to templates, ex:
cd $TWIKIROOT
mv templates templates1
mv templates2 templates
- Move the
lib directory one level up from $TWIKIROOT/bin/lib to $TWIKIROOT/lib, ex:
cd $TWIKIROOT
mv bin/lib .
- Copy content of
bin/2 to bin, ex:
cd $TWIKIROOT/bin
cp -p bin/2/* .
cp -p bin/2/.htaccess .
- Point your browser to the original URL and make sure the relocated 01-Dec-2001 installation works as expected: check browsing, searching and user registration.
- Clean up and remove obsolete directories:
- Remove directory
$TWIKIROOT/bin/2
- Remove directory
$TWIKIROOT/templates1
- Remove directory
$TWIKIROOT/data/TWiki1
- Remove directory
$TWIKIROOT/pub/TWiki1
- Remove temporary directory, ex:
~/tmp
- Test the new TWiki Plugins by checking the Plugins settings in TWiki Preferences.
- The
EmptyPlugin, DefaultPlugin, and InterwikiPlugin should be preinstalled. To check the Interwiki Plugin, go to its page.
- If you have customized the functions
extendHandleCommonTags, extendGetRenderedVersionOutsidePRE and extendGetRenderedVersionInsidePRE in twiki/bin/wikicfg.pm:
- Merge those changes back into
twiki/lib/TWiki/Plugins/Default.pm
- The format of the
%GMTIME{"..."}% and %SERVERTIME{"..."}% variables is now "$hour:$min" instead of "hour:min". More in TWiki Variables.
- Extending Table Syntax: Enhanced table syntax might have unwanted side effect:
| *bold* | cells, | center aligned | and | right aligned | cells, span multiple columns using | empty cells |||. More in Text Formatting Rules.
- Use
Net::SMTP module instead of sendmail if installed.
- Use
<verbatim> ... </verbatim> tags instead of <pre> ... </pre> tags where appropriate. More in Text Formatting Rules.
- New variable
%STARTINCLUDE% and %STOPINCLUDE% variables to control what gets included of a topic. More in TWiki Variables.
- File Attachment info is now stored as TWiki Meta Data.
- Upgrading of imported pagess is done automatically after first edit, on save. "In memory" upgrade is done on topic view.
- Attachments are now under revision control:
$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.
- Handling for topic-specific templates like
edit.new.tmpl has been removed and replaced by template topics in the new TWiki Templates.
- A new file
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.
- Check TWiki:Codev/KnownIssuesOfTWiki01Dec2001 for known issues of TWiki 01 Dec 2001 (production release)
- Check TWiki:Codev/KnownIssuesOfTWiki01Sep2001 for known issues of TWiki 01 Sep 2001 (production release)
-- John Talintyre - 18 Jul 2001
-- Mike Mannix - 12 Sep 2001
-- Peter Thoeny - 03 Dec 2001
TWiki site access control and user activity tracking
TWiki does not authenticate users internally, it depends on the 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.
No special installation steps are required if the server is already authenticated. If it isn't, you have three standard options for controlling user access:
- Forget about authentication to make your site completely public - anyone can browse and edit freely, in classic Wiki mode. All visitors are assigned the TWiki Guest default identity, so you can't track individual user activity.
- Use SSL (Secure Sockets Layer; HTTPS) to authenticate and secure the whole server.
- Use Basic Authentication (.htaccess) to control access by protecting key scripts:
attach, edit=, installpasswd, preview, rename, save, upload using the .htaccess file. The TWiki Installation Guide has step-by-step instructions.
Tracking by IP address is an experimental feature, enabled in lib/TWiki.cfg. It lets you combine open access to some functions, with authentication on others, with full user activity tracking:
- Normally, the
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 Wiki Name in preview for the %WIKIUSERNAME% variable, but view will show TWikiGuest instead of your WikiName.
- TWiki can be configured to remember the IP address/username pair whenever an authentication happens (edit topic, attach file). Once remembered, the non-authenticated scripts, like
view, will show the correct username instead of TWiki Guest.
- Enable this feature by setting the
$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.
- NOTE: This approach can fail if the IP address changes due to dynamically assigned IP addresses or proxy servers.
Quick Authentication Test - Use the %WIKIUSERNAME% variable to return your current identity:
This section applies only if your linux.org.ua is installed on a server that is both authenticated and on an intranet.
linux.org.ua internally manages two usernames: Login username and TWiki username.
- Login username: When you login to the intranet, you use your existing login username, ex:
pthoeny. This name is normally passed to linux.org.ua by the REMOTE_USER environment variable, and used by internally by linux.org.ua. Login usernames are maintained by your system administrator.
- TWiki username: Your name in Wiki Notation, ex:
PeterThoeny, is recorded when you register using TWiki Registration; doing so also generates a personal home page in the Main web.
linux.org.ua can automatically map an intranet username to a TWiki username, provided that the username pair exists in the TWiki Users? topic. This is also handled automatically when you register.
NOTE: To correctly enter a Wiki Name - 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:
Main.WikiUsername or %MAINWEB%.WikiUsername
This points WikiUser to the linux.org.ua.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 New Topic? everywhere but in the Main web.
Change and reset passwords using forms on regular pages. Use TWiki Access Control to restrict use as required.
Change password
Forgot your old password? Then use Reset Password instead. Please only use Reset Password in case you really forgot your password. Thank you.
After submitting this form your password will be changed.
Request for reset of password
Please only use this ResetPassword form in case you really forgot your password. Otherwise just change it using Change Password. Thank you.
After submitting this form you will receive a page with your new password appearing encrypted.
-- Mike Mannix - 29 Aug 2001
Restricting read and write access to topics and webs, by users and groups
TWiki Access Control allows you restrict access to single topics and entire webs, by individual user and by user groups, in three main areas: view; edit & attach; and rename/move/delete. These controls, combined with TWiki User Authentication, let you easily create and manage an extremely flexible, fine-grained privilege system.
Open, freeform editing is the essence of the Wiki Culture - it's what makes TWiki different and often more effective than other collaboration tools. So, it is strongly recommended that decisions to restrict read or write access to a web or a topic are made with care. Experience shows that unrestricted write access works very well because:
- Peer influence is enough to ensure that only relevant content is posted.
- Peer editing - the ability to rearrange anything on a page - keeps topics focussed.
- All content is preserved under revision control.
- Edits can be undone by the TWiki Admin Group (the default administrators group; see #ManagingGroups).
- Users are encouraged to edit and refactor (condense a long topic), since there's a safety net.
As a collaboration guideline:
- Create broad groups (more and varied input), and...
- Avoid creating view-only users (if you can read it, you can contribute to it).
Access control is based on users and groups. Users are defined by their Wiki Names, an then organized into unlimited combinations under different user groups.
A user is created by with the TWiki Registration form. The process generates a topic in the Main web in the new user's Wiki Name. The default visitor name is TWiki Guest.
- Users can be authenticated using Basic Authentication or SSL. TWiki User Authentication is required in order to track user identities.
Groups are defined by group topics in the Main web, like the TWiki Admin Group. To start a new group:
- Create a new topic with A name that ends in Group,
SomeGroup
- Define two variables:
- Set GROUP = < list of users and groups >
- Set ALLOWTOPICCHANGE = < list of users and groups >
- GROUP is a comma-separated list of users and of other groups:
Set GROUP = Main.SomeUser, Main.OtherUser, Main.SomeOtherGroup
- ALLOWTOPICCHANGE defines who is allowed to change the group topic; it is a comma delimited list of users and groups. You typically want to restrict that to the members of the group itself, so it should contain the name of the topic,
Set ALLOWTOPICCHANGE = Main.TWikiAdminGroup
for the TWikiAdminGroup topic. (This prevents users not in the group from editing the topic and from gaining unauthorized membership to the group.)
You can define who is allowed to make changes to a web or a topic.
Denying editing of a topic also restricts attaching files to it; both privileges are assigned together.
- Define one or both of these variables in a topic, preferably at the end of the page:
- Set DENYTOPICCHANGE = < list of users and groups >
- Set ALLOWTOPICCHANGE = < list of users and groups >
- DENYTOPICCHANGE defines users or groups that are not allowed to make changes to the topic. It is a comma delimited list of users and groups. Example:
* Set DENYTOPICCHANGE = Main.SomeBadBoy, Main.SomeBadGirl, Main.SomeHackerGroup
- ALLOWTOPICCHANGE defines users or groups that are allowed to make changes to the topic. It is a comma delimited list of users and groups. Example:
* Set ALLOWTOPICCHANGE = Main.SomeGoodGuy, Main.SomeGoodGirl, Main.TWikiAdminGroup
- DENYTOPICCHANGE is evaluated before ALLOWTOPICCHANGE. Access is denied if the authenticated person is in the DENYTOPICCHANGE list, or not in the ALLOWTOPICCHANGE list. Access is granted in case DENYTOPICCHANGE and ALLOWTOPICCHANGE is not defined.
Restricting web-level editing blocks creating new topics, changing topics or attaching files.
- Define one or both of these variable in the Web Preferences topic:
- Set DENYWEBCHANGE = < list of users and groups >
- Set ALLOWWEBCHANGE = < list of users and groups >
The same rules apply as for restricting topics, with these additions:
- DENYTOPICCHANGE (in topic) overrides DENYWEBCHANGE (in WebPreferences)
- ALLOWTOPICCHANGE (in topic) overrides ALLOWWEBCHANGE (in WebPreferences)
You can define who is allowed to rename, move or delete a topic, or rename a web.
To allow a user to rename, move or delete a topic, they also need write (editing) permission. They also need write access to change references in referring topics.
- Define one or both of these variables in a topic, preferably at the end of the topic:
- Set DENYTOPICRENAME = < list of users and groups >
- Set ALLOWTOPICRENAME = < list of users and groups >
- DENYTOPICCRENAME defines users or groups that are not allowed to rename the topic. It is a comma delimited list of users and groups. Example:
* Set DENYTOPICRENAME = Main.SomeBadBoy, Main.SomeBadGirl, Main.SomeHackerGroup
- ALLOWTOPICRENAME defines users or groups that are allowed to rename the topic. It is a comma delimited list of users and groups. Example:
* Set ALLOWTOPICRENAME = Main.SomeGoodGuy, Main.SomeGoodGirl, Main.TWikiAdminGroup
- DENYTOPICRENAME is evaluated before ALLOWTOPICRENAME. Access is denied if the authenticated person is in the DENYTOPICRENAME list, or not in the ALLOWTOPICRENAME list. Access is granted in case DENYTOPICRENAME and ALLOWTOPICRENAME is not defined.
You can define restrictions of who is allowed to rename a linux.org.ua web.
- Define one or both of these variable in the Web Preferences topic:
- Set DENYWEBRENAME = < list of users and groups >
- Set ALLOWWEBRENAME = < list of users and groups >
The same rules apply as for topics, with these additions:
- DENYTOPICRENAME (in topic) overrides DENYWEBRENAME (in WebPreferences)
- ALLOWTOPICRENAME (in topic) overrides ALLOWWEBRENAME (in WebPreferences)
You can define restrictions of who is allowed to view a linux.org.ua web.
- Define one or both of these variable in the Web Preferences topic:
- Set DENYWEBVIEW = < list of users and groups >
- Set ALLOWWEBVIEW = < list of users and groups >
- The view restriction is not suitable for very sensitive content since there is a way to circumvent the read access restriction.
- Read access restriction only works if the view script is authenticated, that means that users need to log on also just to read topics. TWiki Installation Guide has more on Basic Authentication based on the
.htaccess file.
- There is a workaround if you prefer to have unrestricted access to view topics located in normal webs, and to authenticate users only for webs where view restriction is enabled:
- Omit the
view script from the .htaccess file.
- Enable the
$doRememberRemoteUser flag in lib/TWiki.cfg as described in TWiki User Authentication. linux.org.ua will now remember the IP address of an authenticated user.
- Copy the
view script to viewauth (or better, create a symbolic link)
- Add
viewauth to the list of authenticated scripts in the .htaccess file.
- When a user accesses a web where you enabled view restriction, linux.org.ua will redirect from the
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.
- If you enable view restriction for a web, it is recommended to restrict search "all webs" from searching this web. Enable this restriction with the
NOSEARCHALL variable in its Web Preferences, like:
- It is not recommended to restrict view access to individual topics since all content is searchable within a web.
-
To hide access control settings from normal browser viewing, place them in comment markers.
<!--
Set DENYTOPICCHANGE = Main.SomeGroup
-->
By mistyping a user or group name in the ALLOWTOPICCHANGE setting, it's possible to lock a topic so that it no-one can edit it from a browser. To avoid this:
- Set the
$superAdminGroup variable in lib/TWiki.cfg to the name of a group of users that are always allowed to edit/view topics.
$superAdminGroup = "TWikiAdminGroup";
- The default setting is not to have superusers.
-- Mike Mannix - 02 Dec 2001
Working in TWiki is as easy as typing in text - exactly like email. You don't need to know HTML, though you can use it if you prefer. Links to topics are created automatically when you enter Wiki Words. And TWiki shorthand gives you all the power of HTML with a simple coding system that takes no time to learn. It's all layed out below - refer back to this page in a pop-up window from the Edit screen.
|
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 TWiki Variables.
|
---++ Sushi
---+++ Maguro
|
Sushi
Maguro
|
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
|
- Sushi
- 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.
|
- 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 |
|
| L | C | R |
| A2 | 2 | 2 |
| A3 | 3 | 3 |
| multi span |
| A4 | next | next |
|
WikiWord Links:
CapitalizedWordsStuckTogether (or Wiki Words) will produce a link automatically. Note: In case you want to link to a topic in a different linux.org.ua web write Webname.TopicName.
|
WebNotify
Know.ReadmeFirst
|
Web Notify
Readme First
|
#SquareBrackets
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 Text Formatting FAQ. 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. Wiki Syntax) 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 [[WebHome#MyAnchor][go home]] and [[http://www.yahoo.com/#somewhere][Yahoo!]].
|
[[WikiSyntax][syntax]]
[[http://gnu.org][GNU]]
|
syntax
GNU
|
Anchors:
You can define a link reference inside a linux.org.ua 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 Wiki Word. 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
|
Web Home#Not There
Jump
To here
|
Prevent a Link:
Prevent a Wiki Word from being linked by prepending it with the <nop> tag.
|
<nop>SunOS
|
SunOS
|
|