User talk:UC Bill/2009-03-12

Latest comment: 15 years ago by UC Bill in topic Tony at it again

Date Autoformatting

edit

Hi, Could you please give me a link to where I can read up on the syntax for date auto formating? Is this syntax currently recognized by mediawiki?Flaviusvulso (talk) 02:37, 22 January 2009 (UTC)Reply

I'm not sure where a link is describing it, but I can tell you a bit about how it works from my own experience: The way Date Autoformatting (DA) currently works in Mediawiki (on en-wiki at least) is that full dates (with year, month, and day) in most common formats will be automatically broken into a link to the month-day combination and a link to the year and will either be formatted according to the preferences specified by the user (if they're logged-in and have set a preference) or will be left in the same format as they're in in the raw text otherwise. So, some examples:
(Go to Special:Preferences and change your settings under "Date" to see how it changes the above links.)
An important point to note is that you can bypass the autoformatting (but not the linking) by using either a : prefix in the link, or by using a | character in the link. Doing either of those things will force the date to be a regular link, without any autoformatting. Examples:
  • [[:January 1]], [[:2009] will be rendered as January 1, 2009
  • [[2009-01-01|2009-01-01]] will be rendered as 2009-01-01
  • [[1 January|1 January]], [[:2009]] will be rendered as 1 January, 2009
What's being proposed on MOSNUM is that the "normal" syntax (the first set of examples) be modified so that anonymous users or logged-in users with no preference setting see dates in DMY format (example: 1 January, 2009) and without the dates being linked, and that logged-in users who want to specify a format or link preference will still be able to do so. The prefixed or piped links (the second set of examples) will produce linked dates without any autoformatting, just as they do currently.
Let me know if any of that doesn't make sense, and I'll try to explain better. --UC_Bill (talk) 17:32, 22 January 2009 (UTC)Reply
Thank you. That all makes perfect sense and I support the proposal 100%. Flaviusvulso (talk) 22:01, 22 January 2009 (UTC)Reply

The site

edit

The site linked to at WT:MOSNUM is throwing up errors as I write this. Not sure if you changed something, but might want to take a look. =) —Locke Coletc 00:07, 23 January 2009 (UTC)Reply

Thanks for the heads-up. I was trying to add in the magic word code, and broke something. I'll make a duplicate copy of the site for me to work on, since it's now being accessed by other people. --UC_Bill (talk) 00:23, 23 January 2009 (UTC)Reply

Contact?

edit

In re this, where I indicate a wish to contact you separately, it does look like you don't have email enabled here. I'm aware of certain areas where your identity and email are (or were) plain, but I find it distasteful to seek them out.

Rather, could you email me (through an anonymous gmail account, at your discretion) by means of my "Email this user" facility? I'm interested in reviewing your source code for the DA fix, largely for my own interest and maybe helping out with some code suggestions to push it "over the top". Franamax (talk) 06:13, 24 January 2009 (UTC)Reply

Suggestions

edit

Since WT:MOSNUM has degenerated into another shitstorm courtesy of the regulars there, I wanted to highlight something I'd asked you (but you might've missed):

I'm wondering if : prefixed dates shouldn't also be auto formatted. If someone wants to intentionally format a date a certain way they can override that via pipes. For example:
  • [[January 1]], [[2009]] should be unlinked and auto formatted.
  • [[:January 1]], [[2009]] should be linked and auto formatted.
  • [[January 1|January 1]], [[2009]] should be linked and not auto formatted.
  • January 1, 2009 should be unlinked and not auto formatted.
Does this make sense? Basically use a full colon (:) to imply an intentional link with auto formatting, and a date without a colon to imply a date that's not linked but is auto formatted as well. For cases where you want the link and a specific date format you can do it by hand with the pipe.

I think the test site mostly works this way, but in the case of : prefixed dates I don't think it does. —Locke Coletc 06:32, 27 January 2009 (UTC)Reply

Yep, that's precisely what I intended to do next (along with date ranges) and to call the prefixed dates by the term "marked dates" (associated with the "normal linking" preference setting). I think that's what Sapphic meant by "category-style linking" although she ended up recommending "image-style linking" (which is less efficient to match with regular expressions, hence why I'm agreeing with you that the prefixed/marked date syntax is better for this purpose).

Sorry if you feel a bit left out in the cold in your arguments on MOSNUM and elsewhere, but given my past history of losing my temper (even if it was on a different website) I figured it's best for me to stay out of it as much as I can. I trust ArbCom a lot more than I trust most admins, since what I've seen of their past decisions they tend to be reasonable and to actually take the time to investigate thoroughly. Don't worry too much about that new RfC or anything else people might say really, just ignore the stuff that gets under your skin and let's focus on getting a good replacement system ready so it can undergo wider testing and evaluation. (Now if I could just consistently follow that advice myself.. :) --UC_Bill (talk) 16:11, 27 January 2009 (UTC)Reply

Thanks, here's hoping you're right about ArbCom. Back to topic, you should probably require a : ("mark") for each part of the date the person wants linked. I think that's how you're doing it right now, so for example: [[:January 1]], [[2009]] would link just the month/day, but not the year, and the entire date would be auto formatted. If someone wanted to link the year as well they'd need to precede it with a "mark" as well (so [[:January 1]], [[:2009]] to complete the example). And again, I can't say this enough: thanks for your work on this. =) —Locke Coletc 04:31, 28 January 2009 (UTC)Reply

