<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Learning the World &#187; API</title>
	<atom:link href="http://learningtheworld.eu/tag/api/feed/" rel="self" type="application/rss+xml" />
	<link>http://learningtheworld.eu</link>
	<description></description>
	<lastBuildDate>Tue, 06 Nov 2012 00:17:33 +0000</lastBuildDate>
	<language>en-US</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.9.1</generator>
	<item>
		<title>Amazon Plugin Authorization</title>
		<link>http://learningtheworld.eu/2009/amazon-authorization/</link>
		<comments>http://learningtheworld.eu/2009/amazon-authorization/#comments</comments>
		<pubDate>Fri, 31 Jul 2009 21:00:04 +0000</pubDate>
		<dc:creator><![CDATA[Martin Kliehm]]></dc:creator>
				<category><![CDATA[downloads]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Amazon]]></category>
		<category><![CDATA[Amazon Web Services]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[AWS]]></category>
		<category><![CDATA[machine tags]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[triple tags]]></category>
		<category><![CDATA[XML]]></category>
		<category><![CDATA[XSL]]></category>

		<guid isPermaLink="false">http://learningtheworld.eu/?p=693</guid>
		<description><![CDATA[Starting August 15th, the <acronym title="Amazon Web Services">AWS</acronym> Product Advertising <acronym title="Application Programming Interface">API</acronym>, as the former E-Commerce Service is now called, will only accept signed requests. <strong>The plugin will stop working if you don&#8217;t update.</strong> Thus I needed to re-engineer a few functions of my WordPress Amazon Machine Tags Plugin.&#160;[&#8230;]]]></description>
				<content:encoded><![CDATA[<p class="alert">Oh, it&#8217;s confusing how often Amazon changes it&#8217;s product names and API. In my plugin the Help response group is used for <strong>key validation</strong>, alas <a href="http://docs.amazonwebservices.com/AWSECommerceService/latest/DG/CHAP_WhatsNew.html">recently it&rsquo;s been deprecated</a>. I need more time to look for an alternative. In the meantime you can hack it by adding a file <a href="http://learningtheworld.eu/wp-content/cache/amtap-aws-key-verification.txt"><code>amtap-aws-key-verification.txt</code></a> in the wp-content/cache folder where the content is <code>true</code>.</p>

<p>Starting August 15th, the <acronym title="Amazon Web Services">AWS</acronym> Product Advertising <acronym title="Application Programming Interface">API</acronym>, as the former E-Commerce Service is now called, will only accept signed requests. <strong>The plugin will stop working if you don&rsquo;t update.</strong> Thus I needed to re-engineer a few functions of my <a href="/2007/amazon-machine-tags/">WordPress Amazon Machine Tags Plugin</a>.</p>

<p>What you need to do is:</p>

<ul>
<li><a href="http://wordpress.org/extend/plugins/amazon-machine-tags/">Update to version 3.0</a> of the plugin.</li>
<li>If you didn&rsquo;t adapt any files just overwrite them. If you customized the <acronym title="Cascading Style Sheets">CSS</acronym> or <acronym title="Extensible Stylesheet Language">XSL</acronym> files, take care that you don&rsquo;t overwrite yours. Also the <acronym>XSL</acronym> namespace must reflect the <acronym>API</acronym> version used in the plugin (2009-07-01), i.e. <code>xmlns:aws=<span class="codeSpace">&nbsp;</span>&quot;http://webservices.amazon.com/<span class="codeSpace">&nbsp;</span>AWSECommerceService/<span class="codeSpace">&nbsp;</span>2009-07-01&quot;</code></li>
<li><a href="http://aws-portal.amazon.com/gp/aws/developer/account/index.html?action=access-key">Get your Secret Access Key</a> in addition to your existing Access Key ID. Your future requests will be signed using the secret key.</li>
<li>Go to the plugin&rsquo;s admin interface and <strong>enter the secret key</strong>.</li>
<li>Some people experienced a few minutes where the items didn&rsquo;t show up, instead they got the untransformed <acronym title="Extensible Markup Language">XML</acronym> code. After a few minutes the problem resolved itself. My guess is that Amazon cached the <acronym>XSL</acronym> files, the versions mismatched, therefore the <acronym>XML</acronym> wasn&rsquo;t transformed. That&rsquo;s why I renamed the <acronym>XSL</acronym> files so that the new ones will be used. If you want to be sure, also delete the cached files <code>amtap-aws-items-for-post-*.html</code> in your <code>wp-content/cache</code> directory.</li>
</ul>

<p>If you encounter any problems with the update, re-install the <a href="http://downloads.wordpress.org/plugin/amazon-machine-tags.2.0.zip">old version</a> and let me know what went wrong so that we can fix it together until August 15th.</p>

<p>You can also support the plugin by <strong>translating it</strong>. There&rsquo;s an empty PO file in the package. With a tool such as <a href="http://www.poedit.net/">Poedit</a> it&rsquo;s fairly easy to translate everything. Thanks. <img src="http://learningtheworld.eu/wp-includes/images/smilies/icon_wink.gif" alt=";)" class="wp-smiley" /> </p>
]]></content:encoded>
			<wfw:commentRss>http://learningtheworld.eu/2009/amazon-authorization/feed/</wfw:commentRss>
		<slash:comments>51</slash:comments>
		</item>
		<item>
		<title>Enhanced Keyboard-accessible Google Maps</title>
		<link>http://learningtheworld.eu/2009/keyboard-accessible-google-maps/</link>
		<comments>http://learningtheworld.eu/2009/keyboard-accessible-google-maps/#comments</comments>
		<pubDate>Tue, 28 Apr 2009 19:00:28 +0000</pubDate>
		<dc:creator><![CDATA[Martin Kliehm]]></dc:creator>
				<category><![CDATA[accessibility]]></category>
		<category><![CDATA[downloads]]></category>
		<category><![CDATA[web development]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[Google Maps]]></category>
		<category><![CDATA[hCard]]></category>
		<category><![CDATA[keyboard access]]></category>
		<category><![CDATA[microformats]]></category>
		<category><![CDATA[opera]]></category>
		<category><![CDATA[Patrick H. Lauke]]></category>
		<category><![CDATA[vcard]]></category>

		<guid isPermaLink="false">http://learningtheworld.eu/?p=517</guid>
		<description><![CDATA[<strong>Patrick H. Lauke</strong> wrote an excellent article about <strong>keyboard-accessible Google Maps</strong> on the Opera Developer website. Still I was able to improve it slightly when I implemented an accessible map myself. I would like to share these modifications with you.]]></description>
				<content:encoded><![CDATA[<p><a href="http://twitter.com/patrick_h_lauke">Patrick H. Lauke</a> wrote an excellent article about <a href="http://dev.opera.com/articles/view/keyboard-accessible-google-maps/">keyboard-accessible Google Maps</a> on the Opera Developer website. Still I was able to improve it slightly when I implemented an <a href="http://eafra.eu/2009/venue/">accessible map</a> myself. I would like to share these modifications with you:</p>

<ul>
<li>A <strong>link to Google Maps</strong> when JavaScript is disabled.</li>
<li>Support for the <strong><a href="http://code.google.com/apis/ajax/documentation/">Google <acronym title="Asynchronous JavaScript and XML">AJAX</acronym> <acronym title="Application Programming Interface">API</acronym> Loader</a></strong>.</li><li>Using the <strong>small map control</strong>.</li>
<li>Keyboard accessibility for <strong><em>all</em> control elements</strong> within the map.</li>
</ul>

<p>As a fallback without JavaScript&nbsp;&mdash; because people disable it, because their mobile device doesn&rsquo;t support it, or because it gets filtered by corporate proxies&nbsp;&mdash; Patrick used the little known <a href="http://code.google.com/intl/en-US/apis/maps/documentation/staticmaps/">Google Static Maps <acronym>API</acronym></a>, but for some reason he missed adding the link to Google. Here is the fix:</p>

<ol class="code" title="HTML code">
<li><code>&lt;div id=&quot;map&quot;&gt;</code></li>
<li class="indent"><code><strong>&lt;a href=&quot;http://maps.google.com/maps<span class="codeSpace">&nbsp;</span><span class="nowrap">?f=q&amp;amp;output=html</span><span class="codeSpace">&nbsp;</span><span class="nowrap">&amp;amp;q=50.110950+8.684666&quot;</span> title=&quot;Google Maps&quot;&gt;</strong></code></li>
<li class="double">&lt;img src=&quot;http://maps.google.com/staticmap?hl=en<span class="codeSpace">&nbsp;</span><span class="nowrap">&amp;amp;center=50.112267,8.678384</span><span class="codeSpace">&nbsp;</span><span class="nowrap">&amp;amp;markers=50.110950,8.684666,red</span><span class="codeSpace">&nbsp;</span><span class="nowrap">&amp;amp;zoom=15&amp;amp;size=500&#x78;300</span><span class="codeSpace">&nbsp;</span><span class="nowrap">&amp;amp;key=[Your API Key]&quot;</span> alt=&quot;City map of Frankfurt&quot; width=&quot;500&quot; height=&quot;300&quot; /&gt;</li>
<li class="indent"><code><strong>&lt;/a&gt;</strong></code></li>
<li><code>&lt;/div&gt;</code></li>
</ol>

<div>
<p><a href="http://maps.google.com/maps?f=q&amp;output=html&amp;q=50.110950757575814+8.684666901826859" title="Google Maps" id="maps-static-without-js"><img src="http://maps.google.com/staticmap?hl=de&amp;center=50.112267,8.678384&amp;markers=50.110950757575814,8.684666901826859,red&amp;zoom=15&amp;size=500x300&amp;key=ABQIAAAAiX9IUvugciHL2lvi9eAyFBSMjuiRZEUjgLWr4CdH8vZ2LQfPbhTYj1_FZwtIQquykkDMnYbZpMJHXQ" alt="City Map of Frankfurt" width="510" height="300" /></a></p>
</div>

<p>Then I changed how the map is embedded. As it seems that the <a href="http://code.google.com/apis/ajax/documentation/"><acronym>API</acronym> loader</a> is more current, I preferred that way:</p>

<ol class="code" title="HTML code">
<li><code>&lt;script type=&quot;text/javascript&quot; src=&quot;http://www.google.com/jsapi?key=[Your API Key]&quot;&gt;&lt;/script&gt;</code></li>
<li><code>&lt;script type=&quot;text/javascript&quot; src="/js/accgmap.js&quot;&gt;&lt;/script&gt;</code></li>
<li><code>&lt;script type=&quot;text/javascript&quot;&gt;</code></li>
<li class="indent"><code>google.load( &#x27;maps&#x27;, &#x27;2&#x27;, { &#x27;language&#x27; : &#x27;en&#x27; } );</code></li>
<li class="indent"><code>google.setOnLoadCallback( GMAP.initMap );</code></li>
<li><code>&lt;/script&gt;</code></li>
</ol>

<p>Using the small control elements is trivial: <code>SmallMapControl()</code>. The next thing I wanted to change was <strong>keyboard access to <em>all</em> controls</strong>, in particular for the map type, <abbr title="that is">i.e.</abbr> <code>Map&nbsp;| Satellite&nbsp;| Hybrid</code>. Patrick refers to an <code>id</code>, but I found that all relevant controls have a <code>title</code>, so I just checked for that attribute. I also dropped setting the <code>style</code> attribute in JavaScript as that belongs in the <acronym title="Cascading Style Sheets">CSS</acronym> file. His original function <code>GKeyboardPatch()</code> now looks like this (note the <code>while</code> loop for a slightly better performance):</p>

<ol class="code" title="JavaScript code">
<li><code>GKeyboardPatch: <strong>function</strong>( map ) {</code></li>
<li class="indent"><code>var</code> button, divs = map.getContainer().getElementsByTagName( &#x27;div&#x27; );</li>
<li class="indent"><code>var</code> i = 0;</li>
<li class="indent"><code>while</code> ( divs[i] ) {</li>
<li class="double"><code>if ( divs[i].getAttribute( &#x27;log&#x27; ) || ( <em>divs[i].getAttribute( &#x27;title&#x27; ) &amp;&amp; divs[i].getAttribute( &#x27;title&#x27; ) != &#x27;&#x27;</em> ) ) {</code></li>
<li class="double"><span class="indent">button = document.createElement( &#x27;button&#x27; );</span></li>
<li class="double"><span class="indent">button.setAttribute( &#x27;value&#x27;, divs[i].getAttribute( &#x27;title&#x27; ));</span></li>
<li class="double"><span class="indent">divs[i].appendChild( button );</span></li>
<li class="double"><span class="indent">if ( divs[i].getAttribute( &#x27;log&#x27; )) { <code>// only control buttons</code></span></li>
<li class="double"><code class="double">// override the IE opacity filter that Google annoyingly sets</code></li>
<li class="double"><span class="double">divs[i].style.filter = &#x27;&#x27;;</span></li>
<li class="double"><code class="double">// should really set to &#x27;transparent&#x27;</code></li>
<li class="double"><span class="double">divs[i].style.background = <span class="nowrap">&#x27;url( http://www.google.com/</span><span class="codeSpace">&nbsp;</span>intl/en_ALL/mapfiles/transparent.png )&#x27;;</span></li>
<li class="double"><span class="indent">}</span></li>
<li class="double">}</li>
<li class="double">i++;</li>
<li class="indent">}</li>
<li>}</li>
</ol>

<p>Now remember I said I&rsquo;d rather separate style and behaviour, so here are a some lines of <acronym>CSS</acronym> with the setting of <code>width</code> and <code>height</code> for the <code>#map</code> being most relevant, otherwise it will collapse:</p>

<ol class="code" title="CSS code">
<li><code>#map {</code></li>
<li class="indent">height: 300px;</li>
<li class="indent">overflow: hidden;</li>
<li class="indent">position: relative;</li>
<li class="indent">width: 500px;</li>
<li><code>}</code></li>
<li><code>#maps-static, #maps-static img {</code></li>
<li class="indent">display: block;</li>
<li><code>}</code></li>
<li><code>#map span.note {</code></li>
<li class="indent">display: none;</li>
<li><code>}</code></li>
<li><code>#map button {</code></li>
<li class="indent">background: transparent;</li>
<li class="indent">border-style: solid;</li>
<li class="indent">border-width: 0;</li>
<li class="indent">cursor: pointer;</li>
<li class="indent">height: 100%;</li>
<li class="indent">left: -2px;</li>
<li class="indent">margin: 2px;</li>
<li class="indent">overflow: hidden;</li>
<li class="indent">padding: 2px;</li>
<li class="indent">position: absolute;</li>
<li class="indent">text-indent: -100em;</li>
<li class="indent">top: -2px;</li>
<li class="indent">width: 100%;</li>
<li><code>}</code></li>
<li><code>#map a:focus, #map a:active, #map button:focus, #map button:active {</code></li>
<li class="indent">outline: 2px dashed #61bf1a;</li>
<li><code>}</code></li>
</ol>

<p>And that&rsquo;s it, thanks again to Patrick for the solid foundation I built upon. Now <a href="/examples/js/accgmap.js">download the JavaScript code</a> and try to tab through the map below.</p>

<p>Actually on the other website I extracted <strong>hCard microformats</strong> from the page as well and displayed the addresses on the map, but I was lazy and used jQuery. I thought it doesn&rsquo;t look well here mixed with Patrick&rsquo;s clean <acronym title="Document Object Model">DOM</acronym> scripting, but feel free to <a href="http://eafra.eu/2009/venue/">take it from the original website</a>.</p>

<div id="map">
<p><a href="http://maps.google.com/maps?f=q&amp;output=html&amp;q=50.110950757575814+8.684666901826859" title="Google Maps" id="maps-static"><img src="http://maps.google.com/staticmap?hl=de&amp;center=50.112267,8.678384&amp;markers=50.110950757575814,8.684666901826859,red&amp;zoom=15&amp;size=500x300&amp;key=ABQIAAAAiX9IUvugciHL2lvi9eAyFBSMjuiRZEUjgLWr4CdH8vZ2LQfPbhTYj1_FZwtIQquykkDMnYbZpMJHXQ" alt="City Map of Frankfurt" width="510" height="300" /></a></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://learningtheworld.eu/2009/keyboard-accessible-google-maps/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Crowdsourcing YouTube Video Captioning</title>
		<link>http://learningtheworld.eu/2008/captioning-youtube-with-dfxp/</link>
		<comments>http://learningtheworld.eu/2008/captioning-youtube-with-dfxp/#comments</comments>
		<pubDate>Mon, 31 Mar 2008 20:34:45 +0000</pubDate>
		<dc:creator><![CDATA[Martin Kliehm]]></dc:creator>
				<category><![CDATA[accessibility]]></category>
		<category><![CDATA[W3C]]></category>
		<category><![CDATA[web development]]></category>
		<category><![CDATA[web standards]]></category>
		<category><![CDATA[Adobe]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[captioning]]></category>
		<category><![CDATA[Chris Heilmann]]></category>
		<category><![CDATA[Christian Heilmann]]></category>
		<category><![CDATA[deafness]]></category>
		<category><![CDATA[dfxp]]></category>
		<category><![CDATA[Ed Eliot]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[MAGpie]]></category>
		<category><![CDATA[video]]></category>
		<category><![CDATA[XML]]></category>
		<category><![CDATA[Yahoo! Video]]></category>
		<category><![CDATA[youtube]]></category>

		<guid isPermaLink="false">http://learningtheworld.eu/?p=97</guid>
		<description><![CDATA[When Chris Heilmann had the splendid idea to add <strong>captioning to YouTube videos</strong> with Google&#8217;s JavaScript <acronym title="Application Programming Interface">API</acronym>, I asked myself if there wasn&#8217;t a better way. There is, but to my surprise neither <em>YouTube</em> nor <em>Yahoo! Video</em> take advantage of that capability.&#160;[&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Oh, I just <em>love</em> <a href="http://www.wait-till-i.com/">Christian Heilmann&rsquo;s blog</a>! He&rsquo;s one of the most skilled JavaScript developers I know, so I can still learn tricks from him and his colleagues at Yahoo! But he also <strong>does everything with JavaScript</strong>, and every time when this happens, it inspires me to mull over how it could be done <strong>without</strong>! You know, because restrictive company proxies filter JavaScript, or just to provide a graceful alternative, or because I&rsquo;m so old-fashioned. <img src="http://learningtheworld.eu/wp-includes/images/smilies/icon_wink.gif" alt=";)" class="wp-smiley" /> </p>

<p>So when Chris mentions JavaScript badges for del.icio.us, I think of Ed Eliot&rsquo;s <a href="http://www.ejeliot.com/projects/php-delicious">PhpDelicious</a> or how to get <a href="http://learningtheworld.eu/2008/wordpress-goodies-with-inlinerss/">similar results</a> in WordPress. Naturally when he had the splendid idea to add <strong>captioning to YouTube videos</strong> with <a href="http://www.wait-till-i.com/2008/03/12/video-captioning-made-easy-with-the-youtube-javascript-api/">Google&rsquo;s JavaScript <acronym title="Application Programming Interface">API</acronym></a>, I asked myself if there wasn&rsquo;t a better way. There is, but to my surprise neither <em>YouTube</em> nor <em>Yahoo! Video</em> take advantage of that capability:</p>

<ol><li>It&rsquo;s common practice to implement <strong>text content in Flash via <acronym title="Extensible Markup Language">XML</acronym></strong>.</li>
<li><a href="http://www.w3.org/TR/ttaf1-dfxp/"><strong><acronym title="Distribution Format Exchange Profile">DFXP</acronym></strong></a> is a <acronym title="World Wide Web Consortium">W3C</acronym> <strong><acronym>XML</acronym> standard</strong> for captioning videos.</li>
<li>There are <a href="http://www.adobe.com/accessibility/products/flash/captioning_tools.html">free tools</a> like <a href="http://ncam.wgbh.org/webaccess/magpie/">MAGpie</a> for creating captions, and they all support <strong><acronym>DFXP</acronym></strong>.</li>
<li>If <em>YouTube</em> or <em>Yahoo! Video</em> would allow users to <strong>upload and attach a <acronym>DFXP</acronym> file</strong> to a video, it would become dead easy for anybody to caption it. Not only for the filmmaker, captioning could be <strong>crowdsourced</strong>!</li></ol>

<p>Just anticipating <a href="http://joeclark.org">Joe Clark&rsquo;s</a> inevitable (and justifiable) objection: of course captioning is not an easy thing that anybody can do, to do it right it requires people with special training. But considering the number of videos on those platforms the only affordable and practical solution to provide any captioning at all is crowdsourcing. That can also be applied to the control of quality, accuracy, or reporting abuse.</p>

<p>Of course this would enhance primarily accessibility, but the <acronym>XML</acronym> files would further help search engines to <strong>index video content</strong>. And their marketing people would love such a feature for the positive <acronym>PR</acronym>!</p>

<p>Well, I submitted the suggestion both to Google and Yahoo!, you can <a href="http://suggestions.yahoo.com/detail/?prop=ydn&#038;fid=80528">vote on the Yahoo! Developer Network</a> for it (Google is more closed-lipped). I&rsquo;m curious who will be the first to offer that feature&nbsp;&hellip;</p>
]]></content:encoded>
			<wfw:commentRss>http://learningtheworld.eu/2008/captioning-youtube-with-dfxp/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>Amazon Machine Tags Plugin for WordPress</title>
		<link>http://learningtheworld.eu/2007/amazon-machine-tags/</link>
		<comments>http://learningtheworld.eu/2007/amazon-machine-tags/#comments</comments>
		<pubDate>Sat, 01 Dec 2007 22:51:26 +0000</pubDate>
		<dc:creator><![CDATA[Martin Kliehm]]></dc:creator>
				<category><![CDATA[downloads]]></category>
		<category><![CDATA[web development]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Ajax]]></category>
		<category><![CDATA[Amazon]]></category>
		<category><![CDATA[Amazon Web Services]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[AWS]]></category>
		<category><![CDATA[book:isbn=0596515812]]></category>
		<category><![CDATA[book:isbn=0596529260]]></category>
		<category><![CDATA[ECS]]></category>
		<category><![CDATA[i18n]]></category>
		<category><![CDATA[ip2country]]></category>
		<category><![CDATA[machine tags]]></category>
		<category><![CDATA[microformats]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[POSH]]></category>
		<category><![CDATA[REST]]></category>
		<category><![CDATA[web services]]></category>
		<category><![CDATA[XSLT]]></category>
		<category><![CDATA[yui]]></category>

		<guid isPermaLink="false">http://learningtheworld.eu/2007/amazon-machine-tags/</guid>
		<description><![CDATA[I always wanted to implement one thing since I started the blog: <strong>a simple inclusion of Amazon items</strong>. I didn&#8217;t want to search through results that existing plugins provided. When I wrote about something like a book, I already used machine tags to identify the subject! So I found the inspiration to write my first real WordPress plugin: Amazon Machine Tags.&#160;[&#8230;]]]></description>
				<content:encoded><![CDATA[<p class="alert">The forthcoming <strong>API change</strong> requiring signed requests will effect this plugin. If you do not <a href="http://wordpress.org/extend/plugins/amazon-machine-tags/">update the plugin</a> then it will stop working on August 15th. Comments on this version are closed, please comment on the <a href="/2009/amazon-authorization/">update page</a>.</p>

<h3>In this article</h3>

<ul class="toc">
<li><a href="#intro">Introduction</a></li>
<li><a href="#installation">Installation</a></li>
<li><a href="#faq"><acronym title="Frequently Asked Questions">FAQ</acronym></a></li>
<li><a href="#changelog">Changelog</a></li>
<li><a href="#comments">Discussion</a></li>
</ul>

<h3 id="intro">Introduction</h3>

<p>I always wanted to implement one thing since I started the blog: <strong>a simple inclusion of Amazon items</strong>. I didn&rsquo;t want to search through results that existing plugins provided. When I wrote about something like a book, I already used machine tags to identify the subject! So I found the inspiration to write my first real WordPress plugin: <a href="http://wordpress.org/extend/plugins/amazon-machine-tags/">Amazon Machine Tags</a>.</p>

<p>Here&rsquo;s what it does:</p>

<ol>
<li>It identifies any tag in the <a href="http://en.wikipedia.org/wiki/Machine_tag">machine (or triple) tag</a> form <code>book:<acronym>isbn</acronym>=1234567890</code> or <code>amazon:asin=1234567890</code>. That works with native tags from WordPress 2.3 and later, Bunny&rsquo;s Technorati Tags, Jerome&rsquo;s Keywords, or as inline text (see below).</li>
<li>Then it gets the <strong>item information and a thumbnail image</strong> from the <a href="http://www.amazon.com/gp/browse.html?node=3435361">Amazon Web Services <acronym title="Application Programming Interface">API</acronym></a>. That&rsquo;s the real thing including prices and such, no cheap <acronym>RSS</acronym> feed. <img src="http://learningtheworld.eu/wp-includes/images/smilies/icon_wink.gif" alt=";)" class="wp-smiley" /> </li>
<li><p>The item(s) are displayed in the sidebar or in a blog article with a link to <strong>the visitor&rsquo;s best match</strong> (if the <a href="http://priyadi.net/archives/2005/02/25/wordpress-ip-to-country-plugin/">ip2country plugin</a> is installed) or <strong>a default Amazon shop</strong> of your choice. See examples in the sidebar.</p>
<p>The &ldquo;best match&rdquo; is based on the visitor&rsquo;s location. If she is from one of the six countries where Amazon has shops, that locale is chosen. If he is from Europe, the preferred language is matched to either France, Germany, or <acronym title="United Kingdom">UK</acronym>, with <acronym>UK</acronym> as default. If it&rsquo;s neither a locale nor Europe, amazon.com is the default. Based on your location, do you think that&rsquo;s a reasonable approach?</p>
<p>Note that some items, like books in any language other than English, are only available from certain locales, so a visitor from the <acronym title="United Kingdom">UK</acronym> might not see German books you recommend.</p></li>
<li>If you are an Amazon Associate for that locale, your Associate ID is included automatically.</li>
</ol>

<p>You can edit the server-side, semantic and valid <acronym title="Extensible Hypertext Markup Language">XHTML</acronym> output via <acronym title="Extensible Stylesheet Language Transformation">XSLT</acronym>, change the <acronym title="Cascading Style Sheets">CSS</acronym>, or translate the admin interface through <a href="http://www.poedit.net">.po files</a>. Actually <strong>Amazon loads the <acronym>XSLT</acronym> file from your server</strong> and processes it on theirs, so you shouldn&rsquo;t block <acronym>HTTP</acronym> access to the plugin directory, and <code>localhost</code> doesn&rsquo;t work either.</p>

<p>Results can be <strong>cached</strong> for anything between one second and one hour, so you don&rsquo;t need to worry even when you run an extremely popular blog.</p>

<p>The <a href="http://developer.yahoo.com/yui/connection/">YUI Connection Manager</a> is included to verify the Access Key in the admin interface via <acronym title="Representational State Transfer">REST</acronym> and unobtrusive <acronym title="Asynchronous JavaScript and XML">AJAX</acronym>.</p>

<p>I hope this little piece of software serves you well and you like it.</p>

<h3 id="installation">Installation</h3>

<ol>
<li><a href="http://downloads.wordpress.org/plugin/amazon-machine-tags.zip">Get the latest version</a> of the plugin from the WordPress site.</li>
<li>Upload the whole <code>amazon-machine-tags</code> folder into the <code>/wp-content/plugins/</code> directory.</li>
<li>Activate the plugin through the &ldquo;Plugins&rdquo; menu in WordPress.</li>
<li>Get an Amazon Web Services <a href="http://docs.amazonwebservices.com/AWSECommerceService/2007-06-13/GSG/GettinganAWSAccessKeyID.html">Access Key</a>.</li>
<li>Create a <code>wp-content/cache/</code> directory with permissions set to 755, or 777 if you create the directory as <code>root</code> user.</li>
<li>Put <code>&lt;?php AMTAP::get_items(); ?&gt;</code> in your sidebar and start using machine tags.</li>
<li><a href="#comment-32667">Edit <code>amtap-blog.css</code></a> if you like.</li>
<li>If you want to use tags in a blog article, write <code>&#91;amtap book:isbn=1234567890&#93;</code> or <code>&#91;amtap amazon:asin=1234567890&#93;</code>. Thanks to <a href="http://www.paulinepauline.de">paulinepauline</a> for that idea.</li>
</ol>

<h3 id="faq">Frequently Asked Questions</h3>

<h4>Does it work in the sidebar on Pages, too?</h4>

<p>Posts have tags, pages don&rsquo;t, so it doesn&rsquo;t work on those by default. But there&rsquo;s a plugin called <a href="http://wordpress.org/extend/plugins/tags4page/">tags4page</a> that enables tags for pages. Works like a charm.</p>

<h4>Is there a limit of how many items can be requested?</h4>

<p>Yes, Amazon has a limit of 10 items per request. Since they are separate requests, you can use a maximum of 10 items in the content plus a maximum of 10 in the sidebar.</p>

<h4>Would it be possible to cache the images?</h4>

<p>Technically it wouldn&rsquo;t be a problem, but the <a href="http://www.amazon.com/AWS-License-home-page-Money/b/?node=3440661#5">Amazon Web Services license</a> explicitly forbids caching of images (see 5.1.10). Sorry.</p>

<h4>I need to a larger thumbnail (medium), but can&rsquo;t seem to find a place to edit the size of the image being requested.</h4>

<p>The image size can be edited in the <acronym title="Extensible Stylesheet Language Transformation">XSLT</acronym>. The original result is a <acronym title="Extensible Markup Language">XML</acronym> file that is transformed by Amazon using your local copy of <code>amtap-html-sidebar.xsl</code> and <code>amtap-html-content.xsl</code>, respectively. Replacing every occurance of <code>.//aws:TinyImage</code> with <code>.//aws:MediumImage</code> should do the trick.
</p>

<p>You can view the original <acronym>XML</acronym> when you activate the &ldquo;debug&rdquo; option in the admin interface so that the request string is printed as a comment in the sidebar&rsquo;s source code. <acronym>XSLT</acronym> is a very powerful tool, and there&rsquo;s a lot more in the <acronym>XML</acronym>, for example customer reviews.</p>

<h4>Are all options really required?</h4>

<p>No. The only required field is the Amazon Web Services Access Key. You can leave the others, they are set to defaults then.</p>

<h3 id="changelog">Changelog</h3>

<ul class="changelog">
<li><strong>3.0</strong> <ins datetime="20090731">(2009-07-31)</ins>: Added signed requests for the new Amazon authorization requirement. Updated the API version to 2009-07-01 (please note: if you use your own XSL files, you must update the version in the XML namespace URL). Updated links.</li>
<li><strong>2.0</strong> <ins datetime="20080718">(2008-07-18)</ins>:
<ol>
<li>Added fields for editing the <a href="http://wppluginreview.info/2008/03/09/review-amazon-machine-tags/">sidebar headline</a>, <a href="#comment-33625">link target</a>, and displaying <a href="#comment-33625">rating stars</a>.</li>
<li>Added an error message if the plugin is run from a private IP address space like <a href="#comment-34319"><code>localhost</code></a>.</li>
<li>Changed <a href="#comment-33888">priorities for price</a> selection, they are now: <code>LowestNewPrice</code>, <code>ListPrice</code>, first offer, <code>LowestUsedPrice</code>.</li>
<li>Added support for the display of an <a href="#comment-34426">artist name</a>.</li>
<li>Added <a href="#comment-34412">rating stars</a>.</li>
<li>Fixed <a href="#comment-34224">EAN numbers with a dash</a>.</li>
<li>Fixed cutting of titles after a <a href="#comment-34326">period</a>.</li>
<li>Changed <acronym title="Cascading Style Sheets">CSS</acronym> and <acronym title="Extensible Stylesheet Language">XSL</acronym> files. <strong>Take care when you edited those.</strong></li>  
</ol>
</li>
<li><strong>1.1.3:</strong> Changed <code>amtap-admin.css</code> and <code>amtap-admin.inc.php</code> to make the admin interface look prettier with WordPress 2.5.</li>
<li><strong>1.1.2:</strong> Fixed a <a href="#comment-33367">bug</a> in <code>amtap.php</code> when there are no other tags but default tags.</li>
<li><strong>1.1.1:</strong> <a href="#comment-32967">Fixed</a> the sort order of inline items, a bug for returning an error message when the cache file is not writable, and added Amazon&rsquo;s limit of 10 items per request.</li>
<li><strong>1.1.0:</strong> Fixed the display of inline tags on the home page. Improved regular expression for filtering inline tags.</li>
<li><strong>1.0.6:</strong> Fixed a bug introduced through the new default items function when there were no items to be displayed in the sidebar.</li>
<li><strong>1.0.5:</strong> Added an option for <a href="#comment-32509">default items on every page</a>. Changed <code>amtap-html-sidebar.xsl</code> to sort items in the order of the request.</li>
<li><strong>1.0.4:</strong> Bugfix for replacement of dollar characters in content. Also content items are now cached separately.</li>
<li><strong>1.0.3:</strong> Fixed the <a href="#comment-32268" title="See comment">display of inline tags</a> on category pages.</li>
<li><strong>1.0.2:</strong> Changed the plugin path from <code>amtap</code> to <code>amazon-machine-tags</code> for consistency with the file structure in the zipped file.</li>
<li><strong>1.0.1:</strong> Bugfix for native WordPress tags.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://learningtheworld.eu/2007/amazon-machine-tags/feed/</wfw:commentRss>
		<slash:comments>202</slash:comments>
		</item>
	</channel>
</rss>
