Розширення:Слайдер версій

From mediawiki.org
This page is a translated version of the page Extension:RevisionSlider and the translation is 50% complete.
Довідка про розширення MediaWiki
RevisionSlider
Статус релізу: стабільний
Реалізація Інтерфейс користувача
Опис Додає інтерфейс-слайдер для перегляду різниць версій, що дозволяє легко рухатись між ними.
Автор(и) Вікімедіа Німеччина (WMDE)
Compatibility policy Snapshots releases along with MediaWiki. Master is not backward compatible.
MediaWiki 1.25+
Зміни в БД No
Ліцензія GNU General Public License 2.0 or later
Завантажити
Quarterly downloads 66 (Ranked 89th)
Public wikis using 957 (Ranked 262nd)
Translate the RevisionSlider extension if it is available at translatewiki.net
Issues Open tasks · Report a bug

Розширення Слайдер версій (RevisionSlider) додає інтерфейс-слайдер до перегляду різниці версій, яке дозволяє Вам легко рухатись між ними.

Встановлення

  • Завантажте і розмістіть файли в каталозі з назвою RevisionSlider у вашій extensions/ папці.
    Developers and code contributors should install the extension from Git instead, using:cd extensions/
    git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/RevisionSlider
  • Додайте такий код унизу вашого LocalSettings.php :
    wfLoadExtension( 'RevisionSlider' );
    
  • Yes Готово – Перейдіть до Special:Version вашої вікі, щоб переконатися, що розширення встановлено успішно.

Використання

На сторінці різниці повзунок згортається за замовчуванням, і вгорі сторінки видно лише вузьку смугу з написом «Історія перегляду». Клацніть на цій панелі, щоб розгорнути RevisionSlider.

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

Кожен прямокутник представляє версію сторінки.
Прямокутники вгорі показують збільшення розміру сторінки, а прямокутники внизу — показують його зменшення.
На зображення версія 1 представляє доданий вміст, тоді як версія 2 представляє вилучення вмісту.

Щоб вибрати версії, які потрібно порівняти, скористайтеся жовтою та синьою вказівками. Блакитний вказівник контролює новішу версію, тоді як жовтий вказівник вказує положення новішої версії.

There are several ways to do this:
  • You can drag and drop the knob to the desired position on the slider.
  • You can click on the desired position on the slider line.
To select the newer revision, click on the blue line, and for selecting the older revision, click on the yellow line. To indicate which revision you're about to select, a preview of a blue or yellow knob appears and the bar turns blue or yellow.
  • You can click into the bar above the middle line (to select the newer revision) or below the line (to select the older revision). This also gives you a preview of the knob on the middle line.

If you move the blue knob to a position left of the yellow knob, the yellow knob is automatically moved along, and vice versa if you move the yellow knob to a position right of the blue knob.

Використовуйте стрілки назад та вперед для пересування по історії та показу старіших та новіших версій.

Opt-out

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 "Не показувати повзунок версії" in your preferences under "Зовнішній вигляд" → "Різниці версій".

Technical Background

JavaScript Hooks

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.

Приклади

API calls & fetching data

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.

Передумови

Слайдер редагувань[1] — це функція, що втілює одне з головних побажань перелічених німецькою спільнотою[2], його розроблено TCB-командою Вікімедіа Німеччина. Джерелом натхнення став додаток користувача DerHexer «revisionjumper», функція базується на прототипі створеному Технічною командою спільноти ФВМ.

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

Примітки