a804a6151a4cc1db0f19e713589fd179cbc3e1ed
[philipp/winterrodeln/mediawiki_extensions/wrmap.git] / wrmap.php
1 <?php
2 // This extension depends on no other extension.
3
4 $wgExtensionCredits['parserhook'][] = array(
5         'name' => 'Winterrodeln Map',
6         'version' => '2.1.0',
7         'author' =>'Philipp Spitzer', 
8         'url' => 'http://www.winterrodeln.org/trac/wiki/WrMap', 
9         'description' => 'This extension creates a map using OpenLayers to show sledruns.'
10 );
11
12
13
14 $wgResourceModules['ext.wrmap'] = array(
15                 'scripts' => array('openlayers/OpenLayers.js', 'wrmap.js'),
16         'styles' => array('openlayers/theme/default/style.css', 'openlayers/theme/default/google.css'),
17  
18         // When your module is loaded, these messages will be available through mw.msg()
19         //'messages' => array( 'myextension-hello-world', 'myextension-goodbye-world' ),
20  
21         // If your scripts need code from other modules, list their identifiers as dependencies
22         // and ResourceLoader will make sure they're loaded before you.
23         // You don't need to manually list 'mediawiki' or 'jquery', which are always loaded.
24         //'dependencies' => array( 'jquery.ui.datepicker' ),
25  
26         // You need to declare the base path of the file paths in 'scripts' and 'styles'
27         'localBasePath' => dirname( __FILE__ ),
28
29         // ... and the base from the browser as well. For extensions this is made easy,
30         // you can use the 'remoteExtPath' property to declare it relative to where the wiki
31         // has $wgExtensionAssetsPath configured:
32         'remoteExtPath' => 'wrmap',
33
34                 'position' => 'top'
35 );
36
37
38 $wgAutoloadClasses['WrMap'] = dirname(__FILE__) . '/wrmap.body.php';
39
40
41 $wgHooks['ParserFirstCallInit'][] = 'wrMapParserFirstCallInit';
42
43
44 function wrMapParserFirstCallInit($parser) {
45         $parser->setHook('wrgmap', 'WrMap::render');
46         return true;
47 }
48
49
50 ?>