Sample book feed
Here is a demonstration of a Books We Like "BookRoll", a form of RSS feed that cycles through a specified BWL user's list of books.
[NEW: Much more flexibility in what feed you want to display, such as all books tagged "food" or books a particular user tagged "war". Do it by using tags for your feed, so legal feed names are "/USER", "/USER/TAG", and "/tag/TAG", where USER and TAG are replaced with real usernames and tags. You can also omit the leading "/".]
These examples display one book from a given BWL user's recommendations at a time, incrementing each time the page is loaded, and cycling back to the start. The one on the left is the default; on the right is customized. See below for how to do that easily, or click right over the page and "View Source".
To create your own Bookroll, copy these few lines of Javascript into your page wherever you want it to show up. Change "greenmuseum" to the name of the BWL user whose list you want to display, and change "organicconsumers" to the BWL prefix of the partner you want to receive the commissions..
The "partner_prefix" line tells it which partner's version of BWL to use when the user clicks on the book. It's the replacement for "www" in the URL of that partner's version of BWL, e.g. alternet.bookswelike.net .
For an example, see the Bookroll in the lower right at Organic Consumers Association.
There are two simple ways to customize: changing how each book is displayed, and displaying more than one if you want. To change how each is displayed, simply copy the function draw_book_simple() from the feed.js file into your file, bracketed by
, and change that function to make it do what you want. Here's the version that displays the example above:
This version sets the background color, width, and border of the rectangle, and adds a promotional line at the bottom.
To change how many books get displayed, copy the function cycle_book_display() to your file, again inside a script tag, and alter it.
|
|
|
|