Last modified: 2013-09-26 02:50:43 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T21276, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 19276 - Add time elapsed next to last modified timestamp, or js variable (wgCurRevisionTimestamp)
Add time elapsed next to last modified timestamp, or js variable (wgCurRevisi...
Status: NEW
Product: MediaWiki
Classification: Unclassified
Interface (Other open bugs)
unspecified
All All
: Low enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
http://en.wikipedia.org/wiki/Wikipedi...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-06-18 07:05 UTC by Cybercobra
Modified: 2013-09-26 02:50 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Cybercobra 2009-06-18 07:05:12 UTC
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).
Comment 1 MZMcBride 2009-06-18 07:10:38 UTC
Changed component from Wikimedia to MediaWiki. This is a software feature request.
Comment 2 Splarka 2009-06-18 09:16:44 UTC
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>.
Comment 3 Cybercobra 2009-06-18 09:24:32 UTC
Sounds good. The VPP discussion suggested JavaScript would likely need to be employed to avoid breaking caching.
Comment 4 Splarka 2009-06-20 22:35:42 UTC
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.

2) just wrap the comment in a span with unique ID (a bit silly).

3) 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.



Comment 5 Brion Vibber 2009-06-23 01:44:36 UTC
If it's going to be included at all, just stick it in the JS vars...
Comment 6 Splarka 2009-06-23 02:32:44 UTC
> 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?

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links