RequireSummary

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

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 change summaries or edit 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)

User notes? : If you use, used or reviewed this recipe, you can add your name. These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki.