DriveThruRPG affiliate links
Here is a tool that will allow you to show the hottest or newest items at Drive Thru RPG and place a link to those items on your site. This widget randomly chooses one of the current five hottest items at DriveThruRPG, one of the current five newest items, or both. Refresh this page and check it out!
To use this widget, add the script below to the top of your web page between the
By default, the widget uses my affiliate ID (43463), but you can replace it with your own affiliate ID by replacing my affiliate number with yours. So if your affiliate number is 1234, you would replace "affiliate_id=43463" with "affiliate_id=1234" (not including the quotation marks).
By default, the widget creates an affiliate link for DriveThruRPG, but you can change that by changing the "site" value. The valid "site" values are:
For example, if your affiliate ID is 1234 and you want to create an affiliate link for Wargame Vault, you would add the script below to the top of your web page:
This loads the script, but it does not draw the widget. To draw the widget, simply paste the text below into the HTML of the page. Again, this needs to be the "source" of the page. If you are using a WYSIWYG editor, look for a button that says "edit source".
This widget randomly chooses one of the current five newest items at DriveThruRPG.
This widget randomly chooses one of the current five hottest items at DriveThruRPG.
This widget randomly chooses one of the current five hottest items or one of the current five newest items at DriveThruRPG.
If you have any questions or comments about this script, post them at my blog, Blackmoor Vituperative.
Update 2010-05-25: I added some error-checking in case the description field in DriveThruRPG's RSS feed contains some bad tags. It doesn't actually do anything with the errors, but it keeps the script from failing.
Update 2010-05-25, part 2: I expanded the script to be able to handle any of OneBookShelf's sites. This changes both the name of the script, the values passed to it, and the function calls, so take a look at it.