-
Notifications
You must be signed in to change notification settings - Fork 0
/
Limn.php
66 lines (50 loc) · 1.44 KB
/
Limn.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
<?php
if (!defined('MEDIAWIKI')) die('omghax');
/**
* Limn Extension for Mediawiki
*
* @file
* @ingroup Limn
* @ingroup Extensions
*
* @author David Schoonover <dsc@less.ly>
* @version 0.0.1
* @license MIT
*/
// Credits
$wgExtensionCredits['parserhook'][] = array(
'path' => __FILE__,
'name' => 'Limn',
'version' => '0.0.1',
'author' => 'David Schoonover',
'url' => 'https://github.com/dsc/limn-mediawiki-ext',
'description' => 'Embed Limn visualizations in MediaWiki.',
);
// Configuration
$wgLimnServerBase = null;
$wgLimnDataRemoteMode = 'error';
// Extension Setup
$wgAutoloadClasses += array(
'Limn' => __DIR__ . '/Limn_body.php',
);
$wgExtensionMessagesFiles += array(
'Limn' => __DIR__ . '/Limn.i18n.php',
'LimnMagic' => __DIR__ . '/Limn.i18n.magic.php',
);
$wgResourceModules += array(
'ext.limn' => array(
'scripts' => array(
'modules/ext.limn.mw-config.js',
'modules/ext.limn-mw-deps.js',
'modules/ext.limn.js',
'modules/ext.limn.binding.js',
),
'styles' => 'modules/ext.limn.css',
'localBasePath' => __DIR__,
'remoteExtPath' => 'Limn',
'group' => 'ext.limn',
),
);
// Hooks
$wgHooks['ParserFirstCallInit'][] = 'Limn::registerParserHooks';
$wgHooks['ResourceLoaderGetConfigVars'][] = 'Limn::resourceLoaderGetConfigVars';