Index: trunk/extensions/MwEmbedSupport/MwEmbedSupport.hooks.php |
— | — | @@ -10,7 +10,7 @@ |
11 | 11 | class MwEmbedSupportHooks { |
12 | 12 | // Register MwEmbedSupport Hooks |
13 | 13 | static function register(){ |
14 | | - global $wgHooks; |
| 14 | + global $wgHooks $wgResourceModules; |
15 | 15 | // Register the core MwEmbed Support Module: |
16 | 16 | MwEmbedResourceManager::register( 'extensions/MwEmbedSupport/MwEmbedModules/MwEmbedSupport' ); |
17 | 17 | |
— | — | @@ -28,6 +28,11 @@ |
29 | 29 | |
30 | 30 | // Add the startup modules hook |
31 | 31 | $wgHooks['ResourceLoaderGetStartupModules'][] = 'MwEmbedSupportHooks::addStartupModules'; |
| 32 | + $wgResourceModules['ext.MwEmbedSupport'] = array( |
| 33 | + 'styles' => 'MwEmbedModules/MwEmbedSupport/skins/common/MwEmbedCommonStyle.css', |
| 34 | + 'localBasePath' => dirname( __FILE__ ), |
| 35 | + 'remoteExtPath' => 'MwEmbedSupport', |
| 36 | + ); |
32 | 37 | return true; |
33 | 38 | } |
34 | 39 | |
— | — | @@ -46,4 +51,4 @@ |
47 | 52 | array_push($modules, 'jquery.triggerQueueCallback', 'jquery.loadingSpinner', 'jquery.mwEmbedUtil', 'mw.MwEmbedSupport' ); |
48 | 53 | return true; |
49 | 54 | } |
50 | | -} |
\ No newline at end of file |
| 55 | +} |
Index: trunk/extensions/MwEmbedSupport/MwEmbedResourceManager.php |
— | — | @@ -94,6 +94,9 @@ |
95 | 95 | // Register all the resources with the resource loader |
96 | 96 | foreach( self::$moduleSet as $path => $modules ) { |
97 | 97 | foreach ( $modules as $name => $resources ) { |
| 98 | + //remove 'extension' prefix from path |
| 99 | + $resources['remoteExtPath'] = implode( '/', array_shift(explode( '/', $path ))); |
| 100 | + |
98 | 101 | // Register the resource with MwEmbed extended class if in standAlone resource loader mode: |
99 | 102 | if( $wgEnableMwEmbedStandAlone === true ){ |
100 | 103 | $resourceLoader->register( |
— | — | @@ -112,4 +115,4 @@ |
113 | 116 | // Continue module processing |
114 | 117 | return true; |
115 | 118 | } |
116 | | -} |
\ No newline at end of file |
| 119 | +} |