3 # Alert the user that this is not a valid entry point to MediaWiki if
4 # they try to access the special pages file directly.
5 if (!defined('MEDIAWIKI')) {
7 To install my extension, put the following line in LocalSettings.php:
8 require_once( "\$IP/extensions/EditImage/EditImage.php" );
13 $dir = dirname(__FILE__) . '/';
14 $wgAutoloadClasses['EditImage'] = $dir . 'EditImage_body.php';
15 $wgExtensionMessagesFiles['EditImage'] = $dir . 'EditImage.i18n.php';
16 $wgSpecialPages['EditImage'] = 'EditImage';
17 # $wgHooks['LanguageGetSpecialPageAliases'][] = 'EditImageLocalizedPageName';
19 function myExtensionLocalizedPageName(&$specialPageArray, $code) {
20 # The localized title of the special page is among the messages of the extension:
21 wfLoadExtensionMessages('EditImage');
22 $text = wfMsg('editimage');
24 # Convert from title in text form to DBKey and put it into the alias array:
25 $title = Title::newFromText($text);
26 $specialPageArray['EditImage'][] = $title->getDBKey();
31 $wgExtensionCredits['specialpage'][] = array(
32 'name' => 'EditImage',
34 'author' => 'Benjamin Mako Hill',
35 'url' => 'http://www.mediawiki.org/wiki/User:Benjamin_Mako_Hill',
36 'description' => 'This extension provides a way for Mediawiki users to edit images from the web.'