As a quick hack on http://test.leuksman.com/ I've added a little notice that displays at the top of the page if it's been recently modified, reminding the user to check the edit history to see what's changed.
The color of the box and the approximate age gradually gets duller after about 10 minutes, 30 minutes, and 60 minutes, then finally disappears.
I believe this idea has been bounced around previously but I hadn't seen it implemented yet. Not sure if we want it, but something like this might be good: it can remind new visitors that things can change quickly, and not to worry quite so much about vandalism they may see.
The actual text is ugly and poorly formatted, but hey, it's a demo hack. ;)
There are two parts: SkinTemplate.php is modified to export a JavaScript variable containing the last modified date as a machine-readable Unix timestamp. Then a function in MediaWiki:Monobook.js can check the age and poke a message into the web page.
The advantage of using JavaScript for this is that the HTML output doesn't change as it ages, so it wouldn't require fancy cache expiration footwork. The disadvantage is that client-side clocks may be off, so there's a bit of a fudge factor. Also a small percentage of visitors will have JS off and won't see it, but it would be nonessential so that's not a big deal.
-- brion vibber (brion @ pobox.com)
"Brion Vibber" brion@pobox.com wrote in message news:43BBF8B0.5040604@pobox.com...
As a quick hack on http://test.leuksman.com/ I've added a little notice that displays at the top of the page if it's been recently modified, reminding the user to check the edit history to see what's changed. The color of the box and the approximate age gradually gets duller after about 10 minutes, 30 minutes, and 60 minutes, then finally disappears.
I'm getting the notice, but no coloured box.
Am I doing something wrong?
On 04/01/06, Phil Boswell phil.boswell@gmail.com wrote:
I'm getting the notice, but no coloured box.
Am I doing something wrong?
CSS problem, perhaps? What browser are you using?
Works for me (using http://test.leuksman.com/view/C as test page) on Mozilla, Firefox, Konqueror, and Opera, but I'm running Linux right now, so can't test IE.
Meanwhile, I think this is a rather good idea. The only danger is that the absence of such a notice might be interpretted as meaning a page is stable when in fact it's just being ignored, but I'm not sure people would become accustomed enough to the notice to make that assumption.
-- Rowan Collins BSc [IMSoP]
"Rowan Collins" rowan.collins@gmail.com wrote in message news:9f02ca4c0601040951j31645825q@mail.gmail.com...
On 04/01/06, Phil Boswell phil.boswell@gmail.com wrote:
I'm getting the notice, but no coloured box. Am I doing something wrong?
CSS problem, perhaps? What browser are you using?
IE6 on WXP-pro (SP2)
I have freshed and re-freshed my cache until it squeaks...not certain what more I can do :-(
Phil Boswell wrote:
I'm getting the notice, but no coloured box. Am I doing something wrong?
CSS problem, perhaps? What browser are you using?
IE6 on WXP-pro (SP2)
I have freshed and re-freshed my cache until it squeaks...not certain what more I can do :-(
Seems to be a bug in IE; you can't set a DOM node's class attribute with setAttribute(). :P
Should be working now (clear cache or whatever to make sure the JS updates).
-- brion vibber (brion @ pobox.com)
"Brion Vibber" brion@pobox.com wrote in message news:43BD1F00.5080600@pobox.com...
Phil Boswell wrote:
I'm getting the notice, but no coloured box. Am I doing something wrong?
CSS problem, perhaps? What browser are you using?
IE6 on WXP-pro (SP2) I have freshed and re-freshed my cache until it squeaks...not certain what more I can do :-(
Seems to be a bug in IE; you can't set a DOM node's class attribute with setAttribute(). :P Should be working now (clear cache or whatever to make sure the JS updates).
Lovely. Now to wait a bit and see how the aging process looks...cheers again!
wikitech-l@lists.wikimedia.org