Extension:PCR GUI Inserts

PCR GUI Inserts, as its names suggests, lets you easily insert anything around the GUI. The idea to program this extension came from the observation that adding a simple thing to the GUI, like a stat-tracking script or a donation button, although easy in theory is still quite tedious: you need to either: This second option has its limitations: first, you end up with quite a lot of tiny extensions, and second, sometimes there isn't the extension you need to add one specific element. For example, what if you wanted to insert Adbard ads? As far as I know, no extension seems to be able to do that at the moment. That's where PCR GUI Inserts is useful: it handles the hooks, and only the hooks, and you handle the HTML code, all the HTML code. Thus there is no limit to what you can add within the supported areas.
 * manually edit the skin (all your activated skins, every time you upgrade MediaWiki - that's what I used to do)
 * install one extension for every GUI element you want to add. Thus there is the Piwik extension, the Google Analytics extension, the Google Adsense extension (and even another one), the donation button extension, etc.

Installation

 * 1. Create a new folder in your  folder.
 * 2. Download the source code archive and extract it in this new folder.
 * 3. Add the following code at the end of LocalSettings.php:
 * (replace, of course, with the proper path!)
 * (replace, of course, with the proper path!)

Configuration
By default, the extension won't output anything. You can edit the following settings in LocalSettings.php (add them after the line which includes the extension):

$wgPCRguii_Inserts['addHeadItem']
Used to add things at the end of the area. So, useful mainly for meta-tags or if you want to add a script at the top (for statistics usually you'll rather want to keep them at the bottom for faster content loading):
 * $wgPCRguii_Inserts['addHeadItem']['on']: boolean, whether or not to enable this feature (default: false)
 * $wgPCRguii_Inserts['addHeadItem']['content']: an array of things you want to insert there, for instance:

$wgPCRguii_Inserts['BeforePageDisplay']
Used to add things just at the end of a page, i.e. at the bottom but still within the content frame.
 * $wgPCRguii_Inserts['BeforePageDisplay']['on']: boolean, whether or not to enable this feature (default: false)
 * $wgPCRguii_Inserts['BeforePageDisplay']['content']: a string of things you want to insert there, for instance:

$wgPCRguii_Inserts['SkinAfterBottomScripts']
Used to add things just at the very bottom of a page, i.e. below the footer including the "Powered by MediaWiki" button. That's usually the place where you'll want to add tracking scripts.
 * $wgPCRguii_Inserts['SkinAfterBottomScripts']['on']: boolean, whether or not to enable this feature (default: false)
 * $wgPCRguii_Inserts['SkinAfterBottomScripts']['content']: a string of things you want to insert there, for instance (example Google Analytics and Quantcast tracking):

$wgPCRguii_Inserts['SkinBuildSidebar']
Used to add things at the end of the side bar. That's usually the place where you'll want to add vertical ads or a donation button.
 * $wgPCRguii_Inserts['SkinBuildSidebar']['on']: boolean, whether or not to enable this feature (default: false)
 * $wgPCRguii_Inserts['SkinBuildSidebar']['content']: an array of things (as arrays, too) you want to insert there, for instance:

Adding a Piwik statistics code at the bottom
(example for Piwik 0.9 - 0.9.9)

Who's using it?
(Please add your URL to the bottom of the list.)
 * Wiki4Games.com, the video game wiki