-
Notifications
You must be signed in to change notification settings - Fork 0
/
SemanticFormsMultiEdit.php
59 lines (43 loc) · 1.79 KB
/
SemanticFormsMultiEdit.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<?php
/** Definition based on Semantic Forms **/
if ( !defined( 'MEDIAWIKI' ) ) die();
// You need Semantic Forms
if ( ! defined( 'SF_VERSION' ) ) die();
define( 'SFME_VERSION', '1.0' );
$GLOBALS['wgExtensionCredits'][defined( 'SEMANTIC_EXTENSION_TYPE' ) ? 'semantic' : 'specialpage'][] = array(
'path' => __FILE__,
'name' => 'Semantic Forms MultiEdit',
'version' => SFME_VERSION,
'author' => array( 'Yaron Koren', 'Stephan Gambke', 'Toniher' ),
'url' => 'https://github.com/ProteoWiki/SemanticFormsMultiEdit',
'descriptionmsg' => 'semanticforms-multiedit-desc',
'license-name' => 'GPL-2.0+'
);
$GLOBALS['wgHooks']['ParserFirstCallInit'][] = 'SFMEParserFunctions::registerFunctions';
$GLOBALS['wgAPIModules']['sfmultiedit'] = 'SFMultieditAPI';
$GLOBALS['wgAutoloadClasses']['SFMultieditAPI'] = __DIR__ . '/includes/SF_MultieditAPI.php';
$GLOBALS['wgAutoloadClasses']['SFMEParserFunctions'] = __DIR__ . '/includes/SFME_ParserFunctions.php';
$GLOBALS['wgMessagesDirs']['SemanticFormsMultiEdit'] = __DIR__ . '/i18n';
$GLOBALS['wgExtensionMessagesFiles']['SemanticFormsMultiEdit'] = __DIR__ . '/languages/SFME_Messages.php';
$GLOBALS['wgExtensionMessagesFiles']['SemanticFormsMultiEditMagic'] = __DIR__ . '/languages/SFME_Magic.php';
$GLOBALS['wgSFMEMaxPages'] = 100;
// register client-side modules
if ( defined( 'MW_SUPPORTS_RESOURCE_MODULES' ) ) {
$sfgResourceTemplate = array(
'localBasePath' => __DIR__,
'remoteExtPath' => 'SemanticFormsMultiEdit'
);
$GLOBALS['wgResourceModules'] += array(
'ext.semanticforms.multiedit' => $sfgResourceTemplate + array(
'scripts' => 'libs/SF_multiedit.js',
'styles' => 'skins/SF_multiedit.css',
'dependencies' => array(
'mediawiki.jqueryMsg',
),
'messages' => array(
'sf-multiedit-wait',
'sf_multiedit_anoneditwarning',
),
)
);
}