Index: trunk/extensions/BreadCrumbs/BreadCrumbs.php |
— | — | @@ -33,6 +33,14 @@ |
34 | 34 | 'descriptionmsg' => 'breadcrumbs-desc', |
35 | 35 | ); |
36 | 36 | |
| 37 | +# Ressource loader |
| 38 | +$wgResourceModules['ext.breadCrumbs'] = array( |
| 39 | + 'styles' => 'BreadCrumbs.css', |
| 40 | + |
| 41 | + 'localBasePath' => dirname( __FILE__ ), |
| 42 | + 'remoteExtPath' => 'BreadCrumbs' |
| 43 | +); |
| 44 | + |
37 | 45 | # Set Hook: |
38 | 46 | |
39 | 47 | # Showing and updating the breadcrumbs trail |
Index: trunk/extensions/BreadCrumbs/BreadCrumbsFunctions.php |
— | — | @@ -64,15 +64,12 @@ |
65 | 65 | |
66 | 66 | # Entry point for the hook for printing the CSS: |
67 | 67 | function fnBreadCrumbsOutputHook( &$m_pageObj, $m_parserOutput ) { |
68 | | - global $wgScriptPath, $wgBreadCrumbsShowAnons, $wgUser; |
| 68 | + global $wgBreadCrumbsShowAnons, $wgUser; |
69 | 69 | |
70 | | - if ( !$wgBreadCrumbsShowAnons && $wgUser->isAnon() ) |
71 | | - return true; |
| 70 | + if ( $wgBreadCrumbsShowAnons || $wgUser->isLoggedIn() ) { |
| 71 | + $m_pageObj->addModules( 'ext.breadCrumbs' ); |
| 72 | + } |
72 | 73 | |
73 | | - # Register CSS file for our select box: |
74 | | - $m_pageObj->addExtensionStyle( $wgScriptPath . |
75 | | - '/extensions/BreadCrumbs/BreadCrumbs.css' ); |
76 | | - |
77 | 74 | # Be nice: |
78 | 75 | return true; |
79 | 76 | } |