Extension:Replace Text

'''

Description
Replace Text is an extension to MediaWiki that provides a special page to allow administrators to do a global string find-and-replace on all the content pages of the wiki. Talk pages and "MediaWiki:" pages are not modified.

If the original string is contained multiple times on a page, every such instance is replaced. Every page's replacements shows up as a wiki edit, with the administrator who performed the text replacement as the user who made the edit and an edit summary that looks like "Text replace: ' search string ' to ' replacement string '".

Once a text replace is done, it is not directly undoable; though you can always run a "reverse" replace, replacing the new string with the original string. For that reason, if the replacement string is blank or is a string that already exists in the wiki, the user is shown a page to confirm their action before the global replacement is made.

Code and download
You can download the Replace Text code in either one of these two compressed files:


 * replace_text_0.1.tar.gz
 * replace_text_0.1.zip

You can also download the code directly via SVN from the MediaWiki source code repository, at http://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions/ReplaceText/. From a command line, you can call the following:

To view the code online, including version history for each file, you can go here.

Installation
After you've obtained a 'ReplaceText' directory (either by extracting a compressed file or downloading via SVN), place this directory within the main MediaWiki 'extensions' directory. Then, in the file ' LocalSettings.php' in the main MediaWiki directory, add the following line somewhere below the calls for the Semantic MediaWiki extension (both the main 'include_once' line and the 'enableSemantics' line):

Author
Replace Text was written by Yaron Koren, reachable at yaron57 -at- gmail.com.

Code structure
The following are the files in the Replace Text extension:


 * README - description of the extension
 * ReplaceText.php - main file
 * ReplaceText.i18n.php - language file

Bugs and feature requests
Send any bug reports and requests to Yaron Koren, at yaron57 -at- gmail.com.

Contributing patches to the project
If you found some bug and fixed it, please create a patch by going to the "ReplaceText" directory, and typing:

svn diff >descriptivename.patch

Then send this patch, with a description, to Yaron Koren.