Thursday, November 27, 2008, 1:25:30 PM, noskule wrote: > ok I try that, is there an example somwhere how to change attributes of pages > in php?
I have no time to create a function, but here http://www.pmwiki.org/wiki/Cookbook/FoxPageManagement under "Creating a Profile page and Preferences page" you find a filter script which sets an edit password. $new['passwdread'] = crypt(read_password'); might do the trick. perhaps: # set read password "read_password" on target pages $FoxFilterFunctions['FoxSetReadPW'] = 'FoxSetReadPW'; function FoxSetReadPW($pn, $fields) { global $FoxAuth, $AuthId, $Author; if(isset($fields['target'])) $targets = preg_split("/[\s,|]+/", $fields['target'], -1, PREG_SPLIT_NO_EMPTY); else return; foreach ($targets as $tgt) { if(isset($fields['foxgroup'])) $pn = MakePageName($pn, $fields['foxgroup'].".".$tgt); else $pn = MakePageName($pn, $tgt); $page = RetrieveAuthPage($pn, $FoxAuth, true); if (!$page) echo "?cannot edit $pagename"; $new = $page; if ($new['text'] =="") $new['text'] = " "; if ($AuthId) $new['passwdread'] = crypt('read_password'); UpdatePage($pn, $page, $new); } return $fields; } ~Hans _______________________________________________ pmwiki-users mailing list [email protected] http://www.pmichaud.com/mailman/listinfo/pmwiki-users
