wet_amazonassoc is a plugin for Textpattern designed to create all the necessary markup to link to a single Amazon merchandise designated by its ASIN. Both the <a> tag and the Ad Impression tracking <img> tag are created.
Usage
<txp:wet_amazonassoc asin="0123456789" associd="myassocid" tld="com" class="aClass"> anchortext </txp:wet_amazonassoc>
Required attributes
| attribute | description |
|---|---|
| asin | Amazon Standard Identification Number |
Optional attributes
| attribute | description |
|---|---|
| associd | Your Amazon Associate ID. Defaults to “notslippethou-21”. |
| tld | Top level domain of the local amazon site you are associated with (e. g. “com”, “co.uk”, “at”). Defaults to “de”. The plugin was tested with “amazon.com”, “amazon.de”, and “amazon.at” |
| class | CSS class which will be applied to the <a> tag. Defaults to “wet_amazonassoc”. |
Sample usage
This markup
<txp:wet_amazonassoc asin="B0007KX4TC" tld="com" associd="notslippethou-20"> DRM(Digital Restrictions Management) Device </txp:wet_amazonassoc>
and that styling
<style>
a.wet_amazonassoc {
background-image: url(/style/amazon-icon.gif);
background-repeat: no-repeat;
background-position: right center;
padding-right: 14px;
}
</style>
will produce this output:
Licence and Disclaimer
This plugin is released under the Gnu General Public Licence. Use at own risk. Share your revenues.
Download
Get it here: wet_amazonassoc.txt.
Resources and Relateds
Express your suggestions, report bugs and discuss enhancements in this thread in the Textpattern forum.
Change log
| Date | Version | Notes |
|---|---|---|
| 2005-08-13 | 0.1 | First public release |
| 2006-06-11 | 0.2 | Fix small HTML validation error |
| 2006-09-29 | 0.3 | Redirect via HTTP status 302 (Temporarily Moved), thus avoid donating free link love to Amazon and gain a tracking server log entry for every associate link click through |
