Advertisment

TWiki for your intranet

author-image
PCQ Bureau
New Update

In the last issue, we saw how you can easily set up a web-based collaboration platform with TWiki. The main philosophy behind TWiki is that a user can edit any page and the revisions of such changes are maintained for cross-reference and archiving. A TWiki site is divided into four main sections, known as webs. These are: ‘Main’ for placing the main content of discussion, the ‘TWiki’ user guide, ‘Know’ for setting up a knowledge sharing system and finally ‘Sandbox’ to experiment with TWiki in full swing. In this conclusive article, we’ll build a collaboration website using

TWiki. 

Advertisment

1

Set up the E-mail Server
The first thing you need to do is to set up TWiki to talk to your email server. You can do this by editing the TWikiPreferences topic in the TWiki web and clicking on ‘Email and Proxy Server Settings’. These are available at

http://192.168.1.159/twiki/bin/view/TWiki/TWikiPreferences#Email_and_Proxy_Server_Settings

Where you need to replace the IP address with whatever you’ll be running TWiki with. Once here, you have to edit this page by clicking on Edit at the bottom of the page and set the following:

Advertisment

WIKIWEBMASTER should be set to the email address of the TWiki administrator. 

Our TWiki installation used Sendmail, so we left the SMTPMAILHOST setting to default, but you’ll have to change it as per what you’re using (defined by $mailProgram in TWiki.cfg). 

SMTPSENDERHOST is optional, and is set to the domain name sending the email (e.g.

twiki.yourdomain.com). 

Advertisment

Set the ProxyPort if one is used in your setup, for example, 

ProxyPort: 8989

2

Set up Authentication

Now users can access any page on the TWiki web and edit it. But they will not leave their own mark on the page if they are not required to authenticate. Everyone will be TwikiGuest. To set up authentication you need to tweak TWiki just a little bit. 
Advertisment

All this is assuming you’re running TWiki on Apache web server. First rename the file .htaccess.txt in the twiki/bin directory to .htaccess and change it to according to your needs. Specifically, redirect the part highlighted below to the correct location:

/urlpathto/twiki/index.html, http://yourdomain.com/urlpathto/twiki/bin/view

and AuthUserFile /filepathto/twiki/data/.htpasswd 



ErrorDocument 401 /urlpathto/twiki/bin/oops/TWiki/TWikiRegistration?template=oopsauth 

Next, you need to add “AllowOverride All” to the Directory section of access.conf for your twiki/bin directory. 

Advertisment

…. 






Options +ExecCGI


SetHandler cgi-script


Allow from al


AllowOverride All











….







And finally copy the TWikiRegistrationPub topic to TWikiRegistration, overwriting old version of
TWikiRegistration. 

….



cd /home/httpd/twiki/data/TWiki 


mv TWikiRegistrationPub.txt TWikiRegistration.txt


mv TWikiRegistrationPub.txt,v TWikiRegistration.txt,v


….


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. You can also customize the default user home page in NewUserTemplate. Try to edit a page to check if the authentication works. You can always sign in as TwikiGuest with the password guest, till you have some users signed up. 

Advertisment

3

Add Users and Groups

That’s all you really need to setup. Now add users or groups by visiting the respective pages. There are many things you can customize now to suit your preferences, for instance, the office locations. Go to the Offices page and add your office locations by simply editing the page and adding the bullets. You can just follow the existing text format.

Users



Next add users, because you need some users to group them. Visit TWikiUsers page where you will see an alphabetic list of existing users. The names you are likely to see registered there are members of the TWiki developers team. You need to add your own team of users. Click on TWikiRegistration. You will see the form where you can enter details like name, WikiName(a WikiName, that is capitalized first letters written together of running words, in this case, first name and last name), e-mail address, password, and location. Here again, you may need to edit the page to add the list of office locations that you have just entered on the Offices page. Edit this page and include the office locations. Then add details for each user you want to include in your TWiki site and an automatic email about their registration will be fired to each of them. 



You can also send an email to people requesting them to register themselves on the TWikiRegistration page. 

Users can access any page on the TWiki Web and edit it

Advertisment

Groups



Now you can add groups. To add a new group, you need to edit the TWikiGroups page by adding a new topic name (a WikiName), for example, EngineeringGroup, MarketingGroup, and HumanResources Group. 



Once you’ve added the group name as a topic, set preferences for two variables in the new group topic, GROUP and
ALLOWTOPICCHANGE:

Set GROUP = < list of Users and/or Groups >

Here, the list of users or groups is a comma-separated list of registered TWiki users. 

Set GROUP = Main.RajMohan, Main.LeelaChitnis, Main.RahulSingh 

And so on. Next, you can set access privileges for this group in the same manner:

Set ALLOWTOPICCHANGE = < list of Users and/or Groups > 

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. (This prevents Users not in the Group from editing the topic). For example, for the TWikiAdminGroup topic write: 

Set ALLOWTOPICCHANGE = Main.TWikiAdminGroup

You’re now all set to start using TWiki. Add text, attach documents, graphics, what you will. You can also add names of users in WebNotify so they can get automatic alerts whenever some content is changed on TWiki. Happy

TWiking!

Shruti Pareek

Advertisment