[pmwiki-users] Enforcing summaries

Patrick R. Michaud pmichaud at pobox.com
Tue Jul 18 20:56:53 CDT 2006


On Wed, Jul 19, 2006 at 09:23:34AM +1000, Kathryn Andersen wrote:
> Is there some way of forcing users to write summaries when they edit
> pages?  I've used http://www.pmwiki.org/wiki/Cookbook/RequireCategory
> to force them to give categories, but I would like to be able to enforce
> summaries, because even though the policy is "thou shalt write a
> summary", most of them are ignoring it.

In config.php:

    function RequireSummary($pagename, &$page, &$new) {
      global $ChangeSummary, $MessagesFmt, $EnablePost;
      if ($EnablePost && !$ChangeSummary) {
        $MessagesFmt[] = "A summary is required.";
        $EnablePost = 0;
      }
    }

    array_unshift($EditFunctions, 'RequireSummary');

Pm





More information about the pmwiki-users mailing list