Most people have probably forgotten about it by now, but back at the
start of march[1] there was a discussion about a partial rewrite of the
Title system (though I use rewrite to heavily when I'm talking about a
big backend project, even when 90% of the system stays the same). It was
branched off the "[Wikitech-l] Case insensitive links (not just
titles)." thread.
The branch failed twice back when I was working on it in March.
Primarily I ran into the twilight zone known as branching and merging
using SVN on Windows... eugh, and the branch always got messed up and
was unmaintained.
Now, I've got my own laptop running Ubuntu, and branching has gotten a
fair bit easier.
I've restarted the titlerewrite branch again. Anyone interested can
check it out and discuss the project as well.
Just to recap for those who didn't see the old discussions, as I
remember there were 3 goals:
A) Make MediaWiki understand the concept of titles like "iPod"
By "understand", I mean [[IPod]] and [[iPod]] are still the same page,
and they still show up as IPod in the url and database. However,
MediaWiki also has "iPod" stored so it knows what the actual styled
format of the title is. Basically this is handled by adding a column
into the database.
The difference between this and {{DISPLAYTITLE:...}} is that
displaytitle is a parser hack, while this is an actual integrated part
of the Title backend. If you rename IPod to iPod on Wikipedia with this
rewrite, then Special:Allpages and everywhere else, will display "iPod"
instead of IPod like it currently does.
B) Replace Title::secureAndSplit with an extensible Normalizer.
There are a lot of requests in bugzilla and the lists here for features
like full case-insensitive titles, per-namspace case sensitivity,
changing MW's _ handling to use - instead, and so on... Some of these
can be handled fine with adding new configuration into MediaWiki.
However, there is a point where it's unreasonable to add new
configurations for minor changes to titles that people might want. The
idea behind the Extensible Normalizer would be that extensions or other
things would be able to modify the normalization process for titles.
C) Repurpose and migrate the DISPLAYTITLE hack into it's own system.
Currently the DISPLAYTITLE parser function is merely used to change
things like IPod into iPod. While the introduction of A) would make the
use od DISPLAYTITLE no longer necessary, people do make use of
DISPLAYTITLE with restrictions turned off, or the old {{Title}} hack to
further alter the title. Sometimes a wiki has a valid reason for wanting
things like italics or superscript inside a small part of the title.
Repurposing DISPLAYTITLE would mean changing it from something meant to
tweak page title, and the html header, to just the html header with
different levels of restriction.
In extension to this, the plan was to move displaytitle partially out of
it's limited area inside of the parser cache, and make it a separate
extensible system. While it is nice to allow people to do things like
changing "Lisp (programming language)" to "LISP" when restrictions are
lowered, and using things like "NR-N99 /Persuader/-class droid enforcer"
(note the italics) it's even better if we can give Extensons the ability
to tweak the display title that way. Think of cases like a MiniWiki
extension running on a wiki that runs multiple small wiki in it, like
Wikia's Scratchpad wiki. It would be possible for the extension to
modify the title, and perhaps even link in the root of the mini wiki.
For anyone who's taken a look at the old branch, there is one thing to
note. In the old schema the plan was to use a page_title_ui column, but
this time around I'm going for a rev_title_ui column. This, among other
things will allow versioning of that title, but will also make deletion
and undeletion a little cleaner.
As for the current branch, here's a screenshot or two:
http://d.imagehost.org/view/0511/Screenshottitle_Development_Environment_ti…
http://d.imagehost.org/view/0768/Screenshot-All_pages_Development_Environme…
You can notice the title in the first, that is not done with
Displaytitle. And in the latter you can see the difference between
[[Title]] which has a rev_title_ui of "_title_" and [[Displaytitle]]
which uses {{DISPLAYTITLE:_displaytitle_}}.
I didn't pull up any more recent screenshots, but User: pages are now
affecting how a user's username is displayed around the site (including
history and rc pages after a little tweak, and in the skin as well), and
viewing old revisions of pages respects what the ui title was during
that revision.
[1]
http://lists.wikimedia.org/pipermail/wikitech-l/2008-March/thread.html
--
~Daniel Friesen (Dantman, Nadir-Seen-Fire)
~Profile/Portfolio:
http://nadir-seen-fire.com
-The Nadir-Point Group (
http://nadir-point.com)
--It's Wiki-Tools subgroup (
http://wiki-tools.com)
--The ElectronicMe project (
http://electronic-me.org)
-Wikia ACG on
Wikia.com (
http://wikia.com/wiki/Wikia_ACG)
--Animepedia (
http://anime.wikia.com)
--Narutopedia (
http://naruto.wikia.com)