if (PageVar($pagename, '$PasswdEdit')) { ....special markup settings.... } Yes, that is probably better. Why are there two different Function summaries? http://www.pmwiki.org/wiki/PmWiki/Functions (no PageVar) http://www.pmwiki.org/wiki/Cookbook/Functions (no ReadPage) Frank Hans wrote: Thursday, October 1, 2009, 10:54:48 PM, Frank wrote:For me and my users, this should do the trick in local/config.php $page = RetrieveAuthPage($pagename, 'read', true); if ($page['passwdedit']) Markup(...);It may do the trick for you, but mind that checking $page['passwdedit'] may not be enough, as an edit passoword may be set on the GroupAttributes page, or as a general default password in config (the famous attributes cascade). so to catch any of these, this code may be better: if (PageVar($pagename, '$PasswdEdit')) { ....special markup settings.... } PageVar($pagename, '$PasswdEdit') returns the attribute string, information as to which users or group of users are authorised, and if there is a password, shown as ******. It is empty if nothing is set, on any level. {$PasswdEdit} can be used in pages to show this info, or in templates etc. See also http://www.pmwiki.org/wiki/PmWiki/PageVariables and http://www.pmwiki.org/wiki/Cookbook/PagelistAuthListShort (for an example of use in a pagelist template) Hans -- _______________________________________________________________________ Dr. Frank F. Schweickert AMSTEL Institute, Faculty of Science, University of Amsterdam Science Park 904, Amsterdam, Room C2-1.22 Postal address: Postbus 94224, 1090 GE Amsterdam Phone: +31 20 525-8475 (secr. -5886) http://www.science.uva.nl/amstel http://www.natsim.net |
_______________________________________________ pmwiki-devel mailing list pmwiki-devel@pmichaud.com http://www.pmichaud.com/mailman/listinfo/pmwiki-devel