[ Index ] |
PHP Cross Reference of MediaWiki-1.24.0 |
[Summary view] [Print] [Text view]
1 <?php 2 if ( ! defined( 'MEDIAWIKI' ) ) 3 die(); 4 /**#@+ 5 * A parser extension that adds two tags, <ref> and <references> for adding 6 * citations to pages 7 * 8 * @file 9 * @ingroup Extensions 10 * 11 * @link http://www.mediawiki.org/wiki/Extension:Cite/Cite.php Documentation 12 * 13 * @bug 4579 14 * 15 * @author Ævar Arnfjörð Bjarmason <[email protected]> 16 * @copyright Copyright © 2005, Ævar Arnfjörð Bjarmason 17 * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later 18 */ 19 20 $wgHooks['ParserFirstCallInit'][] = 'wfCite'; 21 22 $wgExtensionCredits['parserhook'][] = array( 23 'path' => __FILE__, 24 'name' => 'Cite', 25 'author' => array( 26 'Ævar Arnfjörð Bjarmason', 27 'Andrew Garrett', 28 'Brion Vibber', 29 'Marius Hoch', 30 'Steve Sanbeg' 31 ), 32 'descriptionmsg' => 'cite-desc', 33 'url' => 'https://www.mediawiki.org/wiki/Extension:Cite/Cite.php', 34 'license-name' => 'GPLv2', 35 ); 36 37 $wgParserTestFiles[] = __DIR__ . "/citeParserTests.txt"; 38 $wgMessagesDirs['Cite'] = __DIR__ . '/i18n/core'; 39 $wgExtensionMessagesFiles['Cite'] = __DIR__ . "/Cite.i18n.php"; 40 $wgAutoloadClasses['Cite'] = __DIR__ . "/Cite_body.php"; 41 $wgSpecialPageGroups['Cite'] = 'pagetools'; 42 43 define( 'CITE_DEFAULT_GROUP', '' ); 44 /** 45 * The emergency shut-off switch. Override in local settings to disable 46 * groups; or remove all references from this file to enable unconditionally 47 */ 48 $wgAllowCiteGroups = true; 49 50 /** 51 * An emergency optimisation measure for caching cite <references /> output. 52 */ 53 $wgCiteCacheReferences = false; 54 55 /** 56 * Performs the hook registration. 57 * Note that several extensions (and even core!) try to detect if Cite is 58 * installed by looking for wfCite(). 59 * 60 * @param $parser Parser 61 * 62 * @return bool 63 */ 64 function wfCite( $parser ) { 65 return Cite::setHooks( $parser ); 66 } 67 68 // Resources 69 $citeResourceTemplate = array( 70 'localBasePath' => __DIR__ . '/modules', 71 'remoteExtPath' => 'Cite/modules' 72 ); 73 74 $wgResourceModules['ext.cite'] = $citeResourceTemplate + array( 75 'scripts' => 'ext.cite.js', 76 'styles' => 'ext.cite.css', 77 'messages' => array( 78 'cite_references_link_accessibility_label', 79 'cite_references_link_many_accessibility_label', 80 ), 81 ); 82 83 /* Add RTL fix for the cite <sup> elements */ 84 $wgResourceModules['ext.rtlcite'] = $citeResourceTemplate + array( 85 'styles' => 'ext.rtlcite.css', 86 'position' => 'top', 87 ); 88 89 /**#@-*/
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Fri Nov 28 14:03:12 2014 | Cross-referenced by PHPXref 0.7.1 |