Vector
Vanilla5 < Skins > WikiLove (talk | users | test page | RWD? | set as default | unset | validate: HTML, CSS)
Summary: Clone of the Vector skin for MediaWiki (used on Wikipedia since 2010)
Version: 0.9.4 (2023-06-08)
Prerequisites: Post-2009, CSS3 compliant browser
Status: maintained
Maintainer: Said Achmiz
License: GPL
Categories: Skins, WikipediaSuite, HTML5, Mobile, RWD, PHP72
Users: (view / edit)
Discussion: Vector-Talk
Download: vector.zip
Description
Clone of the Vector skin for MediaWiki (used on Wikipedia since 2010). Mobile-friendly.
Based partly on the Monobook skin.
Git repository for this skin: https://git.sr.ht/~achmizs/vector.git.
Screenshots
- Screenshot 1 (Vector skin, example page)
- Screenshot 2 (with SectionEdit and HandyTableOfContents installed)
- Screenshot 3 (custom edit form, with custom GUI buttons)
- Screenshot 4 (custom search form) and Screenshot 5 (custom search results page)
Notes
For a more complete MediaWiki experience, download the following recipes (Vector has been designed with these in mind, and will style their elements appropriately):
- SectionEdit (for section edit links) (see below for configuration instructions)
- Either AutoTOC or HandyTableOfContents (the latter is recommended)
- MediaCategories (for
Category:
markup and the category list block at the bottom of a page) (see below for configuration instructions) - DictIndex (for lists sorted by letter) (highly recommended, if you're also using MediaCategories)
The following recipe is also highly recommended:
- HttpVariables (enables certain additional functionality of the custom search form) (see below for configuration instructions)
Installation
- Unzip vector.zip into your
pub/skins/
folder. - Place
Site.EditForm
,Site.Search
,Site.PageNotFound
,Site.TalkTemplate
,Site.TalkPageHeader
, andSite.PageActions
into yourwiki/wiki.d
folder. - If you're using MediaCategories and DictIndex, place
Category.Category
into yourwiki/wiki.d
folder as well. Note:
Do not create these files yourself, just copy them from the skin folder.
Configuration
Set
in $Skin
= 'vector'config.php
.
Custom GUI edit buttons
If you have GUI edit buttons enabled (
), add the following line to $EnableGUIButtons
= 1config.php
to use Vector's custom GUI edit buttons:
$GUIButtonDirUrlFmt = '$FarmPubDirUrl
/skins/vector/guiedit';
Page logo for mobile view
The mobile view of Vector does not use the standard page logo (as its size and aspect ratio is likely not to be appropriate for the mobile layout). Instead, a new variable, $PageLogoAltUrl
, can be used (in config.php
) to set the URL of the logo to be used in the mobile view. (By default, the value of $PageLogoAltUrl
is the same as of
.)
$PageLogoUrl
SectionEdit
If you're using SectionEdit, add the following to config.php
:
include_once("cookbook/sectionedit.php"); $SectionEditHeaderLinkSpan = 1; $SectionEditLinkText = "";
HandyTableOfContents
If you're using HandyTableOfContents, add the following to config.php
:
include_once("cookbook/handytoc.php"); $HandyTocAnchorAfterElement = false; $HandyTocDefaultTitle = "Contents";
MediaCategories & DictIndex
If you're using MediaCategories and DictIndex, add the following to config.php
:
include_once("cookbook/mediacat.php");
$AutoCreate
['/^Category\./'] = array('ctime' => $Now, 'text' => $page['text']);
include_once("cookbook/titledictindex.php");
AutomaticChangeSummary
Automatic change summaries are enabled by default (they're created if an editor leaves the Summary field blank, or if the Summary field is disabled).
To disable automatic change summaries, add the following to config.php
:
$AutomaticChangeSummaries = 0;
Talk pages
Important: For Talk pages to work, you must have
(in $EnablePathInfo
= 1;config.php
). (This limitation may be removed in a future update.)
By default, Talk pages will be created (if need be) automatically, whenever any page is created or edited.
To disable this behavior (i.e. to create Talk pages only manually), add the following to config.php
:
$AutoCreateTalkPages = false;
When a Talk page is created, it uses a template, specified by $TalkPageTemplate
(which defaults to '
). To change this, add a line such as this to $SiteGroup
.TalkTemplate'config.php
:
$TalkPageTemplate = '$Group.TalkTemplate';
$TalkPageTemplate = 'MyGroup.MyCoolPageTemplate';
$TalkPageTemplate = '';
HttpVariables
If you're using HttpVariables, add the following to config.php
:
include_once("cookbook/httpvariables.php");
$FmtPV
['$HTTPVariablesAvailable'] = true;
Usage
Vector supports the following directives: (:notitle:), (:noheader:), (:nofooter:), (:noleft:)
.
Jump-box feature
The top search form (at the top right of the page) acts as a "jump box". If you enter an exact page name (either Group.PageName
, or just PageName
; in the latter case the script will look in your
for a page by that name), and that page exists, you will be redirected to that page, instead of going to the search results page.
$DefaultGroup
Note: Capitalization matters! The exact name is matched. (This also means that if you want to do a normal search for text which also happens to match the name of a page, simply enter your search query in lowercase or otherwise use different capitalization. This will avoid triggering the "jump box" behavior.)
You can disable the jump-box feature by adding the following line to config.php
:
$VectorJumpBoxEnabled = false;
Talk pages
Vector's "Talk page" feature works much the way it does on e.g. Wikipedia. Any page can have a "Talk page", which has the name of the "article" (i.e. main) page, suffixed with "-Talk". (For example, a page called Flowers.FlowersByBob
would have a talk page called Flowers.FlowersByBob-Talk
.) (Talk pages do not themselves have talk pages, of course.)
{$BaseName}
of talk pages
Note that the {$BaseName}
page text variable is defined, on Talk pages, as the "main" page, i.e. the {$BaseName}
of a page called Flowers.FlowersByBob-Talk
would be Flowers.FlowersByBob
. {{$BaseName}$Name}
would give FlowersByBob
--Naturevault .
Talk pages and pagelists
Page lists, either by default (no list=
parameter) or with list=normal
, omit talk pages. Use list=all
to include talk pages in a page list.
To do
- Add modern MediaWiki-like searchbox
- Partly done; no autocomplete/suggestions drop-down list, though—yet!
- Add "talk page" feature
- Mostly done, some improvements can be made though (e.g. removing the
requirement)$EnablePathInfo
= 1;
- Mostly done, some improvements can be made though (e.g. removing the
Change log / Release notes
- 2023-06-08 — v0.9.4 — Several bugfixes. Updated for PHP 8.1.
- 2017-08-24 — v0.9.3 — Several optimizations and bugfixes.
- 2017-08-24 — v0.9.2 — Several improvements and bug-fixes to the Search function; Backlinks bug fixed.
- 2017-08-22 — v0.9.1 — Slightly improved support for tablets & similarly-sized devices.
- 2017-08-22 — v0.9 — Vector is now responsive & mobile-friendly.
- 2017-08-21 — v0.8.2 — Minor cosmetic fixes.
- 2017-08-20 — v0.8.1 — Minor cosmetic fixes.
- 2017-08-19 — v0.8 — Added "Talk page" feature; various minor fixes.
- 2017-08-17 — v0.7.6 — Various minor fixes.
- 2017-08-17 — v0.7.5 — Fixed critical vulnerabilities (& other bugs).
- 2017-08-17 — v0.7 — Added custom search form and extended search behavior (including jump-box functionality).
- 2017-08-16 — v0.6 — Assorted bug & compatibility fixes.
- 2017-08-15 — v0.5 — Incorporated AutomaticChangeSummary; added custom category list page (
Category.Category
); updated to work with DictIndex. - 2017-08-15 — v0.4 — Updated to work with MediaCategories; modified edit form to show preview first.
- 2017-08-15 — v0.3 — Added custom edit form.
- 2017-08-14 — v0.2 — Updated to work with SectionEdit and AutoTOC or HandyTableOfContents.
- 2017-08-13 — v0.1 — Initial release.
See also
See also Monobook (based on an older MediaWiki default skin). Vector shares several of Monobook’s features.
Contributors
Comments
See discussion at Vector-Talk
User notes : If you use, used or reviewed "Vector", you can add your name. These statistics appear in the Skins listings and will help newcomers browsing through the wiki.