Extension:RevisionSlider

From MediaWiki.org
Jump to: navigation, search

Other languages:
العربية • ‎کوردیی ناوەندی • ‎Deutsch • ‎Ελληνικά • ‎English • ‎español • ‎فارسی • ‎français • ‎galego • ‎עברית • ‎italiano • ‎日本語 • ‎한국어 • ‎Nederlands • ‎polski • ‎português do Brasil • ‎русский • ‎українська • ‎中文
MediaWiki extensions manualManual:Extensions
Crystal Clear action run.png
Extension:RevisionSlider

Release status:Extension status stable

Revisionslider-screenshot-de-popup.png
ImplementationTemplate:Extension#type User interface
DescriptionTemplate:Extension#description Adds a slider interface to the diff view allowing to easily move between revisions
Author(s)Template:Extension#username Wikimedia Germany (WMDE)
Latest versionTemplate:Extension#version 1.0.0 (continuous updates)
MediaWikiTemplate:Extension#mediawiki 1.25+
Database changesTemplate:Extension#needs-updatephp No
LicenseTemplate:Extension#license GNU General Public License 2.0 or later
Download
Hooks usedTemplate:Extension#hook
DiffViewHeaderManual:Hooks/DiffViewHeader

Translate the RevisionSlider extension if it is available at translatewiki.net

Check usage and version matrix.

IssuesPhabricator

Open tasks · Report a bug

The RevisionSlider extension adds a slider interface to the diff view, so that you can easily move between revisions.

Installation[edit]

  • Download and place the file(s) in a directory called RevisionSlider in your extensions/ folder.
  • Add the following code at the bottom of your LocalSettings.php:
    wfLoadExtension( 'RevisionSlider' );
    
  • YesY Done - Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

Usage[edit]

Slide0 collapsed.svg

When on a diff page, the slider is collapsed by default and only a narrow bar labelled "Browse history" is visible at the top of the page. Click on that bar to expand the RevisionSlider.

RevisionSlider Help Step1.svg

Once expanded, the RevisionSlider fetches data about the revisions and allows you to navigate and compare revisions on the diff page.

RevisionSlider Help Step2.svg

Each bar represents a page revision.

Bars on the top show growth in size of the page, bars on the bottom show a reduction.

In the image, revision 1 represents added content, while revision 2 represents removal of content.

RevisionSlider Help Step3.svg

To compare certain revisions, select the revisions using the yellow and blue pointer.

The blue pointer controls the newer revision, the yellow pointer maps to the older revision.

Move the pointers by drag and drop or click on a bar.

RevisionSlider Help Step4.svg

Use the backward and forward arrows to move through revision history and show older and newer revisions.

Opt-out[edit]

If you are not using the RevisionSlider at all and also don't want to see the collapsed RevisionSlider bar at the top of the diff page, you can opt-out by checking Don't show the RevisionSlider in you preferences under Appearance -> Diffs.

Technical Background[edit]

JavaScript Hooks[edit]

The RevisionSlider uses AJAX to reload the diff page when new revisions are selected. Once the page has been reloaded both the wikipage.content and wikipage.diff hooks are fired. If user JavaScript or extension JavaScript acts on the diff page you may need to listen to these hooks.

Examples

API calls & fetching data[edit]

Unless expanded, the tool is not doing any API calls. Only when the user expands the slider, it fetches data about revisions (revision-id, timestamp, user, comment, size and flags). The tool only fetches data for revisions that are currently visible on the screen (maximum 500 revisions) and data about additional revisions is only loaded when the user navigates back or forth on the timeline using the arrows.

Background[edit]

The RevisionSlider[1] is a feature to fulfill one of the top wishes of the German Community wishlist[2] and is developed by WMDE's TCB team. It is inspired by DerHexer's revisionjumper gadget and based on a prototype by the WMF Community Tech team.

Notes (for rather technical audience) on RTL issues discovered while developing the extension have been published on the separate subpage.

References[edit]