Index: branches/REL1_18/extensions/wikihiero/wikihiero.php |
— | — | @@ -26,6 +26,7 @@ |
27 | 27 | |
28 | 28 | // Register MediaWiki extension |
29 | 29 | $wgHooks['ParserFirstCallInit'][] = 'WH_Register'; |
| 30 | +$wgHooks['BeforePageDisplay'][] = 'wfHieroBeforePageDisplay'; |
30 | 31 | $wgExtensionCredits['parserhook'][] = array( |
31 | 32 | 'path' => __FILE__, |
32 | 33 | 'name' => 'WikiHiero', |
— | — | @@ -35,6 +36,12 @@ |
36 | 37 | ); |
37 | 38 | $wgExtensionMessagesFiles['Wikihiero'] = dirname(__FILE__) . '/wikihiero.i18n.php'; |
38 | 39 | |
| 40 | +$wgResourceModules['ext.wikihiero'] = array( |
| 41 | + 'styles' => 'ext.wikihiero.css', |
| 42 | + 'localBasePath' => dirname( __FILE__ ) . '/modules', |
| 43 | + 'remoteExtPath' => 'wikihiero/modules', |
| 44 | +); |
| 45 | + |
39 | 46 | function WH_Register( &$parser ) { |
40 | 47 | $parser->setHook( 'hiero', 'WikiHieroLoader' ); |
41 | 48 | return true; |
— | — | @@ -48,6 +55,11 @@ |
49 | 56 | } |
50 | 57 | } |
51 | 58 | |
| 59 | +function wfHieroBeforePageDisplay( $out ) { |
| 60 | + $out->addModuleStyles( 'ext.wikihiero' ); |
| 61 | + return true; |
| 62 | +} |
| 63 | + |
52 | 64 | // MediaWiki entry point |
53 | 65 | function WikiHieroLoader( $text, $attribs, $parser ) { |
54 | 66 | WikiHieroLoad(); |