forked from Undev/MediaWiki-ClientsideDrafts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathClientsideDrafts.php
40 lines (34 loc) · 1.26 KB
/
ClientsideDrafts.php
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
<?php
# Alert the user that this is not a valid entry point to MediaWiki if they try to access the file directly.
if (!defined('MEDIAWIKI')) {
echo <<<EOT
To install ClientsideDrafts extension, put the following line in LocalSettings.php:
require_once( "\$IP/extensions/ClientsideDrafts/ClientsideDrafts.php" );
EOT;
exit(1);
}
$dir = dirname( __FILE__ ) . '/';
$wgClientsideDraftsVersion = '0.1';
$wgAutoloadClasses['ClientsideDrafts'] = $dir. 'ClientsideDrafts.body.php';
$wgExtensionMessagesFiles['ClientsideDrafts'] = $dir. 'ClientsideDrafts.i18n.php';
$wgExtensionCredits['other'][] = array(
'path' => __FILE__,
'name' => 'Clientside drafts',
'author' => 'Akzhan Abdulin',
'url' => 'http://www.mediawiki.org/wiki/Extension:ClientsideDrafts',
'version' => '0.1',
'descriptionmsg' => 'clientsidedrafts-description'
);
// Register load hook
$wgHooks['EditPage::showEditForm:initial'][] = 'ClientsideDrafts::loadForm';
$wgResourceModules['ext.ClientsideDrafts'] = array(
'localBasePath' => dirname(__FILE__),
'remoteExtPath' => 'ClientsideDrafts',
'scripts' => 'ClientsideDrafts.js',
'dependencies' => 'mediawiki.legacy.wikibits',
'messages' => array(
'clientsidedrafts-autosaved',
'clientsidedrafts-trouble',
'clientsidedrafts-required'
)
);