Extension:MirrorTools

From MediaWiki.org
Jump to: navigation, search

This is the MirrorTools extension.

MediaWiki extensions manual - list
Crystal Clear action run.png
MirrorTools

Release status: experimental

Implementation API
Description This extension facilitates real-time mirroring of page histories.
Author(s) TisaneTalk
Last version 1.0.0
MediaWiki 1.17+
PHP 5
License GPL
Download

Check usage (experimental)

Contents

[edit] What can this extension do?

This extension extends various API classes to allow revisions to be added with arbitrary user names (and, in a later version, timestamps). This aids in mirroring of another wiki's content.

[edit] Usage

See the api.php? on your wiki for more details.

To use the API, first use Special:UserRights to grant MirrorTools rights to the user who will be inserting mirrored revisions.

[edit] Development notes

Presently, this only handles edits (mirroredit). Also needed are:

  • moves (mirrormove)
  • deletions (mirrordelete, to be handled by placing a deletion marker in the history)
  • undeletions (mirrorundelete, to be handled similarly to page creation)
  • protect (mirrorprotect)
  • unprotect (mirrorunprotect)
  • etc.

It may happen that a page is created on the remote wiki with a page title that already exists on the local wiki. That's fine; just merge the histories. It may happen that on the remote wiki, a page is moved to a page title that already exists on the local wiki. In such a case, the two page histories would be switched. E.g., suppose foo exists on the remote wiki (and is mirrored locally), and bar exists on the local wiki but not on the remote wiki. Then on the remote wiki, foo is moved to bar. On the local wiki, bar is then moved to foo, and foo is then moved to bar, and a redirect is put on top of the page history of foo redirecting the user to bar.

It may happen that some revisions will need to be buried in the page history below what already exists. This will require changing around the rev_parent_id values and such.

After all these are done, the next step will be to lock down mirrored pages to prevent any changes from being made to them, except by the mirrorbot.

Once that is done, the next step will be to cause clicks on "edit," "move," etc. tabs to take one to the appropriate urls at the remote wiki.

It is envisaged that a Peachy-based IRC bot will read recent changes data from remote wiki IRC feeds, make the appropriate queries to obtain the data, and hit the local API accordingly.

[edit] Installation

Add this to your LocalSettings.php file:

require_once( "$IP/extensions/MirrorTools/MirrorTools.php"  );
Personal tools
Namespaces

Variants
Actions
Navigation
Support
Download
Development
Communication
Print/export
Toolbox