Last modified: 2006-08-20 05:17:23 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T6294, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 4294 - Special template prefix extensions
Special template prefix extensions
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
1.6.x
All All
: Normal enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-12-16 02:21 UTC by Jamie Bliss
Modified: 2006-08-20 05:17 UTC (History)
0 users

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Patch to implement (for 1.5) (1023 bytes, patch)
2005-12-16 02:24 UTC, Jamie Bliss
Details
A demo of a hook using this. (667 bytes, text/plain)
2005-12-16 02:33 UTC, Jamie Bliss
Details
Patch to implement (for 1.5), including Special:Version (1.51 KB, patch)
2005-12-31 18:42 UTC, Jamie Bliss
Details
Patch to implement (for 1.6) (2.02 KB, patch)
2005-12-31 19:12 UTC, Jamie Bliss
Details

Description Jamie Bliss 2005-12-16 02:21:02 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.)
Comment 1 Jamie Bliss 2005-12-16 02:24:04 UTC
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
Comment 2 Jamie Bliss 2005-12-16 02:33:44 UTC
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.
Comment 3 Jamie Bliss 2005-12-31 18:42:46 UTC
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.
Comment 4 Jamie Bliss 2005-12-31 19:12:44 UTC
Created attachment 1254 [details]
Patch to implement (for 1.6)

This is the same as attachment #1253 [details], but for CVS HEAD.
Comment 5 Jamie Bliss 2006-01-02 19:10:27 UTC
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.
Comment 6 Brion Vibber 2006-01-04 12:36:23 UTC
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.
Comment 7 Rob Church 2006-07-04 08:36:42 UTC
You can now write parser functions extensions implementing these sorts of things.
Comment 8 Jamie Bliss 2006-08-20 05:17:23 UTC
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.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links