2015-04-27 14:05:31 +00:00
|
|
|
<?php
|
|
|
|
$dir = dirname(__FILE__) . '/';
|
|
|
|
|
|
|
|
$wgExtensionCredits[ 'parserhook' ][] = [
|
|
|
|
'name' => 'Portable Infobox',
|
|
|
|
'author' => [
|
|
|
|
'Adam Robak',
|
2015-06-10 17:13:45 +00:00
|
|
|
'Diana Falkowska',
|
2015-04-27 14:05:31 +00:00
|
|
|
'Jacek Jursza',
|
|
|
|
'Mateusz Rybarski',
|
|
|
|
'Rafał Leszczyński',
|
|
|
|
'Sebastian Marzjan'
|
|
|
|
],
|
|
|
|
'descriptionmsg' => 'portable-infobox-desc',
|
|
|
|
'version' => 0.1,
|
|
|
|
'url' => 'https://github.com/Wikia/app/tree/dev/extensions/wikia/PortableInfobox'
|
|
|
|
];
|
|
|
|
|
|
|
|
$wgAutoloadClasses[ 'PortableInfoboxRenderService' ] = $dir . 'services/PortableInfoboxRenderService.class.php';
|
2015-05-29 14:37:35 +00:00
|
|
|
$wgAutoloadClasses[ 'PortableInfoboxErrorRenderService' ] = $dir . 'services/PortableInfoboxErrorRenderService.class.php';
|
2015-04-27 14:05:31 +00:00
|
|
|
|
|
|
|
// parser
|
2015-05-04 14:43:53 +00:00
|
|
|
$wgAutoloadClasses[ 'Wikia\\PortableInfobox\\Parser\\ExternalParser'] = $dir . 'services/Parser/ExternalParser.php';
|
2015-05-07 12:37:13 +00:00
|
|
|
$wgAutoloadClasses[ 'Wikia\\PortableInfobox\\Parser\\SimpleParser'] = $dir . 'services/Parser/SimpleParser.php';
|
2015-04-27 14:05:31 +00:00
|
|
|
$wgAutoloadClasses[ 'Wikia\\PortableInfobox\\Parser\\XmlParser'] = $dir . 'services/Parser/XmlParser.php';
|
2015-05-04 14:43:53 +00:00
|
|
|
$wgAutoloadClasses[ 'Wikia\\PortableInfobox\\Parser\\DummyParser'] = $dir . 'services/Parser/DummyParser.php';
|
2015-04-27 14:05:31 +00:00
|
|
|
$wgAutoloadClasses[ 'Wikia\\PortableInfobox\\Parser\\MediaWikiParserService'] = $dir . 'services/Parser/MediaWikiParserService.php';
|
|
|
|
$wgInfoboxParserNodes = [
|
|
|
|
'Node',
|
2015-07-01 14:19:31 +00:00
|
|
|
'NodeNavigation',
|
2015-04-27 14:05:31 +00:00
|
|
|
'NodeGroup',
|
|
|
|
'NodeHeader',
|
|
|
|
'NodeImage',
|
2015-06-10 15:19:40 +00:00
|
|
|
'NodeInfobox',
|
2015-05-04 10:48:57 +00:00
|
|
|
'NodeData',
|
2015-04-27 14:05:31 +00:00
|
|
|
'NodeTitle',
|
|
|
|
'NodeUnimplemented'
|
|
|
|
];
|
2015-06-10 09:28:33 +00:00
|
|
|
$wgAutoloadClasses[ 'Wikia\\PortableInfobox\\Parser\\Nodes\\NodeFactory' ] = $dir . 'services/Parser/Nodes/NodeFactory.class.php';
|
2015-04-27 14:05:31 +00:00
|
|
|
foreach ( $wgInfoboxParserNodes as $parserNode ) {
|
|
|
|
$wgAutoloadClasses[ 'Wikia\\PortableInfobox\\Parser\\Nodes\\'.$parserNode ] = $dir . 'services/Parser/Nodes/'.$parserNode.'.php';
|
|
|
|
}
|
|
|
|
|
2015-05-04 14:43:53 +00:00
|
|
|
// helpers
|
|
|
|
$wgAutoloadClasses[ 'Wikia\PortableInfobox\Helpers\ImageFilenameSanitizer' ] = $dir . 'services/Helpers/ImageFilenameSanitizer.php';
|
2015-05-19 18:20:44 +00:00
|
|
|
$wgAutoloadClasses[ 'Wikia\PortableInfobox\Helpers\SimpleXmlUtil' ] = $dir . 'services/Helpers/SimpleXmlUtil.php';
|
2015-06-11 09:47:22 +00:00
|
|
|
$wgAutoloadClasses[ 'Wikia\PortableInfobox\Helpers\InfoboParamsValidator' ] = $dir . 'services/Helpers/InfoboParamsValidator.php';
|
2015-06-19 10:31:22 +00:00
|
|
|
$wgAutoloadClasses[ 'Wikia\PortableInfobox\Helpers\PortableInfoboxDataBag' ] = $dir . 'services/Helpers/PortableInfoboxDataBag.php';
|
2015-07-28 11:49:17 +00:00
|
|
|
$wgAutoloadClasses[ 'Wikia\PortableInfobox\Helpers\PortableInfoboxRenderServiceHelper' ] = $dir . 'services/Helpers/PortableInfoboxRenderServiceHelper.php';
|
2015-05-04 14:43:53 +00:00
|
|
|
|
2015-04-27 14:05:31 +00:00
|
|
|
// controller classes
|
|
|
|
$wgAutoloadClasses[ 'PortableInfoboxParserTagController' ] = $dir . 'controllers/PortableInfoboxParserTagController.class.php';
|
2015-05-29 13:04:04 +00:00
|
|
|
$wgAutoloadClasses[ 'ApiPortableInfobox' ] = $dir . 'controllers/ApiPortableInfobox.class.php';
|
2015-06-10 09:28:33 +00:00
|
|
|
$wgAutoloadClasses[ 'ApiQueryPortableInfobox' ] = $dir . 'controllers/ApiQueryPortableInfobox.class.php';
|
2015-04-27 14:05:31 +00:00
|
|
|
$wgAutoloadClasses[ 'PortableInfoboxHooks' ] = $dir . 'PortableInfoboxHooks.class.php';
|
|
|
|
|
|
|
|
// hooks
|
2015-06-19 10:31:22 +00:00
|
|
|
$wgHooks['ParserFirstCallInit'][] = 'PortableInfoboxParserTagController::parserTagInit';
|
|
|
|
$wgHooks['ParserTagHooksBeforeInvoke'][] = 'PortableInfoboxHooks::onParserTagHooksBeforeInvoke';
|
2015-04-27 14:05:31 +00:00
|
|
|
$wgHooks['BeforePageDisplay'][] = 'PortableInfoboxHooks::onBeforePageDisplay';
|
2015-05-08 09:48:23 +00:00
|
|
|
$wgHooks['ParserAfterTidy'][] = 'PortableInfoboxParserTagController::replaceInfoboxMarkers';
|
2015-06-09 10:14:49 +00:00
|
|
|
$wgHooks['ImageServing::buildAndGetIndex'][] = 'PortableInfoboxHooks::onImageServingCollectImages';
|
2015-04-27 14:05:31 +00:00
|
|
|
|
|
|
|
// i18n mapping
|
|
|
|
$wgExtensionMessagesFiles[ 'PortableInfobox' ] = $dir . 'PortableInfobox.i18n.php';
|
2015-05-29 13:04:04 +00:00
|
|
|
|
2015-06-01 09:40:06 +00:00
|
|
|
// MW API
|
2015-05-29 13:04:04 +00:00
|
|
|
$wgAPIModules['infobox'] = 'ApiPortableInfobox';
|
2015-06-10 09:28:33 +00:00
|
|
|
$wgAPIPropModules[ 'infobox' ] = 'ApiQueryPortableInfobox';
|