Extension:BaseHooks

The BaseHooks extension inserts strings or files specified at LocalSettings.php before end of body tag. As new hooks will be added in new MediaWiki versions, this extension may be extended to more "insertion points" (hooks).

Installation
WARNING: This works only with  not with. Please patch it to make it compatible with current MediaWiki version. Contact the author porton@narod.ru

Configuration parameters

 * $wgBaseHooksAfterBottomScriptsNamespaceStrings: Hash table with keys being namespace IDs. Every element is an array of strings to be inserted before end of body tag
 * $wgBaseHooksAfterBottomScriptsStrings: An array of strings to be inserted before end of body tag
 * $wgBaseHooksAfterBottomScriptsNamespaceFiles: Hash table with keys being namespace IDs. Every element is an array of file names to be inserted before end of body tag
 * $wgBaseHooksAfterBottomScriptsFiles: An array of file names to be inserted before end of body tag

require_once "$IP/extensions/BaseHooks/BaseHooks.php" $wgBaseHooksAfterBottomScriptsStrings = array("&lt;!-- XYZ test. --&gt;"); $wgBaseHooksAfterBottomScriptsFiles = array("$IP/extensions/BaseHooks/tests/test.inc");

In the current version strings are always inserted before files, but this may change in the future version of this extension.

You can use $wgBaseHooksAfterBottomScriptsNamespaceStrings and/or $wgBaseHooksAfterBottomScriptsNamespaceFiles to override settings for certain namespaces. For example if you set

$wgBaseHooksAfterBottomScriptsNamespaceStrings[NS_PROJECT] = array; $wgBaseHooksAfterBottomScriptsNamespaceFiles[NS_PROJECT] = array;

then nothing will be added to pages of Project: namespace by this module.