Re: [SMW-devel] Semantic MediaWiki and Parser Function Initialization

2008-08-18 Thread Markus Krötzsch
[Forwarding to the list after using wrong mail account in my first reply] -- Weitergeleitete Nachricht -- Betreff: Re: [SMW-devel] Semantic MediaWiki and Parser Function Initialization Datum: Samstag, 16. August 2008 Von: DanTMan <[EMAIL PROTECTED]> An: [EMAIL PROTECTED

Re: [SMW-devel] Semantic MediaWiki and Parser Function Initialization

2008-08-15 Thread Daniel Friesen
PHP Objects are dynamically extensible. You can add variables into the ParserOutput just by using $parser->mOutput->varname. Also you might want to note that ParserOutput also has addHeadItem which should work for avoiding adding head items to the wrong place. ~Daniel Friesen(Dantman, Nadir-S

Re: [SMW-devel] Semantic MediaWiki and Parser Function Initialization

2008-08-15 Thread Markus Krötzsch
On Freitag, 15. August 2008, Daniel Friesen wrote: > Sub parsers. In what kind of case does this kind of thing happen for you? Normally, sub-parses happen with (a clone of) the current parser, e.g. when using a . But I am not aware of any guideline that states that extensions are not allowed to

Re: [SMW-devel] Semantic MediaWiki and Parser Function Initialization

2008-08-15 Thread Daniel Friesen
Sub parsers. In what kind of case does this kind of thing happen for you? When one thing is being parsed, there is one parser doing that task. I don't know of many cases where multiple parsers exist (unless an extension is doing something screwy). Have you tried making use of the ParserOutput

Re: [SMW-devel] Semantic MediaWiki and Parser Function Initialization

2008-08-15 Thread Markus Krötzsch
Hi Daniel, it's always refreshing to get some thorough code critique from you in the morning -- thanks for caring! I have added you to our contributors' list, and I would much appreciate your ideas on some further hacks that I am well aware of, see below. > Anyone want to explain to me why the

[SMW-devel] Semantic MediaWiki and Parser Function Initialization

2008-08-14 Thread Daniel Friesen
Anyone want to explain to me why the ParserBeforeStrip hook is being used to register parser functions? That is a poor place for it, as well as unreliable. Which I can see by how the function being called is a major hack relying on the first call returning the callback name when already set.. S