forked from wikimedia/mediawiki-extensions-Push
-
Notifications
You must be signed in to change notification settings - Fork 0
/
INSTALL
93 lines (65 loc) · 4.56 KB
/
INSTALL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
These is the install file for the Push extension.
Extension page on mediawiki.org: https://www.mediawiki.org/wiki/Extension:Push
Latest version of the install file: https://github.com/wikimedia/mediawiki-extensions-Push/blob/master/INSTALL
== Installation ==
Once you have downloaded the code, place the ''Push'' directory within your MediaWiki 'extensions' directory.
Then add the following code to your [[Manual:LocalSettings.php|LocalSettings.php]] file:
# Push
wfLoadExtension( 'Push' );
== Configuration ==
Configuration of push is done by adding simple PHP statements to your [[Manual:LocalSettings.php|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 [https://github.com/wikimedia/mediawiki-extensions-Push/blob/master/extension.json 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 <code>$egPushTargets</code> 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:
<source lang="php">
$egPushTargets['English Wikipedia'] = 'http://en.wikipedia.org/w';
$egPushTargets['Local MW 1.16'] = 'http://localhost/mw116';
$egPushTargets['Local MW trunk'] = 'http://localhost/phase3';
</source>
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.
=== Tab display ===
When using vector like skins, you can choose to have the push tab displayed on the page itself, or in the action menu
you can open by clicking the down arrow next to the visible tabs. For this you need to set the <code>$egPushShowTab</code>
variable to either true or false. The default is true.
=== Authentication ===
As of version 0.4, you can specify a username (<code>$egPushLoginUser</code>) and password (<code>$egPushLoginPass</code>)
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 <code>$egPushLoginUsers</code> and
<code>$egPushLoginPasswords</code> arrays. The keys need to be the target names set in $egPushTargets. Example:
<source lang="php">
$egPushLoginUsers['English Wikipedia'] = 'Jeroen De Dauw';
$egPushLoginPasswords['English Wikipedia'] = 'Awesome';
</source>
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 <code>$egPushIncFiles</code> 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 <code>$wgEnableUploads</code> and <code>$wgAllowCopyUploads</code> set to true, like this:
<source lang="php">
$wgEnableUploads = true;
$wgAllowCopyUploads = true;
</source>
=== Push workers ===
Special:Push pushes multiple pages simultaneously. By default this is limited to 3, but you can increase this by
setting the value of <code>$egPushBulkWorkers</code>. Putting it to high might result in very slow or even failing requests.
=== Push batch size ===
The maximum amount of targets to push a page to in one go. Currently only used on Special:Push.
Set using <code>$egPushBatchSize</code> Defaults to 3.