You dork

edit

I can't believe you mentioned agile programming. Sapphic (talk) 02:58, 28 January 2009 (UTC)Reply

Question

edit

Bill, just curious - what would be involved in having DA work without requiring dates to be marked up? Is it far more complex? What about Sapphic's idea to use mark-up on dates we don't want to reformat, instead of the reverse? (I think you discussed this on Bugzilla, but I can't recall the answer.) --Ckatzchatspy 07:05, 28 January 2009 (UTC)Reply

It's not workable, unfortunately. I'll post some examples to the main discussion at MOSNUM. That option has also been vetoed by one of the core developers (Brion Vibber, I think.. I'll check on bugzilla) so it would take a lot of convincing, even if it weren't for the other problems. --UC_Bill (talk) 17:25, 28 January 2009 (UTC)Reply

More DA

edit

Bill, can you modify your software to include the magic word {{DATEFORMAT:NONE}}? Then dates wouldn't be reformatted at all, but linking would be turned off (I think the majority of RFC's asked for that, usually, maybe often ;)

Basically, turn your feature on, but a bot can run through first to turn it off everywhere. Turning it on is up to editorial discretion. Alternatively, if the magic word is not present, do the default action.

The discussion revolving around "I'm right, I hate you and I will never agree to anything you say" has long since swamped rational discussion of intelligent solutions in software. So maybe a graceful opt-out is the next step - that way no-one has to admit they lost anything... Franamax (talk) 06:04, 29 January 2009 (UTC)Reply

And better yet, could I set a switch in my date preferences so that when your recognition regex sees a date, but the reformatting fails (or the general date regex sees an incompatible date), the problematic bit gets a wavy red line put under it (a la MS Word)? That would be good, I would switch on date prefs for the first time ever, because then I could actively spot incompatibilities and try to fix them. Everyone benefits that way. Franamax (talk) 07:27, 29 January 2009 (UTC)Reply

Tony at it again

edit

Tony screwed up your fixes here so I undid his damage. His edit comment was amusing, though.. he obviously can't read because he's of the impression that you've been at UC your whole life or something. Anyway.. you working this weekend? --Sapphic (talk) 16:31, 7 March 2009 (UTC)Reply

FWIW, thanks Sapphic for reverting that not-so-subtle attempt to skew the presentation and be provocative all at the same time. I saw that last night and wasn't too happy about the "slight" rewording. It's unfortunate to see the same battles happening even before the questions can be posed to the community. Franamax (talk) 20:51, 7 March 2009 (UTC)Reply

Sapphic, Sapphic, Sapphic.. you're getting into a LAME edit war with Tony and Greg over my comments on Ryan's userspace page on the RFC? Have some faith that the ArbCom folk know what they're doing; if the proposed RFC language is biased, they won't use that wording. If people insist on messing up the language, let them. Put your stuff in a different section, propose your own version of the RFC or something. Oh wait, you did. Just shut up then, alright? :) --UC_Bill (talk) 18:15, 8 March 2009 (UTC)Reply

Just to be clear on this, I absolutely support the work you've done and think it is the best way forward as far as "Dynamic Dates" (aka: auto formatting) is concerned. I think it's obvious that I'm not, in fact, trying to distance myself from your work or the idea in general at the RFC discussion, but rather being realistic that the MediaWiki devs may choose to do something internal and separate from what you're developing. And a specific discussion on your project would likely be used as fodder should another system ultimately be adopted ("but the community only supported the system by User:Z, not the one put in place by User:X!"). Anyways, just ignore the trolling and baiting and continue refining your system. =) —Locke Coletc 03:59, 10 March 2009 (UTC)Reply
No worries; I'm looking over Werdna's most recent commit at the moment, and if it solves the problems then I'm all for it. I'll continue working on the other version as long as people think it's useful, but it doesn't bother me in the slightest if somebody else's solution is adopted first. Thanks again for all your hard work on this issue.. dealing with the incessant arguing has to be more exhausting than writing the code. :) --UC_Bill (talk) 15:01, 10 March 2009 (UTC)Reply