r110588 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r110587‎ | r110588 | r110589 >
Date:16:34, 2 February 2012
Author:nad
Status:deferred
Tags:
Comment:
new star menu started
Modified paths:
  • /trunk/extensions/TreeAndMenu/TreeAndMenu.php (modified) (history)

Diff [purge]

Index: trunk/extensions/TreeAndMenu/TreeAndMenu.php
@@ -73,6 +73,15 @@
7474 $v = ( is_object( $image ) && $image->exists() ) ? $image->getURL() : $wgTreeViewImages[$k];
7575 $this->images .= "tree.icon['$k'] = '$v';";
7676 }
 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' );
7786 }
7887
7988 /**
@@ -94,9 +103,8 @@
95104 /**
96105 * Expand #star parser-functions
97106 */
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>";
101109 }
102110
103111 /**

Status & tagging log