* namespaces search improvements partially by * Leonardo Pimenta * Cleaned up by Trevor Parscal * @copyright Public domain * @license Public domain * @version 0.1.4 */ // Check environment if ( !defined( 'MEDIAWIKI' ) ) { echo "This is an extension to the MediaWiki package and cannot be run standalone.\n"; die( -1 ); } // Credits $wgExtensionCredits['parserhook'][] = array( 'path' => __FILE__, 'name' => 'InputBox', 'author' => array( 'Erik Moeller', 'Leonardo Pimenta', 'Rob Church', 'Trevor Parscal', 'DaSch' ), 'version' => '0.3.0', 'url' => 'https://www.mediawiki.org/wiki/Extension:InputBox', 'description' => 'Allow inclusion of predefined HTML forms.', 'descriptionmsg' => 'inputbox-desc', ); // Internationalization $wgMessagesDirs['InputBox'] = __DIR__ . '/i18n'; $wgExtensionMessagesFiles['InputBox'] = __DIR__ . '/InputBox.i18n.php'; // Register auto load for the special page class $wgAutoloadClasses['InputBoxHooks'] = __DIR__ . '/InputBox.hooks.php'; $wgAutoloadClasses['InputBox'] = __DIR__ . '/InputBox.classes.php'; // Register parser hook $wgHooks['ParserFirstCallInit'][] = 'InputBoxHooks::register'; $wgHooks['MediaWikiPerformAction'][] = 'InputBoxHooks::onMediaWikiPerformAction'; $wgHooks['SpecialPageBeforeExecute'][] = 'InputBoxHooks::onSpecialPageBeforeExecute'; $resourcePaths = array( 'localBasePath' => __DIR__ . '/resources', 'remoteExtPath' => 'InputBox/resources' ); $wgResourceModules['ext.inputBox.styles'] = $resourcePaths + array( 'styles' => 'ext.inputBox.styles.css', ); $wgResourceModules['ext.inputBox'] = $resourcePaths + array( 'scripts' => 'ext.inputBox.js', 'dependencies' => array( 'jquery.throttle-debounce' ) ); unset( $resourcePaths );