Ignore:
Timestamp:
Oct 4, 2013, 10:09:05 PM (11 years ago)
Author:
mistic100
Message:

add light mode: no script loaded
tests in migration task
add an id to the div on picture page

Location:
extensions/SocialButtons/template
Files:
12 edited

Legend:

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

    r23201 r24757  
    33{html_style}{literal}
    44.socialbutt.disabled thead img {
     5  -webkit-filter: grayscale(100%); /* Chrome 19+ & Safari 6+ */
    56  filter: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg'><filter id='grayscale'><feColorMatrix type='saturate' values='0'/></filter></svg>#grayscale"); /* Firefox 10+ */
    67  filter: gray; /* IE6-9 */
    7   -webkit-filter: grayscale(100%); /* Chrome 19+ & Safari 6+ */
    88}
    9 {/literal}{/html_style}
     9{/literal}
     10{if $light}
     11.not-light {ldelim} display:none; }
     12{/if}
     13{/html_style}
    1014
    1115{footer_script}{literal}
     
    2327  }
    2428});
     29
     30jQuery("input#light_mode").on('change', function() {
     31  if ($(this).is(":checked")) {
     32    $('.not-light').hide();
     33  }
     34  else {
     35    $('.not-light').show();
     36  }
     37});
     38
     39jQuery(".showInfo").tipTip({
     40  delay: 0,
     41  fadeIn: 200,
     42  fadeOut: 200,
     43  maxWidth: '300px',
     44  defaultPosition: 'bottom'
     45});
    2546{/literal}{/footer_script}
    2647
     
    5475    </td>
    5576  </tr>
     77  <tr class="property">
     78    <td>
     79      <label for="light_mode">{'Light mode'|@translate}</label>
     80    </td>
     81    <td>
     82      <input type="checkbox" id="light_mode" name="light" {if $light}checked="checked"{/if}/>
     83      <a class="showInfo" title="{'When light mode is activated no external script is loaded, it <b>speeds up the load of the page and disables user tracking</b> but also disables annotations and in-page popups.'|@translate}">i</a>
     84    </td>
     85  </tr>
    5686</table>
    5787</div>
     
    87117      </label></td>
    88118    </tr>
    89     <tr class="property">
     119    <tr class="property not-light">
    90120      <td>
    91121        {'Annotation'|@translate}
     
    145175      </label></td>
    146176    </tr>
    147     <tr class="property">
     177    <tr class="property not-light">
    148178      <td>
    149179        {'Annotation'|@translate}
     
    180210      </td>
    181211    </tr>
    182     <tr class="property">
     212    <tr class="property not-light">
    183213      <td>
    184214        {'Annotation'|@translate}
     
    221251      </label></td>
    222252    </tr>
    223     <tr class="property">
     253    <tr class="property not-light">
    224254      <td>
    225255        {'Annotation'|@translate}
  • extensions/SocialButtons/template/facebook.tpl

    r23201 r24757  
    11{strip}
     2{if $SOCIALBUTT.light}
     3<a href="https://www.facebook.com/sharer.php?u={$SOCIALBUTT.share_url|urlencode}&t={$PAGE_TITLE|cat:' | '|cat:$GALLERY_TITLE|urlencode}" rel="nofollow"
     4  onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=500,width=500');return false;" target="_blank">
     5  <img src="{$ROOT_PATH}{$SOCIALBUTT_PATH}template/images/facebook_{$SOCIALBUTT.FACEBOOK.color}.png" alt="Share on Facebook"></a>
     6{else}
    27{footer_script}jQuery('body').prepend('<div id="fb-root"></div>');{/footer_script}
    38{combine_script id='facebook_jssdk' load='footer' path='https://connect.facebook.net/'|cat:$SOCIALBUTT.FACEBOOK.lang|cat:'/all.js#xfbml=1'}
    4 
    59<div style="display:inline-block;" class="fb-like" data-send="false" data-show-faces="false"
    610  data-href="{$SOCIALBUTT.share_url}" data-layout="{$SOCIALBUTT.FACEBOOK.layout}" data-colorscheme="{$SOCIALBUTT.FACEBOOK.color}"></div>
     11{/if}
    712{/strip}
  • extensions/SocialButtons/template/google.tpl

    r23201 r24757  
    11{strip}
     2{if $SOCIALBUTT.light}
     3<a title="Google +" href="https://plus.google.com/share?url={$SOCIALBUTT.share_url|urlencode}&hl={$SOCIALBUTT.GOOGLE.lang}" rel="nofollow"
     4  onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=390,width=480');return false;" target="_blank">
     5  <img src="{$ROOT_PATH}{$SOCIALBUTT_PATH}template/images/google_{$SOCIALBUTT.GOOGLE.size}.png" alt="Share on Google+"></a>
     6{else}
    27{combine_script id='google_plusone' load='footer' path='https://apis.google.com/js/plusone.js'}
    3 
    48<script type="text/javascript">window.___gcfg = {ldelim}lang: '{$SOCIALBUTT.GOOGLE.lang}'};</script>
    59<div style="display:inline-block;" class="g-plusone" data-size="{$SOCIALBUTT.GOOGLE.size}" data-annotation="{$SOCIALBUTT.GOOGLE.annotation}" data-href="{$SOCIALBUTT.share_url}" data-recommendations="false"></div>
     10{/if}
    611{/strip}
  • extensions/SocialButtons/template/pinterest.tpl

    r23201 r24757  
    11{strip}
    2 {combine_script id='pinterest_pinit' load='footer' path='https://assets.pinterest.com/js/pinit.js'}
    3 
    4 <a href="http://pinterest.com/pin/create/button/?url={$SOCIALBUTT.share_url|urlencode}&media={$SOCIALBUTT.PINTEREST.source|urlencode}&description={$SOCIALBUTT.PINTEREST.title|cat:' '|cat:$SOCIALBUTT.copyright|urlencode}"
    5   class="pin-it-button" count-layout="{$SOCIALBUTT.PINTEREST.layout}"><img border="0" src="http://assets.pinterest.com/images/PinExt.png" title="Pin It"/></a>
     2<a href="http://pinterest.com/pin/create/button/?url={$SOCIALBUTT.share_url|urlencode}&media={$SOCIALBUTT.PINTEREST.source|urlencode}&description={$SOCIALBUTT.PINTEREST.title|cat:' '|cat:$SOCIALBUTT.copyright|urlencode}" rel="nofollow"
     3{if $SOCIALBUTT.light}
     4  onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=470,width=600');return false;" target="_blank"
     5{else}
     6  class="pin-it-button" count-layout="{$SOCIALBUTT.PINTEREST.layout}"
     7  {combine_script id='pinterest_pinit' load='footer' path='https://assets.pinterest.com/js/pinit.js'}
     8{/if}
     9><img border="0" src="http://assets.pinterest.com/images/PinExt.png" title="Pin It"/></a>
    610{/strip}
  • extensions/SocialButtons/template/style.css

    r20403 r24757  
    117117  content:"\2611";
    118118}
     119
     120
     121.showInfo {
     122  position:static;
     123  display:inline-block;
     124  padding:1px 6px;
     125  width:4px;
     126  height:14px;
     127  line-height:14px;
     128  font-size:0.8em;
     129}
  • extensions/SocialButtons/template/tumblr.tpl

    r23201 r24757  
    11{strip}
    2 {combine_script id='tumblr_share' load='footer' path='http://platform.tumblr.com/v1/share.js'}
    3 
    42{if $SOCIALBUTT.TUMBLR.mode=='photo'}
    53{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|cat:' '|cat:$SOCIALBUTT.copyright|urlencode}&clickthru={$SOCIALBUTT.share_url|urlencode}&tags={$inline_tags|urlencode}"
     4<a href="http://www.tumblr.com/share/photo?source={$SOCIALBUTT.TUMBLR.source|urlencode}&caption={$SOCIALBUTT.TUMBLR.title|cat:' '|cat:$SOCIALBUTT.copyright|urlencode}&clickthru={$SOCIALBUTT.share_url|urlencode}&tags={$inline_tags|urlencode}" rel="nofollow"
    75{else}
    8 <a href="http://www.tumblr.com/share/link?url={$SOCIALBUTT.share_url|urlencode}&name={$SOCIALBUTT.TUMBLR.title|cat:' | '|cat:$GALLERY_TITLE|urlencode}&description={$CONTENT_DESCRIPTION|cat:$SOCIALBUTT.copyright|urlencode}"
     6<a href="http://www.tumblr.com/share/link?url={$SOCIALBUTT.share_url|urlencode}&name={$SOCIALBUTT.TUMBLR.title|cat:' | '|cat:$GALLERY_TITLE|urlencode}&description={$CONTENT_DESCRIPTION|cat:$SOCIALBUTT.copyright|urlencode}" rel="nofollow"
     7{/if}
     8{if $SOCIALBUTT.light}
     9  onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=430,width=500');return false;" target="_blank"
     10{else}
     11  {combine_script id='tumblr_share' load='footer' path='http://platform.tumblr.com/v1/share.js'}
    912{/if}
    1013><img src="http://platform.tumblr.com/v1/{$SOCIALBUTT.TUMBLR.type}.png" alt="Share on Tumblr"></a>
  • extensions/SocialButtons/template/twitter.tpl

    r23201 r24757  
    11{strip}
    2 {combine_script id='twitter_widgets' load='footer' path='https://platform.twitter.com/widgets.js'}
    3 
    4 <a href="https://twitter.com/share?url={$SOCIALBUTT.share_url|urlencode}&text={$PAGE_TITLE|cat:' | '|cat:$GALLERY_TITLE|urlencode}{if $SOCIALBUTT.TWITTER.via}&via={$SOCIALBUTT.TWITTER.via}{/if}"
     2<a href="https://twitter.com/share?url={$SOCIALBUTT.share_url|urlencode}&text={$PAGE_TITLE|cat:' | '|cat:$GALLERY_TITLE|urlencode}{if $SOCIALBUTT.TWITTER.via}&via={$SOCIALBUTT.TWITTER.via}{/if}" rel="nofollow"
     3{if $SOCIALBUTT.light}
     4  onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=470,width=600');return false;" target="_blank"
     5{else}
    56  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}" class="twitter-share-button">
    7   <img src="{$ROOT_PATH}{$SOCIALBUTT_PATH}template/images/twitter_{$SOCIALBUTT.TWITTER.size}.png" alt="Share on Twitter"></a>
     7  data-size="{$SOCIALBUTT.TWITTER.size}" data-count="{$SOCIALBUTT.TWITTER.count}" class="twitter-share-button"
     8  {combine_script id='twitter_widgets' load='footer' path='https://platform.twitter.com/widgets.js'}
     9{/if}
     10><img src="{$ROOT_PATH}{$SOCIALBUTT_PATH}template/images/twitter_{$SOCIALBUTT.TWITTER.size}.png" alt="Share on Twitter"></a>
    811{/strip}
Note: See TracChangeset for help on using the changeset viewer.