-
Notifications
You must be signed in to change notification settings - Fork 1
/
SemanticMeetingMinutes.php
76 lines (62 loc) · 2.6 KB
/
SemanticMeetingMinutes.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
<?php
/**
* The MeetingMinutes extension provides JS and CSS to enable recording meeting
* minutes in SMW. See README.md.
*
* Documentation: https://github.com/enterprisemediawiki/SemanticMeetingMinutes
* Support: https://github.com/enterprisemediawiki/SemanticMeetingMinutes
* Source code: https://github.com/enterprisemediawiki/SemanticMeetingMinutes
*
* @file MeetingMinutes.php
* @addtogroup Extensions
* @author James Montalvo
* @copyright © 2014 by James Montalvo
* @licence GNU GPL v3+
*/
# Not a valid entry point, skip unless MEDIAWIKI is defined
if ( ! defined( 'MEDIAWIKI' ) ) {
die( 'MeetingMinutes extension' );
}
define( 'SEMANTIC_MEETING_MINUTES_VERSION', '1.0.0' );
$GLOBALS['wgExtensionCredits']['semantic'][] = array(
'path' => __FILE__,
'name' => 'Semantic Meeting Minutes',
'url' => 'http://github.com/enterprisemediawiki/SemanticMeetingMinutes',
'author' => 'James Montalvo',
'descriptionmsg' => 'meetingminutes-desc',
'version' => SEMANTIC_MEETING_MINUTES_VERSION
);
$GLOBALS['wgMessagesDirs']['MeetingMinutes'] = __DIR__ . '/i18n';
$GLOBALS['wgExtensionMessagesFiles']['MeetingMinutesMagic'] = __DIR__ . '/Magic.php';
// Autoload setup class (location of parser function definitions)
$GLOBALS['wgAutoloadClasses']['MeetingMinutes\Setup'] = __DIR__ . '/Setup.php';
// Setup parser functions
$GLOBALS['wgHooks']['ParserFirstCallInit'][] = 'MeetingMinutes\Setup::setupParserFunctions';
$GLOBALS['wgHooks']['BeforePageDisplay'][] = 'MeetingMinutes\Setup::onBeforePageDisplay';
// Dependency: Extension:PageImporter.
PageImporter::registerPageList(
"SemanticMeetingMinutes",
__DIR__ . "/ImportFiles/pages.php",
__DIR__ . "/ImportFiles",
"Updated with content from Extension:SemanticMeetingMinutes version " . SEMANTIC_MEETING_MINUTES_VERSION
);
$ExtensionMeetingMinutesResourceTemplate = array(
'localBasePath' => __DIR__ . '/modules',
'remoteExtPath' => 'SemanticMeetingMinutes/modules',
);
// check pcre.backtrack_limit to be large enough; set to 10 million if not
if ( ini_get( 'pcre.backtrack_limit' ) < 10000000 ) {
ini_set( 'pcre.backtrack_limit', 10000000 );
}
$GLOBALS['wgResourceModules'] += array(
'ext.meetingminutes.form' => $ExtensionMeetingMinutesResourceTemplate + array(
'styles' => 'form/meeting-minutes.css',
'scripts' => array( 'form/SF_MultipleInstanceRefire.js', 'form/meeting-minutes.js' ),
// 'dependencies' => array( 'mediawiki.Uri' ),
'position' => 'top',
),
'ext.meetingminutes.template' => $ExtensionMeetingMinutesResourceTemplate + array(
'styles' => 'template/template.css',
'position' => 'top',
),
);