ReplaceSet

From Wiki-Tools

Jump to: navigation, search
edit infoboxReplaceSet
Release status: Beta
Author: Dantman
Description: Allows replacement of text within a #replaceset parser function.
Version: 1.0
License: GPLv2+
Stable: SVN (View Repo)

Download snapshot

Alpha: SVN (View Repo)

Download snapshot

Demo: http://dev.wiki-tools.com/wiki/Special:SearchByProperty/Extension/ReplaceSet

ReplaceSet allows for patterns of text, either plain or RegExp based to be replaced. The idea is to allow many patterns to be replaced simply without overloading the Parser with dozens of ParserFunctions and allow for simple replace based syntaxes to be built such as linking certain words in a Card lore.

[edit] ToDo

The extension is complete but only missing one minor feature. It's planned to allow use of /=/ and \= in the way that = inside of regex will not end the pattern and a backslash escape \= in strings will allow a = to be used inside of the pattern. (Also need to make sure that \\ will work for that case)

[edit] Install

To download the extension you can use one of three methods:

  • You can checkout the extension from subversion using:
svn checkout svn://svn.nadir-point.com/mediawiki-extensions/branches/stable/ReplaceSet/ extensions/ReplaceSet
  • Or you can checkout the entire repo of Wiki-Tools extensions into a nice wiki-tools directory which lets you put Wikimedia extensions in the extensions/ folder without the two SVN repos colliding:
svn checkout svn://svn.nadir-point.com/mediawiki-extensions/branches/stable/ extensions/wiki-tools/

To install the extension include one of the following lines into your LocalSettings.php depending on where you installed the extension:

require_once( "$IP/extensions/ReplaceSet/" );
require_once( "$IP/extensions/wiki-tools/ReplaceSet/" );
Personal tools
Nadir Point Network