Extension:TimeMachine/Design

Abstract and rationale

edit

Frequently enough, MediaWiki developers have to work with an old MediaWiki installation, without the possibility to update. For example, a developer may be working on the wikiHow version of MediaWiki, which is a heavily modified version of MediaWiki 1.12 that can't be updated without completely breaking it. To develop in an old version of MediaWiki, it is of course very useful to be able to access the documentation for that version. Part of the documentation will be in the code itself, but another part is buried in the history of mediawiki.org. One way to access that old documentation is to go to the history tab of a documentation page and go back to when the version for which we are developing was current (for example, for version 1.12, the year 2008). But this is annoying, because it becomes necessary to do the same for every page. The TimeMachine extension solves this inconvenience by creating a special page which allows the user to select a date and then browse the wiki just as it was on that date. Ideally, the extension would be improved so that the user can select a version of MediaWiki (instead of a date), and then see the wiki as it was when that version was current.

Process

edit

Currently, the TimeMachine extension works from Special:TimeMachine (see screenshot below), which contains a form that allows the user to set a date, and a button that allows the user to clear the date and return to the current version of the wiki. When a user enters a date, the date is stored as a cookie, so it only affects that user. Once done, if the user browses the wiki, s/he will see it just as it was on that date. More precisely, whenever the user visits a page, the extension will load the first revision of that page before the date set by the user.

The user may return to browsing the current version of the wiki by simply returning to the special page and pressing the "Return to the present" button, or emptying their cookies manually.

The extension is still on its infancy, and it hasn't been tested much. It may have problems for example when a user opens an inexistent page. Another thing to improve is that currently, when a user visits a page, the extension redirects the user to an old revision of that page, so every request is duplicated. It would be nicer if the extension simply modified the request and showed the old revision, without redirecting.

But the most important improvement to make, if the extension is to be deployed, is allowing the users to select not a date, but a version of MediaWiki, and browse the wiki as it was when that version was current. The mechanism could simply be a drop-down list of all the MediaWiki versions, each with date as a value, so that when selecting a version, the TimeMachine extension would be given a date. For example:

<select name="date">
<option value="10-10-2013" selected="selected">1.21</option>
<option value="28-06-2013">1.20</option>
<option value="14-01-2013">1.19</option>
</select>

This drop-down menu could be included in the Special:TimeMachine page, or even in the sidebar (see screenshot below).

edit