Add time elapsed next to last modified timestamp, or js variable (wgCurRevisionTimestamp)
OpenPublic

Description

Author: bugspray7

Description:
Per the referenced Village Pump discussion, please add an approximate "time delta since last modification" field near the existing "last modified" timestamp field at the page footer.

Currently says:
This page was last modified on June 17, 2009 at 22:55.

Want something like:
This page was last modified on June 17, 2009 at 22:55 (about 3 hours ago).


Version: unspecified
Severity: enhancement
URL: http://en.wikipedia.org/wiki/Wikipedia:Village_pump_(proposals)/Archive_48#display_time_since_last_edit_on_article
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=54619

bzimport added a project: MediaWiki-Interface.Via ConduitNov 21 2014, 10:42 PM
bzimport added a subscriber: wikibugs-l.
bzimport set Reference to bz19276.
bzimport created this task.Via LegacyJun 18 2009, 7:05 AM
MZMcBride added a comment.Via ConduitJun 18 2009, 7:10 AM

Changed component from Wikimedia to MediaWiki. This is a software feature request.

bzimport added a comment.Via ConduitJun 18 2009, 9:16 AM

herd wrote:

This would be broken into little pieces by cache, and rather useless I think.

Here is an experimental gadget. It is necessarly a big ugly horrible mash of functions to find what timezone offset the time given was actually in (one can NOT assume it is the same as the browser's): http://en.wikipedia.org/wiki/User:Splarka/lastmod.js

What could be done, is to have <li id="lastmod"> contain a comment like:

<li id="lastmod"> This page was last modified on 18 June 2009 at 00:54. <!--1245316447--> </li>

This then could very easily be parsed as a Unix timestamp by javascript, making the above gadget about 1/10th the size, with no API calls. There would also be no cache issues.

Suggest repurpose the bug for exposing unix time (hidden?) into the <li>.

bzimport added a comment.Via ConduitJun 18 2009, 9:24 AM

bugspray7 wrote:

Sounds good. The VPP discussion suggested JavaScript would likely need to be employed to avoid breaking caching.

bzimport added a comment.Via ConduitJun 20 2009, 10:35 PM

herd wrote:

Okay, it looks like all skins have the "last modified" text. per Skin::lastModified

However, they are not in an object with consistent class or id. It can be <li id="lastmod">, <li id="foot-info-lastmod">, <p>, etc.

Suggest changing the bug to request the function to either:

  1. return $s wrapped in a <span id="lastmodmsg"> (excluding the "wfMsg('laggedslavemode')" <strong> msg) and insert the unix timestamp as a comment: <!--1245316447--> inside the span.
  1. just wrap the comment in a span with unique ID (a bit silly).
  1. just inserting the comment anywhere on the page (probably in the lastmod function, for convenience) but with identifying characteristics, such as a non-translated consistent string: <!--lastmod:1245316447-->.

Any of these would make it easy enough to report a much more accurate time since last edit in javascript, even with cache.

brion added a comment.Via ConduitJun 23 2009, 1:44 AM

If it's going to be included at all, just stick it in the JS vars...

bzimport added a comment.Via ConduitJun 23 2009, 2:32 AM

herd wrote:

If it's going to be included at all, just stick it in the JS vars...

Oh come on, where is the challenge in that ^_^.

wgCurRevisionTimestamp?

Add Comment