Template:BookLink: Difference between revisions

Usage and demonstration. Also some guidelines.
(Doesn't work correctly.)
(Usage and demonstration. Also some guidelines.)
Line 1:
<includeonly><amazon keywords="{{{1}}}"><span class="plainlinks">''[%url% %title%]'' by %author%</span></amazon></includeonly><noinclude>{{template}}
 
==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 [[Rosetta Code:Finances|help offset the cost of the server. Links like these should be kept fairly low-key; Too gaudy a presence would distract from the core content of the site]].
==When Not to Use==
# 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 [[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:
'''Note: This template does not yet work correctly. Using the code directly does, however.'''
<pre>{{BookLink|0201853922}}</pre>
 
This will appear as:
{{BookLink|0201853922}}
 
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:
<pre>{{BookLink|0321751043}}</pre>
 
This will appear as:
{{BookLink|0321751043}}