by Kevin Schroeder | 12:00 am

On all of the links on the site now I’ve added a social media thingy.  I didn’t want one of those social media toolbars that was so freaking busy so-as to make it useless or annoying.  So I did a really quick Zend Framework view helper that you can easily add to your site for individual pages.

class Zend_View_Helper_SocialMedia extends Zend_View_Helper_Abstract

    public function socialMedia()
        $return = '

        return $return;

    private function _wrap($text)
        return '' . $text . '';

And on your view script

socialMedia(); ?>

You also need to define the CSS classes for the social media DIV container as a whole as well as the individual elements.  Mine is this

.socialMedia {
    width: 80%;
    margin: auto;
    text-align: center;
    margin-bottom: 10px;
    padding: 10px;
    height: 20px;

.socialMediaElement {
    float: left;
    padding-left: 20px;





very convenient!!!
You can read all the network from an array

Aug 30.2010 | 06:03 am

Leave a Reply

Your email address will not be published. Required fields are marked *