Extension:EditWarning
From MediaWiki.org
|
EditWarning Release status: stable |
|
|---|---|
| Implementation | Notify |
| Description | Displays a warning if user edits a page which is currently being edited. |
| Author(s) | nemphis Talk |
| Version | 0.3.1 (2008-05-09) |
| MediaWiki | tested on 1.11.*, 1.12.0 |
| Download | [1] |
| Parameters | $EditWarning_Timeout |
| Hooks used |
AlternateEdit |
Contents |
[edit] What can this extension do?
On pages which are being edited by many users simultaneously edit conflicts can easily happen. This extension tries to avoid this problem by showing a warning message if the user edits a page that is being edited by other users at the same time. It's very similar to the MoinMoin Wiki warning with the difference that it doesn't lock the page (but this feature is planned).
Notice: It's not recommend to use this extension if anonymous users are allowed to edit pages, because it ignores anonymous page edits.
Notice: It's highly recommended to upgrade to 0.3.1, if you're using MediaWiki 1.11.1 or higher. EditWarning 0.1 beta doesn't work correctly on these newer versions.
Screenshots: see Extension:EditWarning/Screenshots
[edit] Use case
Alice opens the page "FooBar" for editing. Now Bob wants edit the page too. He gets a warning message that says Alice is currently editing the page. At this point Bob may decide to make his changes later or he contacts Alice to discuss his changes with her.
[edit] Licence
GNU AGPL Version 3.0 or later. (http://www.gnu.org/licenses/agpl.html)
[edit] Installation
- Move the folder "EditWarning" to the "extensions" folder of your MediaWiki installation.
- Execute the following SQL statement in your MediaWiki database:
CREATE TABLE `current_edits` ( `id` int(10) unsigned NOT NULL auto_increment, `page_id` int(10) unsigned NOT NULL, `user_id` int(10) unsigned NOT NULL, `user_name` varchar(255) character set latin1 collate latin1_bin NOT NULL, `timestamp` int(10) unsigned NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
- Add the following to LocalSettings.php:
require_once("$IP/extensions/EditWarning/EditWarning.php");
- Open the file includes/EditPage.php of your MediaWiki installation and search for the line:
<span class='editHelp'>{$cancel} | {$edithelp}</span>
- Replace that line with:
<span class='editHelp'>{$edithelp}</span>
- Optional: The default timeout is set to 10 minutes. If you want to change this setting, add this line to your LocalSettings.php (Note: The value is the number of minutes):
$EditWarning_Timeout = 5;
[edit] Upgrade from 0.3 beta
- Move the folder "EditWarning" to the "extensions" folder of your MediaWiki installation and overwrite the old files.
For older versions see the UPGRADE file.
[edit] Known Issues
- The extension can only recognize the cancel of page editing if the user uses the "Cancel" button. Otherwise the warning will be showed until the timeout (default 10 minutes).
[edit] See also
- The Ajax Show Editors extension

