OpenPass-Talk
This space is for User-contributed commentary and notes. Please include your name and a date along with your comment.
Here is an easy alternative
- Edit the Site.AuthForm page, inserting something similar to the following under the summary, and before the
(:messages:)
line
-< You are welcome to contribute to our website, [[<<]] (:if expr name Excluded/Pages,GroupHeader,GroupFooter,GroupAttributes or group Site,SiteAdmin,PmWiki*,ExcludedGroups :) %noprint%to access this part of the website please provide the required authentication (:else:) %noprint%please enter the word ''open%comment%456%noprint%passphrase'' below to do so. (:ifend:) |
You are welcome to contribute to our website,
|
- in
config.php
add the line$DefaultPasswords['edit'] = pmcrypt('openpassphrase');
To explain:
- the
config.php
line sets the default password for the entire wiki website. Separate passwords can be set for individual groups and pages to prevent them from being edited. - the
if expr name or group
lines hide the open passphrase message from pages that do not have an open passphrase (it is not possible to programmatically detect which pages have an open passphrase) - the
comment
in thenoprint
line is a small diversion that may prevent robots from picking up the open passphrase by inserting invisible text on the page. %noprint%
is alocal.css
customisation where printing is disabled, viz:
@media print { /* style sheet for print */ .noprint {display : none;} /* don't print these items */ }
Note that the whole point of OpenPass is to communicate a message to the user (the message telling them what the open password is) at the moment they are supposed to enter a password. But it is supposed to do this *only* if this current page is really protected only by the open password. Being told to try "xyz" when the password for the current page is really "abc" will lead to pretty significant frustration. So the easy option above is great as long as you are not planning on setting passwords on individual pages or groups (or if you are willing to go and edit your conditional for each of those individual password-protected entities). But for most of us who have most of the wiki open but a few pages locked down we will probably be better served by the OpenPass recipe rather than this simple alternative. Peter Bowers June 14, 2012, at 09:41 AM