:/ oh, now you just poked the coding bone... http://uploads.screenshot-program.com/upl9489088627.png First note, NO there is no {{DISPLAYTITLE:}} inside that page.
Though this is just a partial change. Only some parts are done, and others missing.
Now onto the actual notes: - It may be a compatibility break for some extensions which are doing things they aren't supposed to do and using $title->mTextform instead of $title->getText() because when a title is initialized now with a DB Key the Textform is left as a null string and will be grabbed on the fly in getText when we need it. (Avoids excessive database queries) (Yes there is internal use of getText instead of mTextform to avoid using null titles where they shouldn't be used) - makeTitle now accepts a third optional parameter, the realtitle of a title. This way we can initialize both when we have them and it'll be there for when it's needed. - equals now accepts a second optional parameter similar to the $valid parameter we use in User:: stuff. It defaults to 'key' but if you pass 'real' to it, it'll compare real tittles instead. This is for use in page move interfaces so that we can move titles from say [[Main Page]] to [[Main_Page]]. - I do have the update and table sql and other stuff already in to add the needed page_real field (Hope no-one minds I used an AFTER page_title in the SQL patch to keep reading of the tables clean) - However, it's not yet added for use. The stuff you see in the demo is actually done by doing some mugging of mDbkey to initialize mTextform when getText is called. - I don't have the normalization stuff inside yet. A lot of str_replaces are going to be replaced with the extend able normalization and others removed because they're trying to backconvert where they shouldn't. - Also, as you can see the functions for subpage names and basepage names will need some tweaking to differentiate between the _ and _E forms which should actually use the realtitle and titlekey forms respectively rather than just the textform.
A note on DISPLATITLE: Yes the DISPLAYTITLE is a hack, however it's widely used already. So I won't be dropping support in the rewrite, otherwise current uses will break. I'm going to come up with a maintenance script to populate the page_real fields, and another which will hunt down every page with a DISPLAYTITLE in it, and then move it to a proper title, and if possible try and remove the DISPLAYTITLE from it if the script tells it to. (Though, something like this can never be made to not leave cruft behind, so I'd suggest Wikimedia wiki should do moves by hand rather than trying this automatically. Especially since they use things like {{Lowercase}} rather than hardcoded displaytitles). Because DISPLAYTITLE already exists, rather than marking it as depreciated or to be removed I'll try and make it a little less hacky, and instead turn it into a function meant for extension of title displays into a third type of title only meant for display when viewing the page, not for other interface elements. Note that extension of title displays is means a few things: * Rather than DISPLAYTITLE doing everything, it's actually merely going to call another set of stuff meant for displaytitle stuff (Meaning that extensions can change the displaytitle in the background without needing DISPLAYTITLE everywhere). * The Displaytitle, unlike how it currently is done, will never show up inside of the Pagetitle, the realtitle is what will show up in the pagetitle (So wiki will want to move current titles using DISPLAYTITLE to actual realtitles to have the current stuff inside the title show up). * The purpose of a Displaytitle will not be for minor title things like iPod or _Summer, but will actually be meant for things like Foo #1, Lisp instead of Lisp (Programming language), Foo/Bar/, and Miniwiki or use of MediaWiki in an alternative use where they actually use a special title format and then modify how it looks by perhaps using a directory > like
structure and linking previous portions of the title.
The current implementation does not allow for extensions to extend what a DISPLAYTITLE actually is. I'll make a proof of point extension or two for common use to test it out and satisfy a few people who are complaining about the new restrictions to DISPLAYTITLE.
Oh, off topic but... No-one probably noticed it because it isn't used anywhere inside of the code. But on Line 321 of includes/Title.php the definition for the Title::nameOf function is missing the "public static" that should be there. It's not used, but someone's going to get a big shock when they try and use the function that says it's static but they need an arbitrary instance to use it.
Well on topic... Could Brion or someone the like give me SVN Commit access and create a /branches/titlerewrite for this to be worked on in?
~Daniel Friesen(Dantman) of: -The Gaiapedia (http://gaia.wikia.com) -Wikia ACG on Wikia.com (http://wikia.com/wiki/Wikia_ACG) -and Wiki-Tools.com (http://wiki-tools.com)
David Gerard wrote:
On 02/03/2008, Simetrical Simetrical+wikilist@gmail.com wrote:
But I think this discussion has gotten to the point where it may as well stop, unless someone says they're willing to write the code. Further argument over implementation details is probably not very productive without anyone seriously considering an implementation.
If someone could write this thread up for mediawiki.org, that would be most helpful for others in the future. (When I get silly requests for our work wiki, I look on mediawiki.org first.)
- d.
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l