Extension:Vector

From MediaWiki.org
Jump to: navigation, search
This extension is bundled with MediaWiki 1.18 and above and replaced by core functionality included in MW 1.22 and thus obsoleted.
MediaWiki extensions manual
Crystal Clear action run.png
Vector

Release status: stable

Implementation MyWiki, Skin
Description Improves on the user interface elements of the Vector skin
Author(s) Trevor Parscal, Roan Kattouw
Latest version 0.3.0
MediaWiki 1.16.x-1.21.x
Database changes No
License GPL v2
Download
README
Example test.wikipedia.org
Parameters
  • $wgVectorFeatures
  • $wgCollapsibleNavBucketTest
  • $wgCollapsibleNavForceNewVersion
  • $wgVectorSectionEditLinksBucketTest
  • $wgVectorSectionEditLinksLotteryOdds
  • $wgVectorSectionEditLinksExperiment
Hooks used
BeforePageDisplay

GetPreferences
ResourceLoaderGetConfigVars
MakeGlobalVariablesScript

Translate the Vector extension if it is available at translatewiki.net

Check usage and version matrix; code metrics
Bugs: list open list all report

The Vector extension adds a few enhancements to the Vector skin. Note that these features are only available in Vector, not in other skins.


MediaWiki version: 1.21

Installation[edit | edit source]

  • Download and extract the file(s) in a directory called Vector in your extensions/ folder. If you're a developer and this extension is in a Git repository, then instead you should clone the repository.
  • Add the following code at the bottom of your LocalSettings.php:
require_once "$IP/extensions/Vector/Vector.php";
  • Done! Navigate to "Special:Version" on your wiki to verify that the extension is successfully installed.

Features[edit | edit source]

EditWarning[edit | edit source]

The EditWarning feature warns the editor when they leave the edit form without saving. This feature has been integrated in MediaWiki core as of MediaWiki 1.22.

Enabled by adding:

$wgDefaultUserOptions['useeditwarning'] = 1;

Set false to disable EditWarning globally.

$wgVectorFeatures['editwarning']['global'] = false;

Allow users to enable EditWarning in their preferences.

$wgVectorFeatures['editwarning']['user'] = true;

CollapsibleTabs[edit | edit source]

Collapse the navigation tabs on top when space is tight.

Enabled by default. Set false to disable CollapsibleTabs globally.

$wgVectorFeatures['collapsibletabs']['global'] = false;

Allow users to enable CollapsibleTabs in their preferences.

$wgVectorFeatures['collapsibletabs']['user'] = true;

CollapsibleNav[edit | edit source]

Make the sections in the left navigation collapsible/expandable.

Enabled by default. Set false to disable CollapsibleNav globally.

$wgVectorFeatures['collapsiblenav']['global'] = false;

Allow users to enable CollapsibleNav in their preferences.

$wgVectorFeatures['collapsiblenav']['user'] = true;

FooterCleanup[edit | edit source]

  • Makes the "View templates on this page" and "View hidden categories on this page" lists collapsible and collapsed by default.
  • Also, if WikiEditor is loaded, removes the .editHelp (link to MediaWiki:Edithelppage with label MediaWiki:Edithelp) element and the "|" from after the cancel link.
  • Various additional CSS adjustments.

Disabled by default. Set true to enable FooterCleanup globally.

$wgVectorFeatures['footercleanup']['global'] = true;

Allow users to enable FooterCleanup in their preferences.

$wgVectorFeatures['footercleanup']['user'] = true;

ExpandableSearch[edit | edit source]

Expands the Search box when focused.

Disabled by default. Set true to enable ExpandableSearch globally.

$wgVectorFeatures['expandablesearch']['global'] = true;

Allow users to enable ExpandableSearch in their preferences.

$wgVectorFeatures['expandablesearch']['user'] = true;

SectionEditLinks[edit | edit source]

Moves section edit links over to be next to the heading text and add an icon to them. Also includes bucket-testing and click-tracking functionality for evaluating the impact of this feature. More information about the design behind this feature here.

Disabled by default. Set true to enable SectionEditLinks globally.

$wgVectorFeatures['sectioneditlinks']['global'] = true;

Allow users to enable SectionEditLinks in their preferences.

$wgVectorFeatures['sectioneditlinks']['user'] = true;

SimpleSearch[edit | edit source]

Improve the look and feel of the search box. The Vector skin has a basic version of simple search, which must be enabled to take advantage of the enhanced version, by adding the following to LocalSettings.php.

$wgVectorUseSimpleSearch = true;
Language: English  • español • français • русский