Recent Changes - Search:

Cookbook

PmWiki

pmwiki.org

RequireSummary

Summary: Require a summary to be entered
Version: 2006-07-19
Prerequisites:
Status:
Maintainer:
Categories:Administration

Questions answered by this recipe

This section is optional; use it to indicate the types of questions (if any) this recipe is intended to answer.

  • Is there some way of forcing users to write summaries when they edit pages?
  • I would like to be able to enforce summaries, because even though the policy is "thou shalt write a summary", most of the users are ignoring it.

Description

In config.php:

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

Notes

Release Notes

If the recipe has multiple releases, then release notes can be placed here. Note that it's often easier for people to work with "release dates" instead of "version numbers".

2006-07-19: Initial release based on Pm's post: http://article.gmane.org/gmane.comp.web.wiki.pmwiki.user/29433/

Comments

See Also

Contributors

  • Kathryn Andersen (initial question to the mailing list)
  • Patrick R. Michaud (posting the answer)
  • Thomas "Balu" Walter (making a cookbook entry of it)
Edit - History - Print - Recent Changes - Search
Page last modified on July 19, 2006, at 04:07 PM