Extension:Cite/Special:Cite.php
From MediaWiki.org
SpecialCite.php is a Cite extension that adds a special page (Special:Cite) and in the main namespace, a toolbox link to it.
Contents |
[edit] Synopsis
- Special:Cite/Article
- Special:Cite&page=Article&id=int
[edit] Description
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>.
[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] Installation
- Download the files from SVN and place them to extensions/Cite
- Add
to LocalSettings.php (changing the folder if necessary).
require_once('extensions/Cite/SpecialCite.php');
- Also, you must 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.
- You also need to download extensions/ExtensionFunctions.php, because Special:Cite needs
extAddSpecialPage().
- The extension should be now active.
Note: Cite.php requires hooks in the main MediaWiki code found in HEAD as of 2005-11-27 08:16:59Z It might operate on earlier versions of MediaWiki, but it won't be operating properly.
This extension is being used on one or more of Wikimedia's wikis. It means that the extension is stable and works well enough to be used by such high traffic websites. A full list of the extensions installed on a particular wiki is produced by Special:Version on that wiki.

