On Mon, 21 Mar 2005 10:36:36 -0600, Beans-v6 beans_v6@the-beans.com wrote:
I know that I could make 'Define' a namespace, but how would I go about making the namespace and customizing its code?
Some thoughts and pointers, in no particular order: * http://meta.wikimedia.org/wiki/Help:Custom_namespaces - although namespaces oin general aren't really designed to behave completely differently in this way, so you may be better off hacking Parser.php (function replaceInternalLinks()) and Title.php, where the code determines "what to do about" them. * you might want to take a look at the template/inclusion code (some of which is in Parser.php, I think, though maybe not all) since you'll probably want to include the text of all the relevant target ("Define:") pages in the source (in the title attribute, or some more controllable JavaScript pop-up). * in fact, the feature "feels" more like a special case of inclusion than linking to me, but that's kind of up to you * the easier, though, less suited really, way of doing it is with an extension tag (similar to the <math>...</math> pairs) - see http://meta.wikimedia.org/wiki/Write_your_own_MediaWiki_extension e.g., something which would make <define>page=foo; text=bar</define> do what [[Define:Foo|Bar]] would in your example (if I understand you right) * finally, there's the "new style" extension code, event-and-hook style, which may or may not let you insert something anywhere appropriate, but is worth a mention - see docs/hooks.doc in your install for details.
Sounds like an intriguing project, but not an easy one (the parsing code, in particular, is notoriously ugly...) so happy hacking!