Extension:Push

The Push extension is a simple lightweight tool that adds an extra tab to articles which enables users to push the content of the article to one or more other MediaWiki wikis.

Feature overview

 * Pushing page content to other wikis via a tab on the page.
 * Bulk push via Special:Push. (as of version 0.2)
 * Remote authentication support. (as of version 0.4)
 * Automatic transfer of included files. (as of version 0.5)
 * Support for ApprovedRevs. If there is an approved revision, it will be pushed, if not, the latest one is pushed.
 * AdminLinks integration.
 * Usage of the MediaWiki Resource Loader when available with backward support for MW 1.16.x.

Download
You can find the current version of Push on the Google Code download page, as well as a list of legacy downloads.

You can also get the code directly from SVN. Tags can be obtained via

svn checkout http://svn.wikimedia.org/svnroot/mediawiki/tags/extensions/Push/REL_version

Where 'version' is the version number of the tag, such as 0_1 (see the available tags). The latest code can be obtained from trunk:

svn checkout http://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions/Push/

Installation
Once you have downloaded the code, place the Push directory within your MediaWiki 'extensions' directory. Then add the following code to your LocalSettings.php file:

Usage
As a user, push should be pretty straight-forward to use. You can find a blog post describing the interface and how to use it here.

Configuration
Configuration of push is done by adding simple PHP statements to your LocalSettings.php file. These statements need to be placed AFTER the inclusion of Push. The options are listed below and their default is set in the [http://svn.wikimedia.org/viewvc/mediawiki/trunk/extensions/Push/Push_Settings.php?view=markup push settings file]. You should NOT modify the settings file, but can have a look at it to get an idea of how to use the ettings, in case the below descriptions do not suffice.

Push targets
You can add push targets (wikis you can push content to) by adding elements to the  array. The array keys should be the names of your wikis and the values should point to the wiki root, without tailing slash. You can find your wiki root by clicking the history tab on a page, finding the '/index.php' in it, and taking everything that's left of that. Example:

By default there are no targets, which will cause the push tab to not be shown anywhere until you add at least one target.

Rights
Push adds the following rights to MediaWiki:


 * push: Indicates whether you are able to use the push functionality or not.
 * bulkpush: Indicates whether you are able to use Special:Push or not. (as of v0.3)
 * filepush: Indicates whether you are able to push files or not. (as of v0.5)

By default everyone has 'push', and only registered users have 'bulkpush' and 'filepush'. The later is to prevent anonymous users from easily vandalizing the target wikis.

Authentication
As of version 0.4, you can specify a username and password to authenticate with on the remote wikis. You can also specify login information per target wiki, which will override the global settings when set. You can do this by adding items to the  and arrays. The keys need to be the target names set in $egPushTargets. Example:

If you are running wikis on localhost, pushing from a MW 1.16 install will not work, due to an issue in Cookie::validateCookieDomain. It can be fixed by replacing this method by it's MW 1.17 equivalent.

Pushing files
As of version 0.5 of Push, you can choose to push the files used in the page you are pushing. This is done by checking 'Include files' on the push interface. You can set the default check-state with the  setting. Keep in mind you need the 'filepush' right to use this functionality, so the checkbox won't show up when you are not logged in using the default rights.

To successfully push any file, you need to have sufficient privileges on the target wiki (which probably means you'll have to authenticate), and the target wiki needs to be configured so it accepts uploads. You need to have both  and   set to true, like this:

Version 0.6
2010-12-19


 * Added listing of embedded images to the tab interface.
 * Added notice to the tab interface that shows up when included templates/files already exist on the target wiki.

Version 0.5
2010-12-14


 * Added support for file-pushing.
 * Improved push status visualization on the tab interface.

Version 0.4
2010-12-12


 * Added option to include templates used on the page to the push to the tab interface.
 * Added remote authentication support to the push API module.
 * Added additional info about target pages to the tab interface.

Version 0.3
2010-12-10


 * Fixed push functionality for wikis on remote domains.
 * Added 'bulkpush' right.
 * Added batch operations to Special:Push.
 * Added redlink support to the tab interface.
 * Improved error handling.

Version 0.2
2010-12-08


 * Added Special:Push for bulk pushing.
 * Added AdminLinks hook.

Version 0.1
2010-12-08

Initial release.


 * Added push tab that allows pushing the page to one or more other wikis.
 * Added ApprovedRevs support.
 * Added 'push' right.

Internationalization
Push is fully internationalized. Translation of Push messages is done through translatewiki.net. The translation for this extension can be found here. To add language values or change existing ones, you should create an account on translatewiki.net, 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.

Authors
Push has been written by Jeroen De Dauw as WikiWorks consultant for Texas Instruments.