This page is a translated version of the page Extension:RevisionSlider and the translation is 67% complete.
Outdated translations are marked like this.
MediaWiki扩展手册
RevisionSlider
发行状态: 稳定版
实现 用户界面
描述 添加滑块界面至修订视图以允许更容易地在修订版本之间移动
作者 德国维基媒体协会(WMDE)
兼容性政策 快照跟随MediaWiki发布。 master分支不向后兼容。
MediaWiki 1.25+
数据库更改
许可协议 GNU通用公眾授權條款2.0或更新版本
下載
季度下載量 70 (Ranked 78th)
正在使用的公开wiki数 957 (Ranked 262nd)
前往translatewiki.net翻譯RevisionSlider扩展
問題 开启的任务 · 报告错误

修订滑块(RevisionSlider)扩展添加滑块界面至修订视图,这样您可以更容易地在修订版本间移动。

安裝

  • 下载文件,并将其放置在您extensions/文件夹中的RevisionSlider目录内。
    开发者和代码贡献人员应从Git安装扩展,输入:cd extensions/
    git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/RevisionSlider
  • 将下列代码放置在您的LocalSettings.php 的底部:
    wfLoadExtension( 'RevisionSlider' );
    
  •   完成 – 在您的wiki上导航至Special:Version,以验证已成功安装扩展。

用法

 

在差异页面时,滑块默认被折叠,并只能在页面顶部看见一行称作“浏览历史”的下拉栏。点击该栏以展开修订滑块。

 

一旦展开,修订滑块会取得有关修订版本的数据,并允许您在差异页面上导航并比较修订版本。

 

每个竖条代表页面的修订版本。

上方的竖条显示页面大小的增长,下方的竖条则显示其减小。
在图片中,修订版本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 "外观" → "差异".

技术背景

JavaScript钩

当新的修订被选择时,修订滑块使用AJAX重新加载差异页面。一旦页面被重新加载,wikipage.content和wikipage.diff钩会被剔除。如果用户JavaScript或扩展JavaScript在差异页面起作用,您可能需要监听这些钩。

例子

API调用和取得数据

除非您展开了该工具栏,工具不会进行任何API调用。只有当用户展开了滑块时,它才取得有关修订版本的数据(修订版本id、时间戳、用户、摘要、大小和标记)。工具只取得当前屏幕上可用修订版本的数据(最多500个修订版本),且有关额外修订版本的数据只当用户使用箭头在时间轴上向前或向后导航时才会加载。

背景

修订滑块[1]是实现德语社群愿望单[2]最大愿望之一的功能,并由德国维基媒体协会(WMDE)的TCB团队开发。它受DerHexer的revisionjumper小工具启发,并基于维基媒体基金会社群技术团队原型

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

參考資料