Template:BookLink: Difference between revisions

From Rosetta Code
Content added Content deleted
(Usage and demonstration. Also some guidelines.)
(Whoops. Link to full volume, not just 1st Facsimile.)
Line 9: Line 9:
By correct selection of the template parameter (the [[wp:ISBN|ISBN]] number, '''dashes removed''', is ideal, followed by [[wp:ASIN|ASIN]] or [[wp:ESIN|ESIN.), a referral link will be provided to the desired resource, hyperlinked as the title and author's name.
By correct selection of the template parameter (the [[wp:ISBN|ISBN]] number, '''dashes removed''', is ideal, followed by [[wp:ASIN|ASIN]] or [[wp:ESIN|ESIN.), a referral link will be provided to the desired resource, hyperlinked as the title and author's name.


For example, Donald Knuth's ''The Art of Computer Programming'' has the ISBN-10 of '''0201853922'''. To create a referral link to this resource, you may use this syntax:
For example, Donald Knuth's ''The Art of Computer Programming: Volume 1 (3rd Edition)'' has the ISBN-10 of '''0201896834'''. To create a referral link to this resource, you may use this syntax:
<pre>{{BookLink|0201853922}}</pre>
<pre>{{BookLink|0201896834}}</pre>


This will appear as:
This will appear as:
{{BookLink|0201853922}}
{{BookLink|0201896834}}


The box set, volumes 1-4A has the ISBN-10 of '''0321751043'''. To create a referral link to this resource, you may use this syntax:
The box set, volumes 1-4A has the ISBN-10 of '''0321751043'''. To create a referral link to this resource, you may use this syntax:

Revision as of 21:57, 24 October 2010


This is a template. There are many others. See Category:RCTemplates for a complete list of templates.

Purpose

The use of this template is preferred to direct linking to book resources, as purchases made through the generated link earn Rosetta Code a bit of money through the Amazon Associates program. This will help.

When Not to Use

  1. When a link to a specific book resource would be decidedly inappropriate or unhelpful. It's unhelpful to have a huge number of links, both in terms of choice of appropriate resources, as well as in terms of quality.

How to use

By correct selection of the template parameter (the ISBN number, dashes removed, is ideal, followed by ASIN or [[wp:ESIN|ESIN.), a referral link will be provided to the desired resource, hyperlinked as the title and author's name.

For example, Donald Knuth's The Art of Computer Programming: Volume 1 (3rd Edition) has the ISBN-10 of 0201896834. To create a referral link to this resource, you may use this syntax:

{{BookLink|0201896834}}

This will appear as: <amazon keywords="0201896834">[%url% %title%] by %author%</amazon>

The box set, volumes 1-4A has the ISBN-10 of 0321751043. To create a referral link to this resource, you may use this syntax:

{{BookLink|0321751043}}

This will appear as: <amazon keywords="0321751043">[%url% %title%] by %author%</amazon>