2015-04-27 14:05:31 +00:00
|
|
|
<?php
|
|
|
|
$dir = dirname(__FILE__) . '/';
|
|
|
|
|
|
|
|
$wgExtensionCredits[ 'parserhook' ][] = [
|
|
|
|
'name' => 'Portable Infobox',
|
|
|
|
'author' => [
|
|
|
|
'Adam Robak',
|
|
|
|
'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';
|
|
|
|
|
|
|
|
// parser
|
2015-05-04 14:43:53 +00:00
|
|
|
$wgAutoloadClasses[ 'Wikia\\PortableInfobox\\Parser\\ExternalParser'] = $dir . 'services/Parser/ExternalParser.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',
|
|
|
|
'NodeComparison',
|
|
|
|
'NodeSet',
|
|
|
|
'NodeFooter',
|
|
|
|
'NodeGroup',
|
|
|
|
'NodeHeader',
|
|
|
|
'NodeImage',
|
2015-05-04 10:48:57 +00:00
|
|
|
'NodeData',
|
2015-04-27 14:05:31 +00:00
|
|
|
'NodeTitle',
|
|
|
|
'NodeUnimplemented'
|
|
|
|
];
|
|
|
|
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-04-27 14:05:31 +00:00
|
|
|
// controller classes
|
|
|
|
$wgAutoloadClasses[ 'PortableInfoboxParserTagController' ] = $dir . 'controllers/PortableInfoboxParserTagController.class.php';
|
|
|
|
$wgAutoloadClasses[ 'PortableInfoboxHooks' ] = $dir . 'PortableInfoboxHooks.class.php';
|
|
|
|
|
|
|
|
// hooks
|
|
|
|
$wgHooks[ 'ParserFirstCallInit' ][] = 'PortableInfoboxParserTagController::parserTagInit';
|
|
|
|
$wgHooks['BeforePageDisplay'][] = 'PortableInfoboxHooks::onBeforePageDisplay';
|
|
|
|
$wgHooks[ 'SkinAfterBottomScripts' ][] = 'PortableInfoboxHooks::onSkinAfterBottomScripts';
|
|
|
|
|
|
|
|
// i18n mapping
|
|
|
|
$wgExtensionMessagesFiles[ 'PortableInfobox' ] = $dir . 'PortableInfobox.i18n.php';
|