-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathImageLoader.php
More file actions
40 lines (31 loc) · 1.31 KB
/
ImageLoader.php
File metadata and controls
40 lines (31 loc) · 1.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<?php
if ( !defined( 'MEDIAWIKI' ) ) die( 'This file is meant to be used in mediawiki.' );
/* The photo URL of {{#image:arg1|arg2}} is $wgImagePrefix[arg1]arg2$wgImageSuffix[arg1] */
$wgImagePrefix = array();
$wgImageSuffix = array();
/**
* Add extension information to Special:Version
*/
$wgExtensionCredits['parserhook'][] = array(
'path' => __FILE__,
'name' => 'ImageLoader',
'version' => '0.1',
'author' => '[https://github.com/LitusProject The Litus Project]',
'descriptionmsg' => 'description-message',
'url' => 'https://github.com/LitusProject/MediaWikiImageLoader'
);
/* Add our class to the autoloader */
$wgAutoloadClasses['ImageLoader'] = dirname( __FILE__ ) . '/ImageLoader.body.php';
/* Add our initialization function to the hook */
$wgHooks['ParserFirstCallInit'][] = 'wfImageLoaderInit';
/* Install the 'magic word' image */
$wgExtensionMessagesFiles['ImageLoaderMagic'] = dirname( __FILE__ ) . '/ImageLoader.i18n.magic.php';
/* Install our i18n */
$wgExtensionMessagesFiles['ImageLoader'] = dirname( __FILE__ ) . '/ImageLoader.i18n.php';
/* Initialisation function */
function wfImageLoaderInit( Parser &$parser ) {
// add the parser hook
$parser->setFunctionHook( 'image', 'ImageLoader::parserFunction' );
// return true so that MW can continue
return true;
}