2007-07-31 10:21:34 +00:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* Gadgets extension - lets users select custom javascript gadgets
|
|
|
|
*
|
2008-02-04 08:08:43 +00:00
|
|
|
*
|
2007-07-31 10:21:34 +00:00
|
|
|
* For more info see http://mediawiki.org/wiki/Extension:Gadgets
|
|
|
|
*
|
2010-06-06 15:12:22 +00:00
|
|
|
* @file
|
|
|
|
* @ingroup Extensions
|
2007-07-31 10:21:34 +00:00
|
|
|
* @author Daniel Kinzler, brightbyte.de
|
|
|
|
* @copyright © 2007 Daniel Kinzler
|
2008-07-09 14:57:19 +00:00
|
|
|
* @license GNU General Public Licence 2.0 or later
|
2007-07-31 10:21:34 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
if( !defined( 'MEDIAWIKI' ) ) {
|
|
|
|
echo( "This file is an extension to the MediaWiki software and cannot be used standalone.\n" );
|
|
|
|
die( 1 );
|
|
|
|
}
|
|
|
|
|
2010-11-11 18:19:57 +00:00
|
|
|
if ( version_compare( $wgVersion, '1.17alpha', '<' ) ) {
|
|
|
|
die( "This version of Extension:Gadgets requires MediaWiki 1.17+\n" );
|
|
|
|
}
|
|
|
|
|
2008-02-04 08:08:43 +00:00
|
|
|
$wgExtensionCredits['other'][] = array(
|
2009-04-27 03:15:19 +00:00
|
|
|
'path' => __FILE__,
|
2008-02-04 08:08:43 +00:00
|
|
|
'name' => 'Gadgets',
|
2010-11-11 18:19:57 +00:00
|
|
|
'author' => array( 'Daniel Kinzler', 'Max Semenik' ),
|
2007-07-31 10:21:34 +00:00
|
|
|
'url' => 'http://mediawiki.org/wiki/Extension:Gadgets',
|
2008-02-04 08:40:17 +00:00
|
|
|
'descriptionmsg' => 'gadgets-desc',
|
2007-07-31 10:21:34 +00:00
|
|
|
);
|
|
|
|
|
2010-11-11 18:19:57 +00:00
|
|
|
$wgHooks['ArticleSaveComplete'][] = 'GadgetHooks::articleSaveComplete';
|
|
|
|
$wgHooks['BeforePageDisplay'][] = 'GadgetHooks::beforePageDisplay';
|
|
|
|
$wgHooks['GetPreferences'][] = 'GadgetHooks::getPreferences';
|
|
|
|
$wgHooks['ResourceLoaderRegisterModules'][] = 'GadgetHooks::registerModules';
|
|
|
|
$wgHooks['UnitTestsList'][] = 'GadgetHooks::unitTestsList';
|
2007-07-31 10:21:34 +00:00
|
|
|
|
2008-02-04 08:40:17 +00:00
|
|
|
$dir = dirname(__FILE__) . '/';
|
|
|
|
$wgExtensionMessagesFiles['Gadgets'] = $dir . 'Gadgets.i18n.php';
|
2009-05-24 22:12:11 +00:00
|
|
|
$wgExtensionAliasesFiles['Gadgets'] = $dir . 'Gadgets.alias.php';
|
2010-11-11 18:19:57 +00:00
|
|
|
|
2011-04-17 05:37:56 +00:00
|
|
|
$wgAutoloadClasses['ApiQueryGadgetCategories'] = $dir . 'ApiQueryGadgetCategories.php';
|
2011-04-16 16:29:33 +00:00
|
|
|
$wgAutoloadClasses['ApiQueryGadgets'] = $dir . 'ApiQueryGadgets.php';
|
2010-11-11 18:19:57 +00:00
|
|
|
$wgAutoloadClasses['Gadget'] = $dir . 'Gadgets_body.php';
|
|
|
|
$wgAutoloadClasses['GadgetHooks'] = $dir . 'Gadgets_body.php';
|
2011-04-16 15:48:24 +00:00
|
|
|
$wgAutoloadClasses['GadgetResourceLoaderModule'] = $dir . 'Gadgets_body.php';
|
2008-02-04 08:40:17 +00:00
|
|
|
$wgAutoloadClasses['SpecialGadgets'] = $dir . 'SpecialGadgets.php';
|
2010-11-11 18:19:57 +00:00
|
|
|
|
2007-07-31 10:21:34 +00:00
|
|
|
$wgSpecialPages['Gadgets'] = 'SpecialGadgets';
|
2008-07-09 14:57:19 +00:00
|
|
|
$wgSpecialPageGroups['Gadgets'] = 'wiki';
|
2011-04-16 16:29:33 +00:00
|
|
|
|
2011-04-17 05:37:56 +00:00
|
|
|
$wgAPIListModules['gadgetcategories'] = 'ApiQueryGadgetCategories';
|
2011-04-16 16:29:33 +00:00
|
|
|
$wgAPIListModules['gadgets'] = 'ApiQueryGadgets';
|