Extension:Cite
The Cite extension allows a user to create references as footnotes on a page.
It adds two parser hooks to MediaWiki, <ref> and <references>; these operate together to add citations to pages.
Usage
See the help page for using the Cite extension for further information.
Installation
- Download and move the extracted
Citefolder to yourextensions/directory.
Developers and code contributors should install the extension from Git instead, using:cd extensions/ git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/Cite
- Add the following code at the bottom of your LocalSettings.php file:
wfLoadExtension( 'Cite' );
- Configure as required.
Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.
Vagrant installation:
- If using Vagrant, install with
vagrant roles enable cite --provision
Configuration
| Name | Description | Default |
|---|---|---|
$wgCiteSubReferencing |
Enables sub-referencing when set to true, see the help page. |
false |
$wgCiteReferencePreviews |
Enables Reference Previews when Extension:Popups is installed and set to true |
true |
$wgCiteReferencePreviewsConflictingRefTooltipsGadgetName |
The local Reference Tooltips gadget name used as its identifier in MediaWiki:Gadgets-definition.
This gadget is incompatible with reference previews. Reference previews will disable themselves for users with the gadget enabled. |
|
$wgCiteResponsiveReferences |
Default setting for responsive display of references.
When set to |
true |
$wgCiteVisualEditorOtherGroup |
When set to true, the Cite toolbar button can be moved under the Insert menu. This is used on Wikivoyage sites. See the original feature request. |
false |
By adding a definition in JSON to MediaWiki:Cite-tool-definition.json, the cite menu can be populated with tools that create references containing specific templates.
The content of the definition should be an array containing a series of objects, one for each tool.
Each object must contain name, icon, template properties.
An optional title property can also be used to define the tool title in plain text.
The name property is a unique identifier for the tool, and also provides a fallback title for the tool by being transformed into a message key.
The name is prefixed with visualeditor-cite-tool-name-, and messages can be defined on Wiki.
Some common messages are pre-defined for tool names such as web, book, news, journal, map.
Example:
[ { "name": "web", "icon": "browser", "template": "Cite web" }, ... ]
Limitations
- The pipe trick and other pre-save transforms do not work within footnotes created with this extension.
See also
| This extension is being used on one or more Wikimedia projects. This probably means that the extension is stable and works well enough to be used by such high-traffic websites. Look for this extension's name in Wikimedia's CommonSettings.php and InitialiseSettings.php configuration files to see where it's installed. A full list of the extensions installed on a particular wiki can be seen on the wiki's Special:Version page. |
