Ignore:
Timestamp:
Jan 26, 2013, 12:48:44 PM (11 years ago)
Author:
mistic100
Message:

simplyfy code, add noscript fallback for twitter

Location:
extensions/SocialButtons/template
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • extensions/SocialButtons/template/facebook.tpl

    r20374 r20406  
    11{strip}
    22{footer_script}jQuery('body').prepend('<div id="fb-root"></div>');{/footer_script}
    3 {combine_script id='facebook_jssdk' load='async' path='https://connect.facebook.net/'|cat:$SOCIALBUTT.FACEBOOK.lang|cat:'/all.js#xfbml=1'}
     3{combine_script id='facebook_jssdk' load='footer' path='https://connect.facebook.net/'|cat:$SOCIALBUTT.FACEBOOK.lang|cat:'/all.js#xfbml=1'}
    44
    55{if $SOCIALBUTT.FACEBOOK.layout=='none'}
    66{html_style}{literal}
    7 .fb-like span { height: 22px !important; overflow: hidden; margin-right:10px; }
     7.fb-like span { height: 22px !important; overflow: hidden !important; margin-right:10px; }
    88.fb-like iframe { top: -41px; }
    99{/literal}{/html_style}
  • extensions/SocialButtons/template/google.tpl

    r20358 r20406  
    33
    44<script type="text/javascript">window.___gcfg = {ldelim}lang: '{$SOCIALBUTT.GOOGLE.lang}'};</script>
    5 <div class="g-plusone" data-size="{$SOCIALBUTT.GOOGLE.size}" data-annotation="{$SOCIALBUTT.GOOGLE.annotation}" data-href="{$SOCIALBUTT.share_url}"></div>
     5<div style="display:inline-block;" class="g-plusone" data-size="{$SOCIALBUTT.GOOGLE.size}" data-annotation="{$SOCIALBUTT.GOOGLE.annotation}" data-href="{$SOCIALBUTT.share_url}"></div>
    66{/strip}
  • extensions/SocialButtons/template/pinterest.tpl

    r20374 r20406  
    22{combine_script id='pinterest_pinit' path='http://assets.pinterest.com/js/pinit.js'}
    33
    4 <a href="http://pinterest.com/pin/create/button/?url={$SOCIALBUTT.share_url|urlencode}&media={$SOCIALBUTT.PINTEREST.source|urlencode}&description={$SOCIALBUTT.PINTEREST.title|urlencode}{$SOCIALBUTT.PINTEREST.copyright|urlencode}"
     4<a href="http://pinterest.com/pin/create/button/?url={$SOCIALBUTT.share_url|urlencode}&media={$SOCIALBUTT.PINTEREST.source|urlencode}&description={$SOCIALBUTT.PINTEREST.title|cat:$SOCIALBUTT.copyright|urlencode}"
    55  class="pin-it-button" count-layout="{$SOCIALBUTT.PINTEREST.layout}"><img border="0" src="http://assets.pinterest.com/images/PinExt.png" title="Pin It"/></a>
    66{/strip}
  • extensions/SocialButtons/template/tumblr.tpl

    r20358 r20406  
    44{if $SOCIALBUTT.TUMBLR.mode=='photo'}
    55{capture assign="inline_tags"}{foreach from=$related_tags item=tag name=tag_loop}{if !$smarty.foreach.tag_loop.first},{/if}{$tag.name}{/foreach}{/capture}
    6 <a href="http://www.tumblr.com/share/photo?source={$SOCIALBUTT.TUMBLR.source|urlencode}&caption={$SOCIALBUTT.TUMBLR.title|urlencode}{$SOCIALBUTT.TUMBLR.copyright|urlencode}&clickthru={$SOCIALBUTT.share_url|urlencode}&tags={$inline_tags|urlencode}"
     6<a href="http://www.tumblr.com/share/photo?source={$SOCIALBUTT.TUMBLR.source|urlencode}&caption={$SOCIALBUTT.TUMBLR.title|cat:$SOCIALBUTT.copyright|urlencode}&clickthru={$SOCIALBUTT.share_url|urlencode}&tags={$inline_tags|urlencode}"
    77{else}
    8 <a href="http://www.tumblr.com/share/link?url={$SOCIALBUTT.share_url|urlencode}&name={$SOCIALBUTT.TUMBLR.title|urlencode}&description={$CONTENT_DESCRIPTION|urlencode}{$SOCIALBUTT.TUMBLR.copyright|urlencode}"
     8<a href="http://www.tumblr.com/share/link?url={$SOCIALBUTT.share_url|urlencode}&name={$SOCIALBUTT.TUMBLR.title|urlencode}&description={$CONTENT_DESCRIPTION|cat:$SOCIALBUTT.copyright|urlencode}"
    99{/if}
    10 style="display:inline-block;text-indent:-9999px;overflow:hidden;{$SOCIALBUTT.TUMBLR.css}background:url('http://platform.tumblr.com/v1/{$SOCIALBUTT.TUMBLR.type}.png') top left no-repeat transparent;">Tumblr</a>
     10><img src="http://platform.tumblr.com/v1/{$SOCIALBUTT.TUMBLR.type}.png" alt="Share on Tumblr"></a>
    1111{/strip}
  • extensions/SocialButtons/template/twitter.tpl

    r20358 r20406  
    22{combine_script id='twitter_widgets' load='footer' path='http://platform.twitter.com/widgets.js'}
    33
    4 <a href="https://twitter.com/share" class="twitter-share-button"
     4<a href="https://twitter.com/share?url={$SOCIALBUTT.share_url}&text={$PAGE_TITLE|cat:' | '|cat:$GALLERY_TITLE}{if $SOCIALBUTT.TWITTER.via}&via={$SOCIALBUTT.TWITTER.via}{/if}"
    55  data-url="{$SOCIALBUTT.share_url}" data-lang="{$SOCIALBUTT.TWITTER.lang}" data-via="{$SOCIALBUTT.TWITTER.via}"
    6   data-size="{$SOCIALBUTT.TWITTER.size}" data-count="{$SOCIALBUTT.TWITTER.count}">Tweet</a>
     6  data-size="{$SOCIALBUTT.TWITTER.size}" data-count="{$SOCIALBUTT.TWITTER.count}" class="twitter-share-button">
     7  <img src="{$ROOT_PATH}{$SOCIALBUTT_PATH}template/images/twitter_{$SOCIALBUTT.TWITTER.size}.png" alt="Share on Twitter"></a>
    78{/strip}
Note: See TracChangeset for help on using the changeset viewer.