3 * EditSectionHiliteLink extension
8 * This file contains the main include file for the EditSectionHiliteLink extension of
11 * Usage: Add the following line in LocalSettings.php:
12 * require_once( "$IP/extensions/EditSectionHiliteLink/EditSectionHiliteLink.php" );
14 * @author Arash Boostani <aboostani@wikimedia.org>
20 if ( !defined( 'MEDIAWIKI' ) ) {
21 echo( "This is an extension to MediaWiki and cannot be run standalone.\n" );
28 $wgExtensionCredits['other'][] = array(
30 'name' => 'EditSectionHiliteLink',
31 'author' => 'Arash Boostani',
32 'url' => 'http://www.mediawiki.org/wiki/Extension:EditSectionHiliteLink',
33 'description' => 'Hilight the appropriate section of an article when you mouse over the edit link',
34 'description-msg' => 'EditSectionHiliteLink-desc',
37 // Turn on the section container divs in the Parser
38 $wgSectionContainers = true;
40 // Shortcut to this extension directory
41 $dir = dirname( __FILE__
) . '/';
43 # Bump the version number every time you change any of the .css/.js files
44 $wgEditSectionHiliteLinkStyleVersion = 2;
46 $wgAutoloadClasses['EditSectionHiliteLinkHooks'] = $dir . 'EditSectionHiliteLink.hooks.php';
48 // Register edit link interception
49 $wgHooks['DoEditSectionLink'][] = 'EditSectionHiliteLinkHooks::interceptLink';
51 // Register ajax add script hook
52 $wgHooks['AjaxAddScript'][] = 'EditSectionHiliteLinkHooks::addJS';
54 // Register css add script hook
55 $wgHooks['BeforePageDisplay'][] = 'EditSectionHiliteLinkHooks::addCSS';