On 14/07/05, Zain Memon <zain(a)voltage.com> wrote:
I know you can add a new <pointy brace> tag into
the Wiki using
extensions, but is it possible to add a [[square brace:]] tag in?
In terms of the built-in "extension" architecture, the syntax added is
always of the form <foo>...</foo>. This provides a standardised kind
of syntax to say "this is an extension".
The [[foo:bar]] syntax is used for links, with "foo" a namespace and
"bar" the title within that namespace. You can add custom namespaces,
or rename some of the existing ones, if you want; see
http://meta.wikimedia.org/wiki/Help:Namespace and
http://meta.wikimedia.org/wiki/Help:Custom_namespaces
However, since you referred to "a [[square brace:]] tag", you are
probably thinking of the namespaces which have special behaviour when
linked to: the 'Image' namespace displays inline; the 'Category'
namespace moves the link out of line (and stores the link as a
category association rather than a plain link); the 'Media' namespace
doesn't really exist, but by-passes the image description page as a
kludge to "play" sounds and videos or "download" other files.
These behaviours are hard-coded, mainly in the rather mammoth and ugly
file includes/Parser.php - the place to start hacking if you want to
introduce a similar special behaviour for another namespace is the
"replaceInternalLinks()" function. But be warned - it won't be easy ;)
--
Rowan Collins BSc
[IMSoP]