Extension:Cite/Special:Cite.php
Cite Release status: stable |
||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Implementation | Special page | |||||||||||||||||||||||||||||||
Description | Adds a special page that provides different citation formats for a particular article. | |||||||||||||||||||||||||||||||
Author(s) | Ævar Arnfjörð Bjarmasontalk | |||||||||||||||||||||||||||||||
MediaWiki | 1.6+ | |||||||||||||||||||||||||||||||
License | GPL | |||||||||||||||||||||||||||||||
Download | ||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||
Check usage and version matrix |
SpecialCite.php is a Cite extension that creates a special page (Special:Cite) and in the main namespace, a toolbox link to it.
Contents |
[edit] Synopsis
- Special:Cite/Pagename
- Special:Cite&page=Pagename&id=number
[edit] Example
English Wikipedia:
en:Special:Cite/Train provides citation info about the article en:Train, in the format specified by the local English MediaWiki file en:MediaWiki:Cite text
[edit] Download
You can download the extension directly from the MediaWiki source code repository (browse code). You can get:
- One of the extensions tags
Not all extensions have tags. Some extensions have tags for each release, in which case those tags have the same stability as the release. To download a tag
- Go to the tags list
- Click the name of the tag you want to download
- Click "snapshot"
- The latest version of one of the extensions branches
Each extension has a master branch containing the latest code (might be unstable). Extensions can have further branches as well.
- Go to the branches list
- Click the branch name
- Click "snapshot"
- A snapshot made during the release of a MediaWiki version.
This might be unstable and is not guaranteed to work with the associated MediaWiki version.
After you've got the code, save it into the extensions/Cite directory of your wiki.
If you are familiar with git and have shell access to your server, you can obtain the extension, with all its tags and branches, as follows:
cd extensions
git clone https://gerrit.wikimedia.org/r/p/mediawiki/extensions/Cite.git
[edit] Installation
- Add
require_once("$IP/extensions/Cite/SpecialCite.php");
-
- If you are using older distributions, you may have to provide a file called cite_text and place it in the same folder as SpecialCite.php. The cite_text file used by Wikipedia can be found here. If you are using a subversion checkout of Cite, it already contains this file. Alternatively, it may be necessary to copy/paste the text from cite_text into the wiki page MediaWiki:Cite_text.
- For older distributions you also need to download extensions/ExtensionFunctions.php, because Special:Cite needs
extAddSpecialPage()
. Addrequire_once("$IP/extensions/ExtensionFunctions.php");
-
- The extension should be now active.
[edit] Description
![]() |
Some or all of the information on this page is inconsistent, irrelevant or confusing. Please help clean it up if you are able. |
Cite is a special page extension that adds a special page Special:Cite, see w:en:Special:Cite. Here a pagename can be filled in, or one can directly use
- Special:Cite/pagename
Each normal page (current version only) has a sidebar link to that special page, in addition to the link "permanent link".
The citing style it uses is customizable from the MediaWiki namespace (MediaWiki:Cite_text), for instance:
* ''{{FULLPAGENAME}}'' (last modified {{CURRENTTIME}}, {{CURRENTDAY}} {{CURRENTMONTHNAME}} {{CURRENTYEAR}} UTC). {{SITENAME}}, {{int:sitesubtitle}}. Retrieved <citation>{{CURRENTTIME}}, {{CURRENTDAY}} {{CURRENTMONTHNAME}} {{CURRENTYEAR}}</citation> from {{fullurl:{{FULLPAGENAME}}|oldid={{REVISIONID}}}}
Might produce:
- Main Page (last modified 02:47, 26 November 2005 UTC). Wikipedia, The Free Encyclopedia. Retrieved 21:14, 26 November 2005 from http://en.wikipedia.org/w/index.php?title=Main_Page&oldid=10403
[edit] Variables
The parser variables e.g. {{CURRENTTIME}}, {{CURRENTMONTH}} etc. will display the time of the last edit to the requested page, to get the current time use <citation>, e.g. <citation>{{CURRENTMONTH}}</citation>.
![]() |
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. |