-
Notifications
You must be signed in to change notification settings - Fork 0
/
AddToCalendar.php
executable file
·40 lines (31 loc) · 1.25 KB
/
AddToCalendar.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
<?php
if ( !defined( 'MEDIAWIKI' ) ) {
die( 'This file is a MediaWiki extension, it is not a valid entry point' );
}
$GLOBALS['wgExtensionCredits']['parserhook'][] = array(
'path' => __FILE__,
'name' => 'AddToCalendar',
'version' => '0.1.0',
'url' => 'https://github.com/SimilisTools/mediawiki-addToCalendar',
'author' => array( 'Toniher' ),
'descriptionmsg' => 'addtocalendar-desc',
);
$GLOBALS['wgAutoloadClasses']['AddToCalendar'] = __DIR__.'/AddToCalendar_body.php';
$GLOBALS['wgMessagesDirs']['AddToCalendar'] = __DIR__ . '/i18n';
$GLOBALS['wgExtensionMessagesFiles']['AddToCalendar'] = __DIR__ . '/AddToCalendar.i18n.php';
$GLOBALS['wgExtensionMessagesFiles']['AddToCalendarMagic'] = __DIR__ . '/AddToCalendar.i18n.magic.php';
$GLOBALS['wgHooks']['ParserFirstCallInit'][] = 'wfRegisterAddToCalendar';
$GLOBALS['wgResourceModules']['ext.AddToCalendar'] = array(
'scripts' => array( 'libs/ouical.js', 'libs/addtocalendar.js' ),
'styles' => array( 'css/addtocalendar.css' ),
'localBasePath' => __DIR__,
'remoteExtPath' => 'AddToCalendar'
);
/**
* @param $parser Parser
* @return bool
*/
function wfRegisterAddToCalendar( $parser ) {
$parser->setFunctionHook( 'AddToCalendar', 'AddToCalendar::process_AddToCalendar', SFH_OBJECT_ARGS );
return true;
}