Add a PmWiki Site
AdminNotes | Add a PmWiki site
On the UJ Physics server we use PmWiki, and multiple sites with a single software install. This makes it easier to keep the software (which is not a standard SL RPM) updated even if the wikis become many more.
Procedure to add a PmWiki Site
You start by making a copy of the template wiki site, and adjusting permissions (because uploads
and wiki.d
must be writable by Apache)
$ cd /WWW/wiki $ cp -r AAA_ExampleWiki yoursite $ sudo ./fixPerm.sh
Then you tell Apache where to find the new Wiki: in /etc/httpd/conf.d/AA_wiki.conf
add an alias line, like
Alias /wiki/yoursite /WWW/wiki/yoursite/index.php
and update Apache: sudo /sbin/service httpd reload
Then edit /WWW/wiki/yoursite/local/config.php
to set ScriptUrl and title
$title = "My synchrotron wiki"; $ScriptUrl = "/wiki/yoursite";
See notes in the config.php file for setting a site admin password. If unset, it gets the global wiki admin password.
And then enjoy your new wiki!
Please read about PmWiki.
Procedure to add User Authentication
You can configure your wiki site to use, instead of the normal single password for everybody, separate users, each with his own password. Users can also belong to groups, and user groups can be given specific rights (Attributes) to specific pages (using action=attr
) or page groups (using PageGroup/GroupAttributes?action=attr
). See AuthUser for more information.
Please note that an admin password (set in config.php
), with a blank username, will always be able to override all Attributes.
Procedure:
- add
include_once("
in your$FarmD
/scripts/authuser.php");config.php
- login with a blank username and the admin password
- add users, passwords and groups by editing the page
wiki/yoursite/Site/AuthUser
- make sure you have at least one person in the
@admin
group
- make sure you have at least one person in the
- configure
wiki/yoursite/Site/AuthUser?action=attr
putting@admin
in each field including Read - configure
wiki/yoursite/Site/GroupAttributes?action=attr
putting@admin
in each field except Read - you may change
config.php
to directly use the new groups. It's anyway nice to keep the old password commented in case something goes wrong in Site/AuthUser
#$DefaultPasswords['admin']='$1$xxxxxxxxxxxxxxx'; $DefaultPasswords['admin']="@admin"; $DefaultPasswords['attr']="@admin"; $DefaultPasswords['edit']=array("@admin","@myeditors"); $DefaultPasswords['upload']=array("@admin","@myeditors");
- you can configure
Site/PageActions
to hide the Edit link from those who did not login, for example:
* %item rel=nofollow class=print accesskey='$[ak_print]'%[[{$FullName}?action=print | $[Print] ]] * %item class=browse accesskey='$[ak_view]'%[[{$FullName} | $[View] ]] * %item rel=nofollow class=diff accesskey='$[ak_history]'%[[{$FullName}?action=diff | $[History] ]] (:if !authid:) * %item rel=nofollow class=login accesskey='$[ak_login]'%[[{$FullName}?action=login | $[Login] ]] (:if auth edit:) * %item rel=nofollow class=edit accesskey='$[ak_edit]'%[[{$FullName}?action=edit | $[Edit] ]] * %item rel=nofollow class=rename accesskey='$[ak_edit]'%[[{$FullName}?action=rename | $[Rename] ]] * %item rel=nofollow class=links accesskey='$[ak_edit]'%[[{$FullName}?action=links | $[Links] ]] (:if auth upload:) * %item rel=nofollow class=upload accesskey='$[ak_attach]'%[[{$FullName}?action=upload | $[Attach] ]] (:if auth attr:) * %item rel=nofollow class=attr accesskey='$[ak_Attr]'%[[{$FullName}?action=attr | $[Attributes] ]] (:if authid:) * %item rel=nofollow class=logout accesskey='$[ak_logout]'%[[{$FullName}?action=logout | $[Logout] ]] (:if:)