Jump to content

扩展:跨wiki排序

From mediawiki.org
This page is a translated version of the page Extension:InterwikiSorting and the translation is 23% complete.
MediaWiki扩展手册
InterwikiSorting
发行状态: 稳定版
实现 用户界面
作者 Wikimedia Germany (WMDE)
最新版本 持续更新
兼容性政策 快照跟随MediaWiki发布。 master分支不向后兼容。
MediaWiki 1.27+
PHP 7.4+
数据库更改
许可协议 GNU通用公眾授權條款2.0或更新版本
下載

  • $wgInterwikiSortingSort
  • $wgInterwikiSortingSortPrepend
  • $wgInterwikiSortingInterwikiSortOrders
前往translatewiki.net翻譯InterwikiSorting扩展
問題 开启的任务 · 报告错误

The InterwikiSorting extension allows for sorting of interwiki links.

The code was originally created in 2012 as part of the Wikibase Client extension, and has been factored out.

Within the Wikimedia Foundation this extension is being used alongside the Cognate extension and Wikibase .

Installation

  • 下载文件,并解压InterwikiSorting文件夹到extensions/目录中。
    开发者和代码贡献人员应改从Git安装此扩展,输入:
    cd extensions/
    git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/InterwikiSorting
    
  • 請新增下列代码到您的LocalSettings.php 文件的底部:
    wfLoadExtension( 'InterwikiSorting' );
    
  • 按需求配置
  • Yes 完成 – 請导航至您的wiki上的Special:Version,以验证此扩展已成功安装。

Configuration

$wgInterwikiSortingSort
The default sort order to use. 'code' is built in and orders alphabetically by interwiki code.
Example sort orders are currently stored in WMF configuration and can be seen at Phabricator
These can be seen used in noc.wikimedia.org under wgInterwikiSortingSort
$wgInterwikiSortingSortPrepend
Codes that should appear at the start of the list of interwiki links.
$wgInterwikiSortingInterwikiSortOrders
Definition of sort orders. Each sort order key should be the sort order name, for example 'alphabetical'. Each key should have a value of an array of interwiki codes in the order to be sorted.