Binders: share

TODO:

/**
 * Outputs social media button
 *
 * @param $params
 * 			$params['assign_to']
 * 			$params['networks'] (valid values: twitter, facebook, google, linkedin)... default: 'twitter,facebook,google'
 * 			$params['url']
 * 			$params['class']
 * 			$params['style'] (e.g. default, arbenta, metal, pagepeel, plain, retro, ribbons, simple, somacro)
 *
 * @example 
 *
 * {{share networks="facebook,twitter" class="btn-group" url="http://domain.com/my-page/" style="retro"}}
 */

 

The above code will generate HTML code similar to:

 

<ul class="appc-share btn-group">
    <li class="appc-share-item">
        <a href="http://www.facebook.com/sharer.php?u=http://domain.com/my-page/" title="Share on facebook" target="_blank">
          <img src="http://builder.appcropolis.com/resources/images/share/buttons/simple/facebook.png" alt="Share on facebook" class="appc-share-image"></a>
    </li>
    <li class="appc-share-item">
        <a href="http://twitter.com/share?url=http://domain.com/my-page/" title="Share on twitter" target="_blank">
          <img src="http://builder.appcropolis.com/resources/images/share/buttons/simple/twitter.png" alt="Share on twitter" class="appc-share-image"></a>
    </li>
    <li class="appc-share-item">
        <a href="https://plus.google.com/share?url=http://domain.com/my-page/" title="Share on google" target="_blank">
          <img src="http://builder.appcropolis.com/resources/images/share/buttons/simple/google.png" alt="Share on google" class="appc-share-image"></a>
    </li>
    <li class="appc-share-item">
        <a href="http://www.linkedin.com/shareArticle?mini=true&url=http://domain.com/my-page/" title="Share on linkedin" target="_blank">
          <img src="http://builder.appcropolis.com/resources/images/share/buttons/simple/linkedin.png" alt="Share on linkedin" class="appc-share-image"></a>
    </li>
</ul>

 

share-binder-example

Leave a Reply

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