读者手册
探索维基百科
如何访问维基百科
搜索维基百科
下载内容
链入页面
随机条目
阅读生物信息框
用户帐号
如何登录
参数设置
用户样式
电邮联系
引用维基百科的内容
简明著作权信息
引用维基百科
跟踪修改
最近更改
相关更改
监视列表
页面历史
不同修订版本之间的差异
用户贡献页面
.mw-parser-output .hlist ul,.mw-parser-output .hlist ol{padding-left:0}.mw-parser-output .hlist li,.mw-parser-output .hlist dd,.mw-parser-output .hlist dt{margin:0;display:inline}.mw-parser-output .hlist dt:after,.mw-parser-output .hlist dd:after,.mw-parser-output .hlist li:after{white-space:normal}.mw-parser-output .hlist dt:after{content:" :"}.mw-parser-output .hlist dd:after,.mw-parser-output .hlist li:after{content:" · ";font-weight:bold}.mw-parser-output .hlist-pipe dd:after,.mw-parser-output .hlist-pipe li:after{content:" | ";font-weight:normal}.mw-parser-output .hlist-hyphen dd:after,.mw-parser-output .hlist-hyphen li:after{content:" - ";font-weight:normal}.mw-parser-output .hlist-comma dd:after,.mw-parser-output .hlist-comma li:after{content:"、";font-weight:normal}.mw-parser-output .hlist dd:last-child:after,.mw-parser-output .hlist dt:last-child:after,.mw-parser-output .hlist li:last-child:after{content:none}.mw-parser-output .hlist ol{counter-reset:listitem}.mw-parser-output .hlist ol>li{counter-increment:listitem}.mw-parser-output .hlist ol>li:before{content:" "counter(listitem)" ";white-space:nowrap}.mw-parser-output .hlist dd ol>li:first-child:before,.mw-parser-output .hlist dt ol>li:first-child:before,.mw-parser-output .hlist li ol>li:first-child:before{content:" ("counter(listitem)" "}.mw-parser-output .hlist ol{counter-reset:listitem}.mw-parser-output .hlist ol>li{counter-increment:listitem}.mw-parser-output .hlist ol>li:before{content:" "counter(listitem)"\a0 "}.mw-parser-output .hlist dd ol>li:first-child:before,.mw-parser-output .hlist dt ol>li:first-child:before,.mw-parser-output .hlist li ol>li:first-child:before{content:" ("counter(listitem)"\a0 "}.mw-parser-output ul.cslist,.mw-parser-output ul.sslist{margin:0;padding:0;display:inline-block;list-style:none}.mw-parser-output .cslist li,.mw-parser-output .sslist li{margin:0;display:inline-block}.mw-parser-output .cslist li:after{content:","}.mw-parser-output .sslist li:after{content:";"}.mw-parser-output .cslist li:last-child:after,.mw-parser-output .sslist li:last-child:after{content:none}.mw-parser-output .navbar{display:inline;font-weight:normal;font-size:88%}.mw-parser-output .navbar-collapse{float:left;text-align:left}.mw-parser-output .navbar-boxtext{word-spacing:0}.mw-parser-output .navbar ul{display:inline-block;white-space:nowrap;line-height:inherit}.mw-parser-output .navbar-brackets::before{margin-right:-0.125em;content:"[ "}.mw-parser-output .navbar-brackets::after{margin-left:-0.125em;content:" ]"}.mw-parser-output .navbar li{word-spacing:-0.125em}.mw-parser-output .navbar a>span,.mw-parser-output .navbar a>abbr{text-decoration:inherit}.mw-parser-output .navbar-mini abbr{font-variant:small-caps;border-bottom:none;text-decoration:none;cursor:inherit;color:inherit!important}.mw-parser-output .navbar-ct-full{font-size:114%;margin:0 7em}.mw-parser-output .navbar-ct-mini{font-size:114%;margin:0 4em}
查论编 在维基百科中可以比较一篇文章的两个不同修订版本之间的差异。它可以在页面历史中点击“当前”或“先前”后看到或者在最近更改中使用。此外,在编辑冲突时也会出现。
在页面的两侧会显示两个版本的内容。老版本在左侧以黄色显示,而新版本在右侧以绿色显示。被删除的内容会在老版本中以红色显示。每行上会显示出两个版本之间的差异。另外,框架上方的“第X行”可以帮助粗略地定位修订在全部代码中的位置。
在两个不同版本的上部会显示修订的时间,以及到该用户页以及用户对话页的链接。而且还有一个到用户贡献页的链接。对于管理员,在新版本一侧会显示一个回退链接,可以直接恢复到早期的版本。
另外,也会在用户名的下面显示两个版本的编辑摘要。
范例
以下例子展示了差异页顶部所显示的信息(部分链接被替换成相关帮助页面)。旧版本在左侧,新版本在右侧。
在2003年8月3日 (日) 22:32所做的修订版本 (编辑)
Tim Starling (讨论 | 贡献)
← 上一版本
|
在2003年8月3日 (日) 00:10所做的修订版本 (编辑)(撤销)(感谢)
Angela (讨论 | 贡献) [回退]
小
下一版本 →
|
第8行:
|
第8行:
|
|
管理员有一个[[WP:回退|回退]]按钮,那按钮的用途是让管理员可以从一个页面的新版本回退到旧版本。
|
|
管理员有一个[[WP:回退|回退]]按钮,那按钮的用途是让管理员可以从一个页面的新版本回退到旧版本。
|
|
|
|
|
-
|
This is only shown when viewing the diff between the current version and the one immediately preceding it.
|
+
|
This is only shown when viewing the diff between the recent version of a page and the last version by an author other than the one of the most current version.
|
|
This example shows the top of the diff page, with links the described above.
|
|
This example shows the top of the diff page, with links the described above.
|
第25行:
|
第25行:
|
|
</table>
|
|
</table>
|
|
|
+
|
[[MediaWiki User's Guide]]
|
|
|
+
|
|
完整版本
差异表格之下会显示被比较版本中最近的完整版本,可以在参数设置中设置显示与否。
版本差异链接
如果您需要生成某一版本差异比较的链接(比如用在讨论页或通告版上),最好是使用[[Special:Diff/oldid
]](oldid为旧版本号)方式或是((Diff)),这样链接可以跨协议使用(http://
及https://
)并兼容移动设备。也可以通过页面历史查找到需要的版本差异,打开差异页面,复制浏览器中的网址。您可以将网址(完整网址,包含http://)粘贴到希望显示链接的页面,前后使用单个方括号[...]。
外部链接
版本差异的网址是基于旧版本的oldid
值。如果某一版本的oldid值为1234567,那么网址即为:
http://zh.wikipedia.org/w/index.php?title=页面名&oldid=1234567
你可以将网址中title=页面名&
部分省略,写成如下形式:
http://zh.wikipedia.org/w/index.php?oldid=1234567
差异版本的网址可以使用如下形式:
- 同当前版本的差异:
http://zh.wikipedia.org/w/index.php?diff=cur&oldid=1234567
- 同前一版本的差异:
http://zh.wikipedia.org/w/index.php?diff=prev&oldid=1234567
- 同版本1000000的差异(不需要是同一页面):
http://zh.wikipedia.org/w/index.php?diff=1000000&oldid=1234567
- 如果只希望显示差异,而不希望显示页面内容,在上方任意链接中加入
&diffonly=1
参数:
http://zh.wikipedia.org/w/index.php?diff=cur&oldid=1234567&diffonly=1
同前一版本进行版本差异比较还有如下简略写法:
http://zh.wikipedia.org/wiki/?diff=1234567
内部链接
尽管外部链接方便复制粘贴,但是它们太长、效率低。版本差异可以使用维基内链形式,使用[[Special:Diff/diff
]](例如Special:Diff/1234567)或者[[Special:Diff/oldid
/diff
]](例如Special:Diff/1000000/1000017),只需将oldid
和diff
参数修改为网址中看到的对应参数。diff
参数所对应的版本号应当比oldid
数字大。这一语法十分易用,还可以被用在编辑摘要中。
((Diff))
另一种在维基百科站内链接版本差异的方式是使用((diff))模板,但是这样就不能在编辑摘要中使用了。基本语法如下:
((Diff|page|diff|oldid|label))
|page=
– 页面标题名。
|diff=
– 页面版本号或者关键词。可能的关键词有:
- cur – 同某一页面当前(最新)版本比较。
- prev – 同某一页面的前一个版本比较。
- next – 同某一页面的下一个版本比较。
- id – 这一版本号应当比oldid数字大。
|oldid=
– 生成版本差异的基础页面版本号。
|label=
– 外部链接上显示的文字。如果缺省则会显示带编号的链接。
|diffonly=yes
– 仅显示版本差异,不显示页面内容。必须带参数名。