Index: trunk/extensions/TreeAndMenu/TreeAndMenu.php |
— | — | @@ -73,6 +73,15 @@ |
74 | 74 | $v = ( is_object( $image ) && $image->exists() ) ? $image->getURL() : $wgTreeViewImages[$k]; |
75 | 75 | $this->images .= "tree.icon['$k'] = '$v';"; |
76 | 76 | } |
| 77 | + |
| 78 | + // Set up JavaScript and CSS resources |
| 79 | + $wgResourceModules['ext.treeandmenu'] = array( |
| 80 | + 'scripts' => array( 'star.js' ), |
| 81 | + 'styles' => array( 'treeandmenu.css' ), |
| 82 | + 'localBasePath' => dirname( __FILE__ ), |
| 83 | + 'remoteExtPath' => basename( dirname( __FILE__ ) ), |
| 84 | + ); |
| 85 | + $wgOut->addModules( 'ext.treeandmenu' ); |
77 | 86 | } |
78 | 87 | |
79 | 88 | /** |
— | — | @@ -94,9 +103,8 @@ |
95 | 104 | /** |
96 | 105 | * Expand #star parser-functions |
97 | 106 | */ |
98 | | - public function expandStar() { |
99 | | - $args = func_get_args(); |
100 | | - return 'star menus coming soon!'; |
| 107 | + public function expandStar( &$parser, $text ) { |
| 108 | + return "<div class=\"tam-star\">\n$text\n</div>"; |
101 | 109 | } |
102 | 110 | |
103 | 111 | /** |