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.1.tar.gz
 * replace_text_0.1.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.

Version
Replace Text is currently at version 0.1.1.

The version history is:


 * 0.1 - April 29, 2008 - Initial version
 * 0.1.1 - May 7, 2008 - Language support added for Arabic, Dutch, French, Javanese, Malayalam, Norwegian Bokmål, Occitan, Portuguese, Serbian Cyrillic, Slovak, Swedish and Thai

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.

Translating
Translation of Replace Text is done through Betawiki. The translation for this extension can be found here. To add language values or change existing ones, you should create an account on Betawiki, then request permission from the administrators to translate a certain language or languages on this page (this is a very simple process). Once you have permission for a given language, you can log in and add or edit whatever messages you want to in that language.