Extension:BackwardsTimeTravel

What can this extension do?
The extension BackwardsTimeTravel intends to display the old versions of an article exactly as it was at the time of publishing. Indeed, with the standard version of MediaWiki, displaying an old version of a page retrieve only the old wikitext of the page and use the current versions for the templates, use the current time in the variables, and so on.

In the facts, the rendering with this extension is often very very near of the old version, but it can remain on some pages details which is impossible to retrieve (see issues), like the value of the magic word &#123;{NUMBEROFARTICLES}}.

Features
old refers to the time of publishing.
 * Use the old version of the templates (but the templates shouldn't have been moved or deleted, see also issues and parameters).
 * Use the old time.

Issues and roadmap
So the very very very strict equal rendering (HTML version) of an old version can be different, but the differences should be very very very often minimalist...
 * Currently the color of the links can differ (fix me).
 * It is not always possible to retrieve the old version of a template, because with the play of moves and deletions it is possible to mix any version of a page with any other version of another page and put it on a third page... We are sure to find the correct version if there no moves from another page to this template, and if there is no deletion of the template before the old version. An alternative is to alert the user if the version is possibly unlike the old version or if it is impossible to retrieve a version of a template.
 * It is impossible to retrieve the value of some magic words depending of the statistics of the site, like numberofarticles, numberoffiles, numberofedits, numberofusers, numberofactiveusers, numberofpages, numberofadmins, numberofviews and possibly others.
 * It is impossible to retrieve the dynamic transcluded page like the special pages Newpages or Recentchanges, or CategoryTree or DynamicPageList.
 * About the linked JavaScripts and CSS, the current version of this extension doesn't retrieve the old versions of these pages; we should also retrieve the old versions of the linked pages (imported scripts and styles) local to the wiki.
 * It is impossible to retrieve any old version of JavaScript or CSS out of the wiki.
 * At a sysadmin level, any change in the LocalSetting.php can have an influence in the rendering of the pages and introduce a difference in the rendering of old pages, particularly the cancelling of a parser extension; or the updating of MediaWiki and/or extensions (see the next point).
 * At a developer level, any change about the parser can modify the rendering of old pages.

Usage
If the extension is active by default, the simple fact to display an old version in the history displays it 'exactly' as it was. It is possible to inhibit the extension by adding the parameter softoldid in the address bar.

If the extension is not active by default, it is possible to activate it by adding the parameter hardoldid in the address bar.

It is always possible to add the parameter epoch=yyyymmddhhmmss in the address bar to retrieve the rendering of the page as it was at the date dd/mm/yyyy hh:mm:ss, even if it is not the date of a change of the page.

Download instructions
Please cut and paste the code found below and place it in. Note: $IP stands for the root directory of your MediaWiki installation, the same directory that holds LocalSettings.php.

Installation
To install this extension, add the following to LocalSettings.php:

Configuration parameters

 * $wgBackwardsTimeDefault = true : use this extension by default when displaying an old version in the history (see also use). Warning: the systematic use of this extension can increase the load of the server.