OpenWetWare:Software/Extensions/Cite

From OpenWetWare

< OpenWetWare:Software | Extensions
Revision as of 18:58, 17 November 2007 by Bill Flanagan (Talk | contribs)
(diff) ←Older revision | Current revision (diff) | Newer revision→ (diff)
Jump to: navigation, search

SpecialCite.php is a Cite extension that adds a special page (Special:Cite) and in the main namespace, a toolbox link to it.

Contents

Synopsis

  • Special:Cite/Article
  • Special:Cite&page=Article&id=int

Description

Template:Cleanup

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

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>.

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

Installation

To add SpecialCite.php to a mediawiki installation, add it to the extensions folder and add the line

require_once('extensions/Cite/SpecialCite.php');

to your LocalSettings.php (changing the folder if necessary). 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().

External link

Personal tools