Last modified: 2006-08-20 05:17:23 UTC
(Think of GRAMMER, SUBST, or PLURAL, but with <your text here> instead.) This is an RFE for {{foo:...}}-type hooks, with arguments. I think examples will clear it up. (This also applies to 1.6, but I always implement RFEs for now.)
Created attachment 1200 [details] Patch to implement (for 1.5) This does basic implementation for 1.5. Would require almost no change for 1.6 (just move down to 2413-ish). Doesn't handle SpecialVersion.php
Created attachment 1201 [details] A demo of a hook using this. This is a demo using this hook. Basically outputs what was put in, in another form.
Created attachment 1253 [details] Patch to implement (for 1.5), including Special:Version This is identical to the previous patch, except for the addition of SpecialVersion.php, and the changes needed in that.
Created attachment 1254 [details] Patch to implement (for 1.6) This is the same as attachment #1253 [details], but for CVS HEAD.
Are there any registered ways to reduce any performance hits of this hook? Because ''every'' hook is called on ''every'' inclusion, several hooks could hurt performance.
Don't use the filter chains in $wgHooks for something like this; use a by-keyword callback registration like we have for parser tag hooks.
You can now write parser functions extensions implementing these sorts of things.
Since there is no patch or reference as to how to do this, I'll mention that you need to call Parser::setFunctionHook() to add a "parser function" it.