Extension:AmazonPlus

What can this extension do?
This extension allows one to display data from the Amazon XML feed onto their pages. While it is a tag extension, it fully supports template parameters (e.g. ) and other wiki markup, the former being parsed before the query is executed and the latter after custom parameter substitution is completed.

Custom parameters (in the %parameter% format) are substituted with appropriate data from the XML feed. The currently available list of these parameters is relatively small and is geared mainly towards getting information for books. In future versions, more media will be supported.

Caveats

 * The definition of $wgAllowExternalImages is temporarily overridden and set to true so that the hotlinked images from Amazon display. It is set back to its original value after the tag finishes parsing
 * If the SpamBlacklist extension is installed, you must add the following to your MediaWiki:Spam-whitelist page so that the amazon urls work:

Usage
This extension is invoked using the  tag, like so:  (wiki markup with custom parameters)

Passed parameters
These parameters are passed into the tag itself, such as.

Custom parameters
These parameters may be placed anywhere between the opening and closing amazon tags. They will be replaced with the appropriate data from the query according to the chart below. Please note that all images are hotlinked from Amazon.

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

Requirements

 * 1) MediaWiki version 1.11 or above is required to use this extension. Remember that the current trunk version will always maintain backwards-compatibility, so never download a branched version of this extension.
 * 2) You will need to get an AWS Id from here
 * 3) You will need at the very least to get an Amazon Associates ID for the US locale from here. Edit the URL to sign up for other locales (such as changing it from .com to .ca or .co.uk to sign up for the ca and gb locales).
 * 4) The allow_url_fopen directive must either be enabled in your php.ini file, or MediaWiki must be allowed to use the ini_set function.
 * 5) The SimpleXML extension must be enabled in your php.ini file. It is enabled by default, so as long as php was not configured with the --disable-simplexml option, you should be fine
 * 6) MediaWiki should be allowed to use the set_time_limit function. While this isn't necessary, PHP may time out if you are performing many queries.

Configuration parameters
These are the default values, along with a description:

System messages
The following system messages are defined by this extension: