Thanks. I'll try it. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Haim (Howard) Roman Computer Center, Jerusalem College of Technology Phone: 052-8-592-599 (6022 from within Machon Lev)
2009/8/25 Łukasz Garczewski tor@wikia-inc.com
On Mon, Aug 24, 2009 at 11:57 PM, Haim (Howard) Romanroman@jct.ac.il wrote:
I'd like to change the logo (set by $wgLogo) according to the current namespace. But how to get the current namespace? The only way I can see is to call getNamespace(), e.g., in the Wiki.php of my wiki:
$ret = Title::newFromURL( $title ); ... $ret->getNamespace() != NS_SPECIAL
Is that the way? If so, how would I set "$ret" (in this case) to be the title of the current page?
Use the global $wgTitle object and call the method on that.
As long as you change the value os $wgLogo before the skin is output, you should be fine.
Also, you might find docs/hooks.txt and interesting read, as well as http://www.mediawiki.org/wiki/Manual:Hooks