@@ -, +, @@ - Added AmazonAssocTag if set for all links from the cover art - updated the reader url dropping some bits (/ref=sib_dp_pt/002-7879865-0184864#reader-link) that appear to have no function - I don't have a good way to test if the associate info will actually pass through on a purchase; all AWS docs relate to the product page and not the reader page.--but I suspect this will work - nothing done re: 'The same might be true for other Amazon related links that koha generates' mentioned on the bug as I couldn't sort out how to trigger that --- C4/Auth.pm | 2 ++ C4/External/Amazon.pm | 6 ++++++ .../prog/en/modules/catalogue/detail.tmpl | 4 ++-- .../opac-tmpl/prog/en/modules/opac-detail.tmpl | 2 +- .../prog/en/modules/opac-readingrecord.tmpl | 2 +- koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tmpl | 4 ++-- 6 files changed, 14 insertions(+), 6 deletions(-) --- a/C4/Auth.pm +++ a/C4/Auth.pm @@ -354,6 +354,7 @@ sub get_template_and_user { if ( $in->{'type'} eq "intranet" ) { $template->param( AmazonContent => C4::Context->preference("AmazonContent"), + AmazonAssocTag => C4::Context->preference("AmazonAssocTag"), AmazonCoverImages => C4::Context->preference("AmazonCoverImages"), AmazonEnabled => C4::Context->preference("AmazonEnabled"), AmazonSimilarItems => C4::Context->preference("AmazonSimilarItems"), @@ -399,6 +400,7 @@ sub get_template_and_user { } $template->param( AmazonContent => "" . C4::Context->preference("AmazonContent"), + AmazonAssocTag => C4::Context->preference("AmazonAssocTag"), AnonSuggestions => "" . C4::Context->preference("AnonSuggestions"), AuthorisedValueImages => C4::Context->preference("AuthorisedValueImages"), LibraryName => "" . C4::Context->preference("LibraryName"), --- a/C4/External/Amazon.pm +++ a/C4/External/Amazon.pm @@ -174,6 +174,12 @@ sub SignRequest{ return hmac_sha256_base64($string,C4::Context->preference('AWSPrivateKey')) . '='; } +## +## check_search_inside() doesn't appear to be called anywhere and is using a reader url that I think is +## a bit out of date; it probably makes sense to drop this method unless it's going to be needed. +## I kind of doubt it would even work given the js-ish nature of the Amazon reader page. +## -- 26 May 2010, Reed Wade +## sub check_search_inside { my $isbn = shift; my $ua = LWP::UserAgent->new( --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tmpl +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tmpl @@ -116,7 +116,7 @@ function verify_images() {
-/gp/reader//ref=sib_dp_pt/002-7879865-0184864#reader-link">.01.MZZZZZZZ.jpg" alt="" />
+/gp/reader/?tag=">.01.MZZZZZZZ.jpg" alt="" />