Feature Proposal: Allow PluginOrder setting to also specify the last plugins to process

Motivation

Some plugins may need to be last in the list of plugins to be sure that they examine the topic text after all other plugins have made their modifications. For example, the AntiWikiSpamPlugin beforeSaveHandler detects spam and blocks topic save. However spam added after the handler has run by another plugin, for example the CommentPlugin, sneaks through. it's possible to add plugins to the PluginOrder to ensure that they come before the AntiWikiSpam plugin, however each new plugin must be evaluated if it needs to be added to the list, adding efforts to the administrator.

Description and Documentation

Split the cfg{PluginOrder} variable into a First and Last section. Current setting is list of plugins, comma separated. Break the list into FirstPlugins;LastPlugins, delimited by the semi-colon. If the ;Last section is present, those plugins will be run after the alphabetical processing of un-named plugins. If not present, no impact on installed sites.

Proposal for 1.2/2.0.

Examples

$Foswiki::cfg{PluginOrder} = "TWikiCompatibilityPlugin,SpreadsheetPlugin;AntiWikiSpamPlugin";

The plugins will be processed as:
  1. TWikiCompatibilityPlugin
  2. SpreadsheetPlugin
  3. ( ... Remaining plugins except for )
  4. AntiWikiSpamPlugin

Impact

If the ;LastPlugin is not in the list, there would be no impact on the installation.

WhatDoesItAffect:

Implementation

-- Contributors: GeorgeClark - 03 Jul 2010

Discussion

Leaving Date of Commitment blank so we don't start any clock until 1.1 is branched.

-- GeorgeClark - 03 Jul 2010
Topic revision: r3 - 03 Nov 2015, GeorgeClark
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy