After updating the Best Sellers lens this morning, I decided to change it a bit for a better look and more flexibility. The other day when I was in the Chatter Box forum in SquidU, I learned of a Firefox extension called Affiliator which creates links very easily from Amazon product pages. All I have to do to create a link is go to the product page, right click, and choose to save the code to the clipboard. Then I just paste it in at the appropriate place in the lens module. It's quicker and creates a much more compact code that the "link to this page" link creates through Amazon Associates.
The person who told me about it also mentioned saving a link for the product graphic - book cover, CD cover, etc. I decided I wanted to make that graphic a link, and since I already have the code for that saved, it was just a matter of figuring out how to put it all together.
In addition, I try to include a link to Amazon.co.uk when possible. Affiliator only works for Amazon.com, I think, so I have to use the regular text links from Amazon.co.uk. That actually saves me some time in converting a lens because I already have that code. Also, since I have the code, there's not much sense in going back and replacing it even if Affiliator does work with Amazon.co.uk. That needs checking out, because on new lenses using Affiliator with Amazon.co.uk would be quicker if it works. I'd just have to make a one-digit change in my affiliate ID.
Since I was replacing 15 modules, it made sense to set up the code in a Notepad++ file so I could just copy it into each module, and also so I'd have the code for adding new books to the Best Seller lens in the future. This is what I came up with:
HTML FROM TEXT LINK(img src="BOOK IMAGE FROM AMAZON" style="float: right; margin: 0px 0px 10px 10px; border=" /)(/a)(b)First Time on the List(/b)
NEW BOOK BLURB
(b)TEXT LINK FROM AFFILIATOR
AMAZON.CO.UK TEXT LINK(/b)
(I changed the <> to parentheses so the blog software doesn't try to use the code.)
For the Best Seller entries, I have a line that indicates a book's position on the list the previous week and the number of weeks on the list. For new books, it's always "First Time on the List," but for this updating I had to be sure to change that. For use with other lenses, I just have to cut that line out.
I right click on the product page, copy the code, then replace "TEXT LINK FROM AFFILIATOR" with it. Next I copy only the part from (a href= to the ) before the book title and paste it over "HTML FROM TEXT LINK" to make the image a link. Next, I right click on the image on the Amazon page and "Copy Image Location." That gets pasted over "BOOK IMAGE FROM AMAZON." Next I copy the book blurb text and past it over "NEW BOOK BLURB." Then I copy the Amazon.co.uk link code and paste it over "AMAZON.CO.UK TEXT LINK."
The one tricky part comes if the image I copy from Amazon has "Click to look inside" on it, which many book images have. I looked at the code and found the image is really two images, with the "Click to look inside" and the arrow being a separate image. I tried cutting out what I thought was code for that, and got it right on the second try. I made sure I put that bit of code in my instructions for using this whole thing because if I don't work on lenses all the time, it's easy to forget details.
This is what an entry looks like except for the font, minus the book title headline and author name subhead which are outside the text box:
Last Week: 1 - Weeks on the List: 5
Private forensic pathologist Kay Scarpetta travels from her home in Charleston, South Carolina to New York City at the request of the NYPD. An injured man in the psychiatric prison ward of Bellevue Hospital has specifically asked for her, and when she arrives, he tells her a bizarre tale of torture and murder. His injuries, he says, are the result of a murder, but he did not commit it. The investigation leads Scarpetta, her husband and her niece on a harrowing chase through cyberspace and city streets.
Scarpetta (Kay Scarpetta) from Amazon.com
Scarpetta from Amazon.co.uk
If you put your mouse over the titles or the book cover, you'll see they're real links, so if you want to do a little shopping on Amazon, you've got a place to start. :)
The Affiliator extension for Firefox is considered experimental by Mozilla, so I had to register in order to get access to it, but it's free and worth the effort.
Later on, I decided to see if I had to do any serious alterations to make the code work on an ordinary lens. I chose to make over my lens for author Eric Larson. All I had to do was cut out the line about the book's position on the best seller list. By the way, I'd appreciate it if you'd take a look at that lens. It's been kind of lonely.
This should work on music lenses as well. I doubt I'll go in for converting every lens I have because that runs into over a thousand items, the result of over a year of making lenses. When I make text links with Affiliator or just make them using the code generated by the Amazon Affiliates site, all the commission goes from Amazon directly to me. Squidoo doesn't get the cut they get when I use their Amazon modules. Squidoo won't get as much from me as they might otherwise, but since I don't plan on converting all my existing lenses, they'll still get something, including their share of ad revenue from all of my lenses, whether I convert the modules or not.