2005-12-21 01:08:25 +00:00
|
|
|
<?php
|
|
|
|
if ( ! defined( 'MEDIAWIKI' ) )
|
2006-01-27 10:14:45 +00:00
|
|
|
die();
|
2005-12-21 01:08:25 +00:00
|
|
|
/**#@+
|
2005-12-25 19:39:22 +00:00
|
|
|
* A parser extension that adds two tags, <ref> and <references> for adding
|
|
|
|
* citations to pages
|
|
|
|
*
|
2007-01-20 15:10:35 +00:00
|
|
|
* @addtogroup Extensions
|
2005-12-21 01:08:25 +00:00
|
|
|
*
|
2009-07-10 13:51:26 +00:00
|
|
|
* @link http://www.mediawiki.org/wiki/Extension:Cite/Cite.php Documentation
|
2005-12-25 19:39:22 +00:00
|
|
|
*
|
2006-01-12 15:14:46 +00:00
|
|
|
* @bug 4579
|
|
|
|
*
|
2005-12-21 01:08:25 +00:00
|
|
|
* @author Ævar Arnfjörð Bjarmason <avarab@gmail.com>
|
|
|
|
* @copyright Copyright © 2005, Ævar Arnfjörð Bjarmason
|
|
|
|
* @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later
|
|
|
|
*/
|
|
|
|
|
2008-06-06 20:38:04 +00:00
|
|
|
if ( defined( 'MW_SUPPORTS_PARSERFIRSTCALLINIT' ) ) {
|
|
|
|
$wgHooks['ParserFirstCallInit'][] = 'wfCite';
|
|
|
|
} else {
|
|
|
|
$wgExtensionFunctions[] = 'wfCite';
|
|
|
|
}
|
|
|
|
|
2005-12-21 01:08:25 +00:00
|
|
|
$wgExtensionCredits['parserhook'][] = array(
|
2009-04-27 03:15:19 +00:00
|
|
|
'path' => __FILE__,
|
2005-12-21 01:08:25 +00:00
|
|
|
'name' => 'Cite',
|
|
|
|
'author' => 'Ævar Arnfjörð Bjarmason',
|
2008-01-31 14:38:12 +00:00
|
|
|
'descriptionmsg' => 'cite_desc',
|
2007-12-16 18:45:23 +00:00
|
|
|
'url' => 'http://www.mediawiki.org/wiki/Extension:Cite/Cite.php'
|
2005-12-21 01:08:25 +00:00
|
|
|
);
|
2008-11-30 03:15:22 +00:00
|
|
|
$wgParserTestFiles[] = dirname( __FILE__ ) . "/citeParserTests.txt";
|
|
|
|
$wgExtensionMessagesFiles['Cite'] = dirname( __FILE__ ) . "/Cite.i18n.php";
|
|
|
|
$wgAutoloadClasses['Cite'] = dirname( __FILE__ ) . "/Cite_body.php";
|
2008-07-12 01:15:55 +00:00
|
|
|
$wgSpecialPageGroups['Cite'] = 'pagetools';
|
2006-01-27 10:14:45 +00:00
|
|
|
|
2008-03-21 15:25:26 +00:00
|
|
|
define( 'CITE_DEFAULT_GROUP', '');
|
|
|
|
/**
|
|
|
|
* The emergency shut-off switch. Override in local settings to disable
|
|
|
|
* groups; or remove all references from this file to enable unconditionally
|
|
|
|
*/
|
|
|
|
$wgAllowCiteGroups = true;
|
|
|
|
|
2009-02-12 18:02:27 +00:00
|
|
|
/**
|
|
|
|
* An emergency optimisation measure for caching cite <references /> output.
|
|
|
|
*/
|
|
|
|
$wgCiteCacheReferences = false;
|
|
|
|
|
2006-07-15 14:00:29 +00:00
|
|
|
function wfCite() {
|
2006-01-07 09:24:48 +00:00
|
|
|
new Cite;
|
2008-06-06 20:38:04 +00:00
|
|
|
return true;
|
2005-12-21 01:08:25 +00:00
|
|
|
}
|
2007-12-16 18:45:23 +00:00
|
|
|
|
|
|
|
/**#@-*/
|
|
|
|
|