TIP TopicNameValidationPlugin is not installed on Foswiki.org.

TopicNameValidationPlugin

Control naming of topics

This plugin allows you to enforce a certain policy for topic names by defining a set of rules. Each rule consists of

  1. a regular expression pattern
  2. an error message, and
  3. a flag

When a topic is to be edited or saved, the regular expressions are checked. Each rule can be flagged deny or =allow. All rules are processed in the order given. The first pattern that matches either forbids or allows the topic to be processed any further. For instance, the example only allows topics names to consist of characters a-z, A-Z, digits 0-9, the dot and a slash. Dot and slash are needed as the match is tested against the fully qualified topic name consisting of the web and topic part, separated by a dot. That way you can create different rules for different webs.

Several topics can be specified using

  • Set TOPICVALIDATION_PLUGIN_RULESET = TopicNameRuleSet1, TopicNameRuleSet1, ...

(defaults to TopicNameValidationPlugin)

Each ruleset topic is parsed for a table in the format given below and all rules are concatenated.

If a topic name is forbidden, the user is redirected to oopstopicname. That's where the error message is inserted as specified in the second column of the rule set.

A rule can be disabled temporarily by adding disabled to the third column.

Pattern Message Flag
[^a-zA-Z0-9\.\/_] Only characters a-z and digits 0-9 are allowed.  

Installation Instructions

You do not need to install anything in the browser to use this extension. The following instructions are for the administrator who installs the extension on the server.

Open configure, and open the "Extensions" section. Use "Find More Extensions" to get a list of available extensions. Select "Install".

If you have any problems, or if the extension isn't available in configure, then you can still install manually from the command-line. See http://foswiki.org/Support/ManuallyInstallingExtensions for more help.

Change History

06 May 2013 cleaned up use of deprecated api
07 May 2012 added german translation
23 Apr 2009 converted to foswiki plugin
24 Oct 2008 initial version

Topic revision: r6 - 25 Sep 2015, MichaelDaum - This page was cached on 26 Jul 2016 - 16:06.

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License