StumbleUpon support
Created: Last updated:
I recently stumbled upon StumbleUpon and that is a good reason to add support for the StumbleUpon badge.
StumbleUpon badge
Not much is required for StumbleUpon. They only need a little <su:badge> element as a placeholder plus a JavaScript. The JavaScript replaces the placeholder with the actual button which they like to call a badge.
As a website owner and content provider you don't need an account. Only the visitor must have an account and the JavaScript will take care of this.
Badge layout
The badge is available in six different layouts and a number is used inside the mentioned placeholder to tell the JavaScript which layout you want. In my framework and the configuration I use this number for two things. First the existence of the number tells that the StumbleUpon badge has to be added and second the number is added to the code for the layout.
Social Media Widget
Like with all the social media support this is implemented as a widget. Just a dedicated class for managing the configuration and one for handling the button, er badge, and once the information is added to the configuration the Widget Engine in my framework will fire up these classes. Done!
So, there we have it. Support for StumbleUpon in my framework.