Tuesday, February 27, 2007, 5:18:57 PM, Patrick wrote: > An easy way is to create > an $EditFunction that disallows creating new pages: > ......
I tested this by putting into config.php: $EditFunctions[] = 'CreateDisallowed'; function CreateDisallowed($pagename, $page, $new) { global $EnableCreatePages, $EnablePost, $MessagesFmt; if (IsEnabled($EnableCreatePages, 1)) return; if (PageExists($pagename)) return; $EnablePost = 0; $MessagesFmt[] = 'Creation of new page blocked'; } if (preg_match('/^Test/', $pagename)) $EnableCreatePages = 0; The result was that trying to create new page in a group beginning with "Test" opened the edit form with the message displayed: "Creation of new page blocked". But I could enter content and save the page normally, so the creation was not blocked. Would the new edit function need to be inserted at a special place in the $EditFunctions array? Hans _______________________________________________ pmwiki-users mailing list pmwiki-users@pmichaud.com http://www.pmichaud.com/mailman/listinfo/pmwiki-users