Extension:CiteThisPage

From MediaWiki.org
Jump to: navigation, search
See also the Cite extension, which is unrelated to this, but used to live in the same repo as CiteThisPage.
MediaWiki extensions manual
Crystal Clear action run.png
CiteThisPage

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
Latest version continuous updates
MediaWiki 1.24+
PHP 5.3+
Database changes No
License GNU General Public License 2.0 or later
Download
Hooks used
SkinTemplateBuildNavUrlsNav_urlsAfterPermalink

SkinTemplateToolboxEnd

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

Check usage and version matrix; code metrics

Issues:

Open tasks · Report a bug

The CiteThisPage extension, previously known as SpecialCite.php, is an extension that creates a special page (Special:CiteThisPage) and toolbox link to it for pages in the main namespace. Given an article name, this extension generates citations to it in a variety of styles.

Installation[edit | edit source]

This extension is bundled with MediaWiki 1.25 and above. Thus you do not have to download it again.

vagrant>Vagrant</>, install with <tvar

  • <translate>

1>download-link</> and place the file(s) in a directory called <tvar|name>CiteThisPage</> in your <tvar|ext>extensions/</> folder.</translate>

  • <translate>

Add the following code at the bottom of your LocalSettings.php:</translate>

wfLoadExtension( 'CiteThisPage' );
  • YesYDone - <translate>

Navigate to <tvar|special>Special:Version</> on your wiki to verify that the extension is successfully installed.</translate>

<translate> To users running MediaWiki 1.24 or earlier:

Those instructions describe the new way of installing extensions since MediaWiki 1.25.</translate> <translate> If you need to install this extension in earlier versions, instead of <tvar

Configuration[edit | edit source]

Example[edit | edit source]

English Wikipedia:

en:Special:CiteThisPage/Train provides citation info about the article en:Train, in the format specified by the local English MediaWiki file en:MediaWiki:Citethispage-content

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:Citethispage-content), 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

Variables[edit | edit source]

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>{{CURRENTTIME}}</citation>.