Extension:AdManager

From MediaWiki.org
Jump to: navigation, search
MediaWiki extensions manual - list
Crystal Clear action run.png
AdManager

Release status: beta

Implementation Special page, Skin
Description Allows setting an ad zone for individual pages or categories
Author(s) Ike Hecht (tosfostalk)
Latest version 0.2 (September 2012)
MediaWiki 1.17.* or greater
Database changes yes
License GPL
Download See here
Parameters

$wgAdManagerService, $wgAdManagerCode

Added rights

admanager

Hooks used
LoadExtensionSchemaUpdates

SkinBuildSidebar

Translate the AdManager extension if possible

Check usage and version matrix; code metrics

What can this extension do?[edit | edit source]

AdManager is an extension to MediaWiki that allows per-page or per-category placement of ads into a wiki page. It is designed to work with zones from an external advertising server such as OpenX but allows the placement of zones from (probably) any such server. The ads are displayed in the sidebar.

This extension was sponsored by the American Academy of Ophthalmology and was developed by WikiWorks.

Usage[edit | edit source]

Defines two special pages: Special:AdManagerZones and Special:AdManager. Special:AdManagerZones is used to set which zones are available in Special:AdManager. These should be set to the zone number that the advertising server would normally insert into its insertion code. Special:AdManager is used to assign specific pages or categories to ad zones.

Download instructions[edit | edit source]

You can download the Ad Manager code, in .tgz format, here.

You can also download the code directly via Git from the MediaWiki source code repository. From a command line, you can call the following:

git clone https://gerrit.wikimedia.org/r/p/mediawiki/extensions/AdManager.git

To view the code online, including version history for each file, go here.

Installation[edit | edit source]

To install this extension, add the following to LocalSettings.php:

include_once("$IP/extensions/AdManager/AdManager.php");
# Note: One of the lines below must be uncommented and set appropriately.
# $wgAdManagerService = 
# $wgAdManagerCode =

Note: After you've included the extension you must run update.php!.

Configuration parameters[edit | edit source]

  • $wgAdManagerService - This can (currently) be set to 'openx'. If you set this, you do not have to set the $wgAdManagerCode (which will be ignored anyway).
  • $wgAdManagerCode - Use this parameter to use any other advertising service. The code must include '$1' for any spot where the zone number should be inserted.

User rights[edit | edit source]

  • admanager - Permission to use the two special pages to add zones or apply them to a page/category.