[pmwiki-users] How to add a read password field to the edit form
Lars Grau
mail at larsgrau.de
Mon Aug 11 05:40:17 CDT 2008
We have pmwiki-2.2.0-beta65 running with LDAP authentication. We allow
only authenticated users to edit pages. ( In config.php:
$DefaultPasswords['edit'] = 'id:*'; )
Now we'd like to add a checkbox "This is a public page" to the edit
form that does the following: If unchecked (default), the read
password for the page being edited should be set to "id:*" allowing
only authenticated users to VIEW the page. If the author activates the
checkbox, the read password should be cleared.
Can anyone point us into a direction how to do this via a cookbook
recipe or even better - provide the code? We're familiar with PHP in
general, but we'd like to keep PmWiki as close to the original
distribution for future updates and therefore need support in
"hooking" this into the software.
Tricky sidenote: To be even more precise, if a read password has
already been set by "?action=attr" (i.e. "secret"), we'd like the
recipe to append the "id:*" rather than over-writing the entire
attribute. Same applies for clearing the field. The "id:*" should be
removed, but everything else should remain untouched.
Thanks a lot in advance.
Larsen.-
More information about the pmwiki-users
mailing list