############ Linkmazon - Links as a Bookshop - John Gotze ############## # HOW TO: # Use Links as a bookshop # # See http://www.books.democracyforum.net/ for an example of it's use. # # īVer 1.0 - Using the ISBN number as 'connector' We assume you have a Links database with book references, including ISBN-numbers. Now, you can easily add an Amazon (or others) associate bookshop. Of course, you need to sign up as associate, and will need your associate ID here. Links databases can have any kinds of fields, as you know. Try this: %db_def = ( ID => [0, 'numer', 5, 8, 1, '', ''], Title => [1, 'alpha', 40, 275, 1, '', ''], Date => [2, 'date', 15, 15, 1, \&get_date, ''], Category => [3, 'alpha', 0, 1500, 1, '', ''], 'Author(s)' => [4, 'alpha', 40, 2500, 0, '', ''], ISBN => [5, 'numer', '40', 50, 0, '', ''], 'Publishing Year' => [6, 'numer', '4', 4, 0, '', ''], Publisher => [7, 'alpha', '40', 500, 0, '', ''], Description => [8, 'alpha', '40x10', 10000, 0, '', ''], 'Image URL' => [9, 'alpha', 40, 75, 0, '', ''], 'Contact Name' => [10, 'alpha', 40, 75, 1, '', ''], 'Contact Email' => [11, 'alpha', 40, 75, 1, '', '.+@.+\..+'], Hits => [12, 'numer', 10, 10, 1, '0', '\d+'], isNew => [13, 'alpha', 0, 5, 0, 'No', ''], isPopular => [14, 'alpha', 0, 5, 0, 'No', ''], Rating => [15, 'numer', 10, 10, 1, 0, '^[\d\.]+$'], Votes => [16, 'numer', 10, 10, 1, 0, '^\d+$'], ReceiveMail => [17, 'alpha', 10, 10, 1, 'Yes', 'No|Yes'], Review => [18, 'alpha', 10, 10, 1, 'No', 'No|Yes'] ); What's important is to have the ISBN field. This is the 'connector' to the bookshops. Make a direct ('15%') link to a book: (I use this in detailed.html for linking from a Detailed page. Have not tried calling from other pages.) In detailed.html, add: Order this book from Amazon.co.uk

Order this book from Amazon.com

Order this book from Bookshop.co.uk

Order this book from Barnes&Noble Amazon.co.uk, Amazon.com, Boookshop.co.uk and Barnes&Nobles high-commission links! link.html <%Title%> That's it :-) Let me know if these instructions work! I might have forgotten something. John