Extension talk:StackFunctions

This extension is about a thousand degrees of awesome, and I'm starting to test it out on the wiki at http://nomicapolis.net with some customizations already:


 * Exception reporting disables caching of the output, so a simple reload is all that's necessary if any code is broken.
 * rand disables the cache automatically so you get a new random number each load. This has good and bad implications, so I might break out a new cache-control word instead.
 * The patch to Parser.php to add preprocess2 is not necessary -- I simply inlined it.
 * New words to get at template args (only works in the parserfunc) and tag args (only works in the tag of course). I'm not sure whether these should be in statusdict or not, right now they're separate words.

I really want to get at the template args when using the tag syntax, but $this->mParser->mArgStack is completely empty when using the tag! Perhaps someone with stronger wiki-fu than myself can figure out how and if this can be hooked.

67.98.226.13 18:12, 6 June 2007 (UTC)


 * Concerning the last point, to my understanding this is not possible. I spent quite some time on this because I'd be just as keen on getting the args, and my conclusion is: the args are replaced before passing the stuff to the extension, so within the extension code you never have a chance so see the mapping of args to their contents. You'd need to conserve mArgStack from the preceding level of recursion, which requires - if ever possible - really ugly hacks to Parser.php. RV1971 20:47, 9 June 2007 (UTC)