From mediawiki.org
Jump to navigation Jump to search
This page is a translated version of the page Skin:Vector and the translation is 57% complete.
Outdated translations are marked like this.
Other languages:
Bahasa Indonesia • ‎Deutsch • ‎English • ‎Tagalog • ‎Tiếng Việt • ‎Türkçe • ‎español • ‎français • ‎italiano • ‎magyar • ‎português • ‎português do Brasil • ‎suomi • ‎svenska • ‎беларуская (тарашкевіца)‎ • ‎български • ‎русский • ‎українська • ‎سنڌي • ‎فارسی • ‎বাংলা • ‎中文 • ‎日本語 • ‎한국어
此佈景主題已绑定在MediaWiki 1.17及以上版本。 因此您不必再次下載它。 然而,您仍需要跟随提供的其他指示。
MediaWiki佈景主題手冊 - 分類
Crystal Clear device blockdevice.png
發行狀態: 穩定版
Composer mediawiki/vector-skin
許可協議 GNU通用公眾授權條款2.0或更新版本
例子 https://en.wikipedia.org/
問題 : 進行中的工作 · 回報錯誤


In recent years the skin underwent a number of changes, e.g. the switch to Mustache and the addition of new features. The latter are controlable by feature switches so that users can still be served to legacy layout.

In 2021, as part of the MediaWiki 1.36 release it will see an update as part of the work done by the Reading/Web/Desktop Improvements initiative.


  • 下载文件,并将其放置在您skins/文件夹中的Vector目录内。
  • 将下列代码放置在您的LocalSettings.php的底部:
wfLoadSkin( 'Vector' );
  • Yes 完成 - 在您的wiki上打开Special:Version,以确认佈景主題已成功安装。

致使用MediaWiki 1.24或更早版本的用户:

上面的说明介绍的是自MediaWiki 1.25以来,使用wfLoadSkin()安装皮肤的新方法。 如果您需要在早期版本中安装此皮肤,您需要使用这样的代码(而不是 wfLoadSkin( 'Vector' );):

require_once "$IP/skins/Vector/Vector.php";



應為新的wiki使用者設定預設皮膚。方法是將皮膚檔案LocalSettings.php中的變數$wgDefaultSkin 設定為指定的皮膚名稱(小寫):

$wgDefaultSkin = 'vector';
// uncomment the following line to restore "classic" Vector appearance.
// $wgVectorDefaultSkinVersion = '1';




Restore the default “legacy” Vector look or use the modern Vector work being created as part of Reading/Web/Desktop Improvements.

wgVectorDefaultSkinVersion = '1';


Watch and unwatch as an icon rather than a link.

  • Supported Values:
    • true — 使用图标搜索按钮
    • false — 使用监视/取消监视文本链接
$wgVectorUseIconWatch = true;



*实验设置:使向量皮肤响应稍微快一些。 还没有在生产环境中进行测试或使用,但默认情况下相对稳定并且默认为false。

  • Supported Values:
    • trueUse responsiveness to improve usability in narrow viewports
    • falseNo responsiveness

Note in the 1.36 release, the meaning of this flag has changed and apply to only the newest iteration of Vector, and will require the following configuration:

$wgVectorResponsive = true;
$wgVectorDefaultSkinVersion = '2';

wgVectorPrintLogo (< 1.36, removed in 1.36)


Logo used in print styles. Keys are 'url', 'width', 'height' (in pixels). Note that this solution only works correctly if the image pointed to by 'url' is an SVG that does not specify width and height attributes, or its width and height match the corresponding variables below. Alternatively, a PNG or other type of image can be used, but its dimensions also need to match the corresponding variable below. That in turn may result in blurry images, though.

In 1.36, please use Manual:$wgLogos

$wgVectorPrintLogo = [
	'url' => 'https://en.wikipedia.org/static/images/mobile/copyright/wikipedia-wordmark-en.svg',
	'width' => 174,
	'height' => 27


  • 减少混乱(主要是通过减少屏幕上的行数)
  • 搜索框的位置更加突出
  • Visual separation of the content-action and namespace links, the former of which being divided into view tabs and action menu items
  • 根据浏览器大小自动增加/减少整个用户界面的页边距
  • 使用星型图标查看和取消查看操作
添加了Vector 扩展的特性(其中一些特性后来被合并到Vector皮肤或MediaWiki内核中,或已被删除)
  • 简化搜索框,包括建议
  • 可折叠的导航门户
  • 在不保存编辑页面时发出警告
  • 自动隐藏屏幕上不适合的选项卡
  • 简化页脚内容
  • Search box expands on focus
  • 部分编辑链接被移动到标题旁边而不是右侧,并使用图标
通过扩展:CollapsibleVector 扩展支持CollapsibleNav


On updating to 1.36


In MediaWiki 1.36 the appearance of Vector will be modernized in line with 阅读/网页/桌面版改进 . To opt out of these changes please add the following to your LocalSettings.php:

$wgVectorDefaultSkinVersion = '1';

Collapsible navigation

可折叠导航门户现在由扩展:CollapsibleVector 扩展提供,该扩展必须另外安装。

Experimental smartphone and tablet design

Vector will work on many mobile devices, but it is not fully optimized for mobile devices. As we approach the 1.36 release, Vector has been optimized to work with most tablets and an experimental mobile mode is available. In the upcoming 1.36 users will be able to enable a responsive mode using the following configuration:

$wgVectorResponsive = true;
$wgVectorDefaultSkinVersion = '2';

Vector currently has a poor implementation of responsive web design, in which the #right-navigation buttons might overlap the #left-navigation buttons due to width shortage, with no fallback icons like on Skin:Monobook , Skin:MinervaNeue and 皮肤:Timeless viewed on narrow displays.

In addition, the left side bar navigation links inside #mw-panel, as well as the top links inside #p-personal, move to the bottom of the page on narrow displays, beneath the content area, requiring the user to scroll to the bottom before being able to access it.

History of the skin

Vector became default skin in 2010 (MediaWiki 1.17 , git #2833b07a), succeeding MonoBook. 它于2009年创建,是Wikipedia Usability Initiative 所做工作的一部分。 In 2021, as part of the MediaWiki 1.36 release it will see an update as part of the work done by the Reading/Web/Desktop Improvements initiative.

向量相較於前一版的預設佈景主題,在可用性方面有了許多改進。 它是第一個將 flat level content_actions 推進到 categorized content_navigation 的佈景主題。

一開始,基本功能包含在核心佈景主題中,而向量的一些特殊功能則由一個單獨的擴充套件(Extension:Vector )處理。 此后,此扩展被合并至皮肤中。

Dark mode customizations

Many solutions relying on MediaWiki:Common.css exist to support a dark version of the skin, including Skin:Vector/DarkCSS and Skin:Vector/Wikipedia-userstyle-dark-minimum. An alternative skin to Vector exists that allows you to install as a separate skin at Skin:DarkVector.

Note all of these are supported by third parties, not the Wikimedia Foundation.