Moin,
On Saturday 08 April 2006 12:09, Tels wrote:
Moin, On Saturday 08 April 2006 06:49, Tim Starling wrote:
Tels wrote:
[snip]
function DynamicPageList2( $input, $params, &$parser ) { ... $ns = $parser->mTitle->getNamespace(); ...
Very cool. I toyed around with that, and having access to the Parser is really nice. :-)
However, in 1.5.x, the third param is not actually passed in when calling the callbacks, so I had to patch the source (itÄs a one-line patch, and quite safe). Haven't checked, but I assume that in 1.6 this works "out-of-the-box".
In addition, I found no documentation on what you can all do with the Parser object. There is some autogenerated API doc, but this covers only methods. And mTitle is a member variable, and these seem not to be listed on SF. Is there a doc which would help someone using the Parser in an extension?
Another unrelated question, would this code work on 1.5 and 1.6 alike and would there be any gotcha!'s with it: (Yes, I could test it, but I would still not be knowing if this is considered "safe" :-)
function MyExtension( $input, $params ) { global $wgParser; ... $ns = $wgParser->mTitle->getNamespace(); ...
As for the original problem with the style-sheets, my current solution is to emit the <style> tags in mid-HTML. Ugly, but it works, opposed to the other proposed solutions to get it into the header.
What I haven't found out yet is how/why a custom skin would allow me to switch off the menu (more easily, that is). AFAIK you need something along the lines
<style type="text/css">#p-navigation { display: none; }</style>
and having a custom skin (where menubox is named, oh, mymenubox or something) wouldn't actually change anything except the class name. But maybe I am just very stupid today :)
I am currently beta-testing and documention my slide extension, should hit CPAN later this week. Thanx alot for your patience and time!
Best wishes,
Tels