2 /* This extension creates a map using OpenLayers to show sledrun details and sledrun overviews.
4 * This extension depends on no other extension.
7 * <wrgmap lat="47.267648" lon="11.40465" zoom="10"/>
8 * Shows icons for all sledruns.
9 * lat, lon and zoom are optional.
14 * <wrmap lat="47.267648" lon="11.40465" zoom="10" width="550" height="400">
16 * <gasthaus wiki="Rumer Alm (Gasthaus)" name="Rumer Alm">
20 * <gasthaus name="Enzianhuette">
24 * <bushaltestelle name="Rum Sanatorium">
48 * <linie farbe="#232321" dicke="5">
53 * <punkt name="Brunnen">
58 * lat, lon and zoom are optional.
61 $wgExtensionCredits['parserhook'][] = array(
62 'name' => 'Winterrodeln Map',
64 'author' =>'Philipp Spitzer',
65 'url' => 'http://www.winterrodeln.org/trac/wiki/WrMap',
66 'description' => 'This extension creates a map using OpenLayers to show sledrun details and sledrun overviews.'
71 $wgResourceModules['ext.wrmap'] = array(
72 'scripts' => array('openlayers/OpenLayers.js', 'wrmap.js'),
73 'styles' => array('openlayers/theme/default/style.css', 'openlayers/theme/default/google.css'),
75 // When your module is loaded, these messages will be available through mw.msg()
76 //'messages' => array( 'myextension-hello-world', 'myextension-goodbye-world' ),
78 // If your scripts need code from other modules, list their identifiers as dependencies
79 // and ResourceLoader will make sure they're loaded before you.
80 // You don't need to manually list 'mediawiki' or 'jquery', which are always loaded.
81 //'dependencies' => array( 'jquery.ui.datepicker' ),
83 // You need to declare the base path of the file paths in 'scripts' and 'styles'
84 'localBasePath' => dirname( __FILE__ ),
86 // ... and the base from the browser as well. For extensions this is made easy,
87 // you can use the 'remoteExtPath' property to declare it relative to where the wiki
88 // has $wgExtensionAssetsPath configured:
89 'remoteExtPath' => 'wrmap',
95 $wgAutoloadClasses['WrMap'] = dirname(__FILE__) . '/wrmap.body.php';
98 $wgHooks['ParserFirstCallInit'][] = 'wrMapParserFirstCallInit';
101 function wrMapParserFirstCallInit($parser) {
102 $parser->setHook('wrgmap', 'WrMap::render');
103 $parser->setHook('wrmap', 'WrMap::render');