-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDFDiagram.php
54 lines (44 loc) · 1.29 KB
/
DFDiagram.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
<?php
/*
* DFDiagram
* MediaWiki extension for including Dwarf Fortress diagrams
*
* This is the file that should be included by LocalSettings.php
*/
if (!isset($wgDFDDefaultDiagramPath)) {
$wgDFDDefaultDiagramPath = "$IP/extensions/DFDiagram/default_diagram.txt";
}
require_once 'Diagram.php';
$wgExtensionMessagesFiles['DFDiagram'] = dirname( __FILE__ ) . '/DFDiagram.i18n.php';
/*
* Add hooks
*/
$wgHooks['ParserFirstCallInit'][] = 'DFDMWHooks::init';
$wgResourceModules['ext.DFDiagram'] = array(
'styles' => "modules/ext.DFDiagram.css",
'localBasePath' => __DIR__,
'remoteExtPath' => 'DFDiagram',
'position' => 'top'
);
$wgResourceModules['ext.DFDiagram.canvas'] = array(
'scripts' => array(
'modules/df-tileset/df-tileset.js',
'modules/ext.DFDiagram.js',
),
'localBasePath' => __DIR__,
'remoteExtPath' => 'DFDiagram'
);
$wgHooks['BeforePageDisplay'][] = 'DFDMWHooks::includeModules';
$wgHooks['GetPreferences'][] = 'DFDMWHooks::getPreferences';
$wgDefaultUserOptions['dfdiagram-use-canvas'] = true;
/*
* Credits for Special:Version
*/
$wgExtensionCredits['DFDiagram'][] = array(
'path' => __FILE__,
'name' => 'DFDiagram',
'author' =>'Lethosor',
'url' => 'https://github.com/lethosor/DFDiagram',
'description' => 'Adds support for DF-style diagrams',
'version' => '0.6.1',
);