I recently tried to create a small javascript to parse user signature times
on talk pages [1]. With it the readers would have been able to see the
signature's timestamp in their preferred timezone (and as a side effect it
would be consistent with the revision history) without breaking caching.
The main problem I had was that MediaWiki didn't provide a class attribute
wrapping the date nor the whole signature. There is a bug report on that
topic:
https://bugzilla.wikimedia.org/show_bug.cgi?id=25141
After some time spent looking for a system message it seems the only
solution is to edit includes/parser/Parser.php. I added a span with a class
at this line:
https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/core.git;a=blob;f=include…
It works fine (at least in my own - limited - case).
Some questions related to what I've done:
- Would it be possible to wrap dates, or at least signatures in a class, as
suggested in bug #25141? it may be useful for others too
-- or perhaps to have a system message for dates (I'm not sure it's a good
idea)
- Is Parser.php the good place for that?
- Would a similar solution see its way into MediaWiki some day? or are
there problems I'm not seeing? (I'm not suggesting my script would be it,
it's a quick and dirty hack created with very limited knowledge.)
[1] using Moment.js <http://momentjs.com/>