Title: Amazon Machine Tags
Author: Martin Kliehm
Published: <strong>27 Tháng 11, 2007</strong>
Last modified: 28 Tháng 1, 2010

---

Tìm kiếm plugin

Plugin này **chưa được cập nhật với 3 phiên bản mới nhất của WordPress**. Nó có 
thể không được hỗ trợ và bảo trì, và có thể xung đột với các phiên bản WordPress
mới nhất.

![](https://s.w.org/plugins/geopattern-icon/amazon-machine-tags.svg)

# Amazon Machine Tags

 Bởi [Martin Kliehm](https://profiles.wordpress.org/kliehm/)

[Tải về](https://downloads.wordpress.org/plugin/amazon-machine-tags.3.0.2.zip)

 * [Chi tiết](https://vi.wordpress.org/plugins/amazon-machine-tags/#description)
 * [Đánh giá](https://vi.wordpress.org/plugins/amazon-machine-tags/#reviews)
 *  [Cài đặt](https://vi.wordpress.org/plugins/amazon-machine-tags/#installation)
 * [Nhà phát triển](https://vi.wordpress.org/plugins/amazon-machine-tags/#developers)

 [Hỗ trợ](https://wordpress.org/support/plugin/amazon-machine-tags/)

## Mô tả

Simple inclusion of Amazon items through machine tags.

 1. Identifies any tag in the [machine or triple tag](http://en.wikipedia.org/wiki/Machine_tag#Triple_tags)
    form `book:isbn=1234567890` or `amazon:asin=1234567890`. Works with native tags
    from WordPress 2.3 and later, Bunny’s Technorati Tags, and Jerome’s Keywords.
 2. Gets the item information and a thumbnail image from the **Amazon Web Services 
    API**.
 3. Displays the item(s) in the sidebar or in a blog article with a link to the visitor’s
    best match (if the [ip2country](http://priyadi.net/archives/2005/02/25/wordpress-ip-to-country-plugin/)
    plugin is installed) or a default Amazon shop of your choice.
 4. If you are an Amazon Associate for that locale, your Associate ID is included automatically.

You can edit the server-side, semantic and valid XHTML output via XSLT, change the
CSS, or translate the admin interface through PO-files.

## Ảnh màn hình

 * [[
 * Admin interface
 * [[
 * The plugin in a sidebar

## Cài đặt

 1. Upload the whole `amazon-machine-tags` folder into the `wp-content/plugins/` directory.
 2. Activate the plugin through the ‘Plugins’ menu in WordPress. Make sure that you
    don’t run it on `localhost` as XML files on the server need to be reached from 
    the outside.
 3. Get your own Amazon Web Services [Access Key Identifyers](http://aws-portal.amazon.com/gp/aws/developer/account/index.html?action=access-key).
 4. Create a `wp-content/cache/` directory with permissions set to 755, or 777 if you
    create the directory as `root` user.
 5. Put `<?php AMTAP::get_items(); ?>` in your sidebar and start using machine tags.
 6. Edit `amtap-blog.css` if you like.
 7. If you want to use tags in a blog article, write `[amtap book:isbn=1234567890]`
    or `[amtap amazon:asin=1234567890]`.

## Hỏi đáp

  Does it work in the sidebar on Pages, too?

Posts have tags, pages don’t, so it doesn’t work on those by default. But there’s
a plugin called [tags4page](https://wordpress.org/extend/plugins/tags4page/) that
enables tags for pages. Works like a charm.

  Is there a limit of how many items can be requested?

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.

  Would it be possible to cache the images?

Technically it wouldn’t be a problem, but the [Amazon Product Advertising API license](https://affiliate-program.amazon.com/gp/advertising/api/detail/agreement.html)
explicitly forbids caching of images (see 5.1.10). Sorry.

  I need to a larger thumbnail (medium), but can’t seem to find a place to edit 
the size of the image being requested.

The image size can be edited in the XSLT. The original result is a XML file that
is transformed by Amazon using your local copy of `amtap-html-sidebar.xsl` and `
amtap-html-content.xsl`, respectively. Replacing every occurance of `.//aws:TinyImage`
with `.//aws:MediumImage` in lines 73-83 should do the trick.

You can view the original XML when you activate the “debug” option in the admin 
interface so that the request string is printed as a comment in the sidebar’s source
code. XSLT is a very powerful tool, and there’s a lot more in the XML, for example
customer reviews.

  Getting an error about “private IP address space”?

The error message means you are running the blog on something like `localhost`. 
Amazon Web Services needs to get an XML file from your server, obviously that is
impossible when it’s not located on a server that can be accessed with a public 
IP address from the outside.

  Are all options really required?

No. The only required fields are the Amazon Web Services Access Key ID and your 
Secret Access Key. You can leave the others, they are set to defaults then.

## Đánh giá

Không có đánh giá nào cho plugin này.

## Người đóng góp & Lập trình viên

“Amazon Machine Tags” là mã nguồn mở. Những người sau đã đóng góp vào plugin này.

Những người đóng góp

 *   [ Martin Kliehm ](https://profiles.wordpress.org/kliehm/)

[Dịch “Amazon Machine Tags” sang ngôn ngữ của bạn.](https://translate.wordpress.org/projects/wp-plugins/amazon-machine-tags)

### Muốn tham gia phát triển?

[Duyệt code](https://plugins.trac.wordpress.org/browser/amazon-machine-tags/), check
out [SVN repository](https://plugins.svn.wordpress.org/amazon-machine-tags/), hoặc
theo dõi [nhật ký phát triển](https://plugins.trac.wordpress.org/log/amazon-machine-tags/)
qua [RSS](https://plugins.trac.wordpress.org/log/amazon-machine-tags/?limit=100&mode=stop_on_copy&format=rss).

## Nhật ký thay đổi

 * 3.0.2: Bugfix in SHA256 calculation.
 * 3.0.1: Fixed a bug in setting the timestamp that caused the key validation to
   fail. The included SHA256 encryption now has a GNU Lesser GPL.
 * 3.0: 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.
 * 2.0: Added fields for editing the sidebar headline, link target, and displaying
   rating stars. Added an error message if the plugin is run from a private IP address
   space. Changed priorities for price selection, they are now: `LowestNewPrice`,`
   ListPrice`, first offer, `LowestUsedPrice`. Added support for the display of 
   an artist name. Added rating stars. Fixed EAN numbers with a dash. Fixed cutting
   of titles after a period. Changed CSS and XSL files.
 * 1.1.3: Changed `amtap-admin.css` and `amtap-admin.inc.php` to make the admin 
   interface look prettier with WordPress 2.5.
 * 1.1.2: Fixed a bug in `amtap.php` when there are no other tags but default tags.
 * 1.1.1: Fixed the sort order of inline items, a bug for returning an error message
   when the cache file is not writable, and added Amazon’s limit of 10 items per
   request.
 * 1.1.0: Fixed the display of inline tags on the home page. Improved regular expression
   for filtering inline tags.
 * 1.0.6: Fixed a bug introduced through the new function when there were no items
   to be displayed in the sidebar.
 * 1.0.5: Added an option for default items on every page. Changed `amtap-html-sidebar.
   xsl` to sort items in the order of the request.
 * 1.0.4: Bugfix for replacement of dollar characters in content. Also content items
   are now cached separately.
 * 1.0.3: Fixed the display of inline tags on category pages.
 * 1.0.2: Changed the plugin path from `amtap` to `amazon-machine-tags` for consistency
   with the file structure in the zipped file.
 * 1.0.1: Bugfix for native WordPress tags.

## Meta

 *  Phiên bản **3.0.2**
 *  Cập nhật lần cuối **16 năm trước**
 *  Số lượt cài đặt **10+**
 *  Phiên bản WordPress ** 2.3 hoặc cao hơn **
 *  Đã kiểm tra lên đến **2.9.2**
 *  Ngôn ngữ
 * [English (US)](https://wordpress.org/plugins/amazon-machine-tags/)
 * Thẻ
 * [amazon](https://vi.wordpress.org/plugins/tags/amazon/)[api](https://vi.wordpress.org/plugins/tags/api/)
   [post](https://vi.wordpress.org/plugins/tags/post/)[posts](https://vi.wordpress.org/plugins/tags/posts/)
   [web services](https://vi.wordpress.org/plugins/tags/web-services/)
 *  [Nâng cao](https://vi.wordpress.org/plugins/amazon-machine-tags/advanced/)

## Đánh giá

Chưa có đánh giá nào được gửi.

[Your review](https://wordpress.org/support/plugin/amazon-machine-tags/reviews/#new-post)

[Xem tất cả đánh giá](https://wordpress.org/support/plugin/amazon-machine-tags/reviews/)

## Những người đóng góp

 *   [ Martin Kliehm ](https://profiles.wordpress.org/kliehm/)

## Hỗ trợ

Có điều gì muốn nói? cần giúp đỡ?

 [Xem diễn đàn hỗ trợ](https://wordpress.org/support/plugin/amazon-machine-tags/)

## Ủng hộ

Bạn có muốn hỗ trợ vào sự phát triển của plugin này?

 [ Ủng hộ plugin này ](http://www.amazon.de/gp/registry/wishlist/18XSF4H22J4L8/)