On Tue, Sep 11, 2007 at 04:10:25PM +0100, Andreas Rindler wrote:
On 10/09/2007, Jens Frank jf@mormo.org wrote:
On Mon, Sep 10, 2007 at 02:42:11PM +0100, Andreas Rindler wrote:
Hi, I am trying to include another extension in my own extension. I need to parse the other extension as wikitext, but it doesn't work.
I am extending http://www.mediawiki.org/wiki/Extension:SelectCategoryTagCloud to include not only a tag cloud, but also a hierarchical view on categories. Instead of writing the code from scratch, I would like to reuse http://www.mediawiki.org/wiki/Extension:CategoryTree. I am trying to include the <categorytree> tags in the area where the tag cloud is. Users would then be able to select categories from the categorytree and assign them to the article.
I have used the following code, but I get an error.
You might want to try using the setTransparentTagHook() function instead of the setHook() function to register your tag. Transparent tags are evaluated at the very end of the parsing, so that they don't get wikitext as input, but parsed wikitext ("HTML").
I am using an extension A inside an extension B and I am having troubles to parse A so that I don't have to manually rewrite in HTML what extension A and the parser should do on their own. How would I apply your suggestion to extensions A or B?
Change extension B to use setTransparentTagHook().
I think you might have something like e.g.
<b-tag> draw chart values <a-tag>select x,y from values where...</a-tag> color red </b-tag>
If a-tag is registered using setHook(), a-tag would get expanded first, and then b-tag would be expanded, getting a-tag's output as input to the values parameter.
Regards,
jens