2008-10-27 20:33:18 +00:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* InputBox extension
|
|
|
|
*
|
|
|
|
* @file
|
|
|
|
* @ingroup Extensions
|
2008-10-27 20:56:23 +00:00
|
|
|
*
|
|
|
|
* This file contains the main include file for the Inputbox extension of
|
|
|
|
* MediaWiki.
|
2008-10-27 20:33:18 +00:00
|
|
|
*
|
|
|
|
* Usage: Add the following line in LocalSettings.php:
|
|
|
|
* require_once( "$IP/extensions/InputBox/InputBox.php" );
|
|
|
|
*
|
|
|
|
* @author Erik Moeller <moeller@scireview.de>
|
|
|
|
* namespaces search improvements partially by
|
2008-10-27 20:56:23 +00:00
|
|
|
* Leonardo Pimenta <leo.lns@gmail.com>
|
2008-10-27 20:33:18 +00:00
|
|
|
* Cleaned up by Trevor Parscal <tparscal@wikimedia.org>
|
|
|
|
* @copyright Public domain
|
|
|
|
* @license Public domain
|
2011-07-14 03:59:55 +00:00
|
|
|
* @version 0.1.4
|
2008-10-27 20:33:18 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
// Check environment
|
2008-10-27 20:56:23 +00:00
|
|
|
if ( !defined( 'MEDIAWIKI' ) ) {
|
2014-05-18 09:07:27 +00:00
|
|
|
echo "This is an extension to the MediaWiki package and cannot be run standalone.\n";
|
2008-10-27 20:56:23 +00:00
|
|
|
die( -1 );
|
2008-10-27 20:33:18 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* Configuration */
|
|
|
|
|
|
|
|
// Credits
|
|
|
|
$wgExtensionCredits['parserhook'][] = array(
|
2009-04-27 03:53:32 +00:00
|
|
|
'path' => __FILE__,
|
2008-10-27 20:38:10 +00:00
|
|
|
'name' => 'InputBox',
|
2011-07-04 17:01:45 +00:00
|
|
|
'author' => array( 'Erik Moeller', 'Leonardo Pimenta', 'Rob Church', 'Trevor Parscal', 'DaSch' ),
|
2014-03-28 07:24:47 +00:00
|
|
|
'version' => '0.2.0',
|
2011-12-13 23:49:33 +00:00
|
|
|
'url' => 'https://www.mediawiki.org/wiki/Extension:InputBox',
|
2011-07-04 17:01:45 +00:00
|
|
|
'description' => 'Allow inclusion of predefined HTML forms.',
|
2008-10-27 20:33:18 +00:00
|
|
|
'descriptionmsg' => 'inputbox-desc',
|
|
|
|
);
|
|
|
|
|
|
|
|
// Shortcut to this extension directory
|
2014-03-28 07:24:47 +00:00
|
|
|
$dir = __DIR__ . '/';
|
2008-10-27 20:33:18 +00:00
|
|
|
|
|
|
|
// Internationalization
|
2014-03-28 07:24:47 +00:00
|
|
|
$wgMessagesDirs['InputBox'] = __DIR__ . '/i18n';
|
2008-10-27 20:33:18 +00:00
|
|
|
$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
|
2009-09-04 22:22:12 +00:00
|
|
|
$wgHooks['ParserFirstCallInit'][] = 'InputBoxHooks::register';
|
2010-03-18 19:11:12 +00:00
|
|
|
$wgHooks['MediaWikiPerformAction'][] = 'InputBoxHooks::onMediaWikiPerformAction';
|
2014-04-05 20:43:15 +00:00
|
|
|
$wgHooks['SpecialPageBeforeExecute'][] = 'InputBoxHooks::onSpecialPageBeforeExecute';
|
2014-05-18 09:51:07 +00:00
|
|
|
|
|
|
|
$wgResourceModules['ext.inputBox.styles'] = array(
|
|
|
|
'localBasePath' => dirname( __FILE__ ) . '/resources',
|
|
|
|
'remoteExtPath' => 'InputBox/resources',
|
|
|
|
'styles' => 'ext.inputBox.styles.css',
|
|
|
|
);
|