How add support for sound badges to your website
The good news: If you are using gravatar, you are almost set.
Gravatar uses md5 hashed email adresses as the identifier. We kinda liked that idea. So we borroweded it.
To create an md5 hash from an email adress, you'll need an md5 implementation in your preferred programming language. Since we're die-hard rubyists, heres an example in ruby:
require 'digest/md5' md5 = Digest::MD5.hexdigest(email_address)
The URL formats
As soon as you have the md5 hash ready, you can use our nifty pseudo-API to retrieve various formats from us:
- Use
http://soundbadge.net/[md5]
to link to the soundbadge profile - Use
http://soundbadge.net/[md5].js
for our (pretty simple) badge widget containing a simple flash player for the soundbadge - Use
http://soundbadge.net/[md50].mp3
to retrieve the mp3 if you want to implement the player on your own.
The widget
Since we're more or less broke, here's the last thing we can show you: A dead-simple widget implementation:
<script type="text/javascript" src="http://soundbadge.net/[md5].js"></script>