-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTools.php
More file actions
69 lines (59 loc) · 2.04 KB
/
Tools.php
File metadata and controls
69 lines (59 loc) · 2.04 KB
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
<?php
/**
* Tools extension - the thing that needs you.
*
* For more info see http://mediawiki.org/wiki/Extension:Tools
*
* @file
* @ingroup Extensions
* @author Liangent, 2014
* @license GNU General Public Licence 2.0 or later
*/
$wgExtensionCredits['other'][] = array(
'path' => __FILE__,
'name' => 'Tools',
'author' => array(
'Liangent',
),
'version' => '0.2.0',
// 'url' => 'https://www.mediawiki.org/wiki/Extension:Tools',
'descriptionmsg' => 'tools-desc',
);
/* Setup */
// Register files
$wgAutoloadClasses['ToolsHooks'] = __DIR__ . '/Tools.hooks.php';
$wgAutoloadClasses['SpecialVariantTroubleshooting'] = __DIR__ . '/specials/SpecialVariantTroubleshooting.php';
$wgAutoloadClasses['SpecialCompareArticleVariants'] = __DIR__ . '/specials/SpecialCompareArticleVariants.php';
$wgAutoloadClasses['TemplateDuplicateArgumentsPage'] = __DIR__ . '/specials/SpecialTemplateDuplicateArguments.php';
$wgMessagesDirs['Tools'] = __DIR__ . '/i18n';
$wgExtensionMessagesFiles['ToolsAlias'] = __DIR__ . '/Tools.i18n.alias.php';
// Register hooks
$wgHooks['wgQueryPages'][] = 'ToolsHooks::onwgQueryPages';
// Register special pages
$wgSpecialPages['VariantTroubleshooting'] = 'SpecialVariantTroubleshooting';
$wgSpecialPageGroups['VariantTroubleshooting'] = 'other';
$wgSpecialPages['CompareArticleVariants'] = 'SpecialCompareArticleVariants';
$wgSpecialPageGroups['CompareArticleVariants'] = 'wiki';
$wgSpecialPages['TemplateDuplicateArguments'] = 'TemplateDuplicateArgumentsPage';
$wgSpecialPageGroups['TemplateDuplicateArguments'] = 'maintenance';
// Register modules
$wgResourceModules['ext.Tools.CompareArticleVariants'] = array(
'scripts' => array(
'modules/ext.Tools.CompareArticleVariants.js',
),
'styles' => array(
'modules/ext.Tools.CompareArticleVariants.css',
),
'messages' => array(
'tools-comparearticlevariants-missing',
'tools-comparearticlevariants-broken'
),
'dependencies' => array(
'jquery.highlightText'
),
'localBasePath' => __DIR__,
'remoteExtPath' => 'Tools',
);
/* Configuration */
// Enable Foo
#$wgToolsEnableFoo = true;