-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhosts.php
78 lines (65 loc) · 2.02 KB
/
hosts.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
<?php
/**
* Hitchwiki Hosts extension
*
* For more info see ttps://github.com/Hitchwiki/hosts
*
* @file
* @ingroup Extensions
* @author Remi, Mikael Korpela
*/
$wgExtensionCredits['other'][] = array(
'path' => __FILE__,
'name' => 'Hosts',
'author' => array(
'Remi',
'Mikael Korpela',
),
'version' => '1.0.0',
'url' => 'https://github.com/Hitchwiki/hosts',
'descriptionmsg' => 'hosts-desc',
);
/* Setup */
$dir = dirname( __FILE__ ) . '/';
// Register files
$wgAutoloadClasses['HostsHooks'] = $dir . 'hosts.hooks.php';
$wgAutoloadClasses['SpecialHosts'] = $dir . 'specials/SpecialHosts.php';
$wgAutoloadClasses['HostsMapTemplate'] = $dir . 'hosts.template.php';
$wgExtensionMessagesFiles['Hosts'] = $dir . 'hosts.i18n.php';
$wgExtensionMessagesFiles['HostsAlias'] = $dir . 'hosts.i18n.alias.php';
// Register hooks
#$wgHooks['NameOfHook'][] = 'HostsHooks::onNameOfHook';
// Register special pages
$wgSpecialPages['Hosts'] = 'SpecialHosts';
$wgSpecialPageGroups['Hosts'] = 'other';
// Register modules
$wgResourceModules['ext.hosts'] = array(
'scripts' => array(
'modules/vendor/jquery/jquery.min.js',
'modules/vendor/angular/angular.min.js',
'modules/vendor/angular-leaflet/dist/angular-leaflet-directive.min.js',
'modules/vendor/angular-animate/angular-animate.min.js',
'modules/vendor/angular-route/angular-route.min.js',
// 'modules/vendor/angular-mocks/angular-mocks.js',
'modules/vendor/leaflet-dist/leaflet.js',
'modules/vendor/leaflet.markerclusterer/dist/leaflet.markercluster.js',
'modules/vendor/typeahead.js/dist/typeahead.min.js',
'modules/ext.hosts.js',
),
'styles' => array(
'modules/vendor/leaflet-dist/leaflet.css',
'modules/vendor/leaflet.markerclusterer/dist/MarkerCluster.css',
'modules/vendor/leaflet.markerclusterer/dist/MarkerCluster.Default.css',
'modules/ext.hosts.css',
),
'messages' => array(
),
'dependencies' => array(
// 'jquery',
),
'localBasePath' => $dir,
'remoteExtPath' => 'hosts',
);
/* Configuration */
// Enable Foo
//$wgHostsEnableMap = true;