Adrian World Design
  • Services
    • Website Consulting
    • Startup Consulting
    • Zend Development
  • Portfolio
    • My Framework
  • Knowledge
    • Web Standards
    • PHP bare-bones
    • Zend Framework
    • Zend Framework 2
    • Git - Github
    • Search Engine Optimization
    • Web Hosting
    • Linux
    • Microsoft Windows
    • Web Browsers
    • Mobile Devices
  • About
    • Business
    • Professionally
    • Personally
  • Contact
    • Contact Form
    • Phone
    • Email
    • Messaging

Portfolio Overview

StumbleUpon support

Portfolio ⇒ My Framework ⇒ 2012-03 ⇒ StumbleUpon support
Tweet
Share on Tumblr

Created: Mar 10, 2012, 8:43:45 AM CDTLast updated: Mar 10, 2012, 10:10:57 AM CDT

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.

blog comments powered by Disqus
Prev
Next

Powered by FeedBurner Load our "My Framework" feed in your RSS feeder

Follow us on Twitter
Follow us on Facebook
Follow us on LinkedIn
Follow us on Google+

All rights reserved, Adrian World Design ©2009–2023 Powered by Wejas Framework

Jump to Top