Changeset 24788


Ignore:
Timestamp:
10/06/13 21:05:18 (6 years ago)
Author:
mistic100
Message:

improve facebook light link and clean code & conf

Location:
extensions/SocialButtons
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • extensions/SocialButtons/admin.php

    r24758 r24788  
    1212    'position' => $_POST['position'], 
    1313    'on_index' => get_boolean($_POST['on_index']), 
     14    'img_size' => $_POST['img_size'], 
    1415    'light' => isset($_POST['light']), 
    1516    'twitter' => array( 
     
    2728      'enabled' => isset($_POST['tumblr']['enabled']), 
    2829      'type' => $_POST['tumblr']['type'], 
    29       'img_size' => $_POST['tumblr']['img_size'], 
    3030      ), 
    3131    'facebook' => array( 
     
    3737      'enabled' => isset($_POST['pinterest']['enabled']), 
    3838      'layout' => $_POST['pinterest']['layout'], 
    39       'img_size' => $_POST['pinterest']['img_size'], 
    4039      ), 
    4140    'reddit' => array( 
  • extensions/SocialButtons/include/install.inc.php

    r24758 r24788  
    1111      'position' => 'toolbar', 
    1212      'on_index' => true, 
     13      'img_size' => 'Original', 
    1314      'light' => false, 
    1415      'twitter' => array( 
     
    2627        'enabled' => true, 
    2728        'type' => 'share_1', 
    28         'img_size' => 'Original', 
    2929        ), 
    3030      'facebook' => array( 
     
    3636        'enabled' => true, 
    3737        'layout' => 'horizontal', 
    38         'img_size' => 'Original', 
    3938        ), 
    4039      'reddit' => array( 
     
    4847    { 
    4948      $temp = is_string($conf['TumblrShare']) ? unserialize($conf['TumblrShare']) : $conf['TumblrShare']; 
    50       if (!empty($temp['type']))      $default_config['tumblr']['type'] =     $temp['type']; 
    51       if (!empty($temp['img_size']))  $default_config['tumblr']['img_size'] = $temp['img_size']; 
     49      if (!empty($temp['type']))      $default_config['tumblr']['type'] = $temp['type']; 
     50      if (!empty($temp['img_size']))  $default_config['img_size'] =      $temp['img_size']; 
    5251    } 
    5352    if (isset($conf['TweetThis'])) 
     
    7776        'enabled' => true, 
    7877        'layout' => 'horizontal', 
    79         'img_size' => 'Original', 
    8078        ); 
    8179    } 
     
    105103    } 
    106104     
     105    if (!isset($new_conf['img_size'])) 
     106    { 
     107      $new_conf['img_size'] = isset($new_conf['tumblr']['img_size']) ? $new_conf['tumblr']['img_size'] : 'Original'; 
     108      unset($new_conf['tumblr']['img_size'], $new_conf['pinterest']['img_size']); 
     109    } 
     110     
    107111    $conf['SocialButtons'] = serialize($new_conf); 
    108112    conf_update_param('SocialButtons', $conf['SocialButtons']); 
  • extensions/SocialButtons/include/pinterest.inc.php

    r24757 r24788  
    1010  } 
    1111   
    12   global $conf, $template, $picture; 
     12  global $conf, $template; 
    1313   
    1414  // config 
    1515  $tpl_vars['PINTEREST'] = $conf['SocialButtons']['pinterest']; 
    16   $tpl_vars['PINTEREST']['title'] = $picture['current']['TITLE']; 
    17    
    18   if ($conf['SocialButtons']['pinterest']['img_size'] == 'Original') 
    19   { 
    20     $tpl_vars['PINTEREST']['source'] = $picture['current']['src_image']->get_url(); 
    21   } 
    22   else 
    23   { 
    24     $tpl_vars['PINTEREST']['source'] = DerivativeImage::url($conf['SocialButtons']['pinterest']['img_size'], $picture['current']['src_image']); 
    25   } 
    26    
    2716   
    2817  $template->set_filename('pinterest_button', realpath(SOCIALBUTT_PATH .'template/pinterest.tpl')); 
  • extensions/SocialButtons/include/reddit.inc.php

    r24758 r24788  
    1919    $conf['SocialButtons']['reddit']['type'] = 'spreddit7'; 
    2020  } 
     21   
    2122   
    2223  // config 
  • extensions/SocialButtons/include/tumblr.inc.php

    r23202 r24788  
    99  $tpl_vars['TUMBLR'] = $conf['SocialButtons']['tumblr']; 
    1010   
    11   // button on piture page 
    12   if ($basename == 'picture') 
    13   { 
    14     global $picture; 
    15      
    16     $tpl_vars['TUMBLR']['mode'] = 'photo'; 
    17     $tpl_vars['TUMBLR']['title'] = $picture['current']['TITLE']; 
    18      
    19     if ($conf['SocialButtons']['tumblr']['img_size'] == 'Original') 
    20     { 
    21       $tpl_vars['TUMBLR']['source'] = $picture['current']['src_image']->get_url(); 
    22     } 
    23     else 
    24     { 
    25       $tpl_vars['TUMBLR']['source'] = DerivativeImage::url($conf['SocialButtons']['tumblr']['img_size'], $picture['current']['src_image']); 
    26     } 
    27   } 
    28   // button on other pages 
    29   else if ($basename == 'index') 
    30   { 
    31     global $page; 
    32      
    33     $tpl_vars['TUMBLR']['mode'] = 'link'; 
    34     $tpl_vars['TUMBLR']['title'] = strip_tags($page['title']); 
    35   } 
    36    
    37    
    3811  $template->set_filename('tumblr_button', realpath(SOCIALBUTT_PATH .'template/tumblr.tpl')); 
    3912  $buttons[] = 'tumblr_button'; 
  • extensions/SocialButtons/main.inc.php

    r24758 r24788  
    9494function socialbutt_add_button() 
    9595{ 
    96   global $conf, $template; 
     96  global $conf, $template, $picture; 
    9797   
    9898  $basename = script_basename(); 
     
    121121  $tpl_vars = array( 
    122122    'share_url' => $share_url, 
     123    'basename' => $basename, 
    123124    'position' => $conf['SocialButtons']['position'], 
    124125    'light' => $conf['SocialButtons']['light'], 
    125126    'copyright' => '(from <a href="'.$share_url.'">'.$conf['gallery_title'].'</a>)', 
    126127    ); 
     128   
     129  if ($basename == 'picture') 
     130  { 
     131    if ($conf['SocialButtons']['img_size'] == 'Original') 
     132    { 
     133      $tpl_vars['source'] = $picture['current']['src_image']->get_url(); 
     134    } 
     135    else 
     136    { 
     137      $tpl_vars['source'] = DerivativeImage::url($conf['SocialButtons']['img_size'], $picture['current']['src_image']); 
     138    } 
     139  } 
     140   
     141   
    127142  $buttons = array(); 
    128    
    129143   
    130144  if ($conf['SocialButtons']['google']['enabled']) 
  • extensions/SocialButtons/template/admin.tpl

    r24758 r24788  
    7777  <tr class="property"> 
    7878    <td> 
     79      {'Shared picture size'|@translate} 
     80    </td> 
     81    <td> 
     82      {html_options name="img_size" values=$img_sizes output=$img_sizes|translate selected=$img_size} 
     83    </td> 
     84  </tr> 
     85  <tr class="property"> 
     86    <td> 
    7987      <label for="light_mode">{'Light mode'|@translate}</label> 
    8088    </td> 
     
    190198 
    191199<br> 
    192  
    193 <div class="socialbutt {if not $pinterest.enabled}disabled{else}enabled{/if}"> {* <!-- pinterest --> *} 
    194 <table> 
    195   <thead> 
    196     <tr><td colspan="2"> 
    197       <label title="{if $pinterest.enabled}{'Disable'|@translate}{else}{'Enable'|@translate}{/if}"> 
    198         <img src="{$SOCIALBUTT_PATH}template/images/pinterest_logo.png"/> 
    199         <input class="enable" style="display:none;" type="checkbox" name="pinterest[enabled]" {if $pinterest.enabled}checked="checked"{/if}/> 
    200       </label> 
    201     </td></tr> 
    202   </thead> 
    203   <tbody> 
    204     <tr class="property"> 
    205       <td> 
    206         {'Shared picture size'|@translate} 
    207       </td> 
    208       <td> 
    209         {html_options name="pinterest[img_size]" values=$img_sizes output=$img_sizes|translate selected=$pinterest.img_size} 
    210       </td> 
    211     </tr> 
    212     <tr class="property not-light"> 
    213       <td> 
    214         {'Annotation'|@translate} 
    215       </td> 
    216       <td> 
    217         <label><input type="radio" name="pinterest[layout]" value="none" {if $pinterest.layout=='none'}checked="checked"{/if}/> {'None'|@translate}</label><br> 
    218         <label><input type="radio" name="pinterest[layout]" value="horizontal" {if $pinterest.layout=='horizontal'}checked="checked"{/if}/> {'Right bubble'|@translate}</label><br> 
    219         <label><input type="radio" name="pinterest[layout]" value="vertical" {if $pinterest.layout=='vertical'}checked="checked"{/if}/> {'Top bubble'|@translate}</label> 
    220       </td> 
    221     </tr> 
    222   </tbody> 
    223 </table> 
    224 </div> {* <!-- pinterest --> *} 
    225200 
    226201<div class="socialbutt {if not $facebook.enabled}disabled{else}enabled{/if}"> {* <!-- facebook --> *} 
     
    266241</div> {* <!-- facebook --> *} 
    267242 
     243<div class="socialbutt {if not $reddit.enabled}disabled{else}enabled{/if}"> {* <!-- reddit --> *} 
     244<table> 
     245  <thead> 
     246    <tr><td colspan="2"> 
     247      <label title="{if $reddit.enabled}{'Disable'|@translate}{else}{'Enable'|@translate}{/if}"> 
     248        <img src="{$SOCIALBUTT_PATH}template/images/reddit_logo.png"/> 
     249        <input class="enable" style="display:none;" type="checkbox" name="reddit[enabled]" {if $reddit.enabled}checked="checked"{/if}/> 
     250      </label> 
     251    </td></tr> 
     252  </thead> 
     253  <tbody> 
     254    <tr class="property"> 
     255      <td> 
     256        {'Button type'|@translate} 
     257      </td> 
     258      <td></td> 
     259    </tr> 
     260    <tr class="button"> 
     261      <td><label> 
     262        <img src="http://fr.reddit.com/static/spreddit7.gif"/> 
     263        <input type="radio" name="reddit[type]" value="spreddit7" {if $reddit.type=='spreddit7'}checked="checked"{/if}/> 
     264      </label></td> 
     265      <td><label> 
     266        <input type="radio" name="reddit[type]" value="spreddit6" {if $reddit.type=='spreddit6'}checked="checked"{/if}/> 
     267        <img src="http://fr.reddit.com/static/spreddit6.gif"/> 
     268      </label></td> 
     269    </tr> 
     270    <tr class="button"> 
     271      <td><label> 
     272        <img src="http://fr.reddit.com/static/spreddit1.gif"/> 
     273        <input type="radio" name="reddit[type]" value="spreddit1" {if $reddit.type=='spreddit1'}checked="checked"{/if}/> 
     274      </label></td> 
     275      <td><label> 
     276        <input type="radio" name="reddit[type]" value="interactive" {if $reddit.type=='interactive'}checked="checked"{/if}/> 
     277        <img src="{$SOCIALBUTT_PATH}template/images/reddit_interactive.png"/> 
     278      </label></td> 
     279    </tr> 
     280    <tr class="property"> 
     281      <td> 
     282        <label for="reddit_community">{'Community'|@translate}</label> 
     283      </td> 
     284      <td> 
     285        <input type="text" id="reddit_community" name="reddit[community]" value="{$reddit.community}"/> 
     286      </td> 
     287    </tr> 
     288  </tbody> 
     289</table> 
     290</div> {* <!-- reddit --> *} 
     291 
    268292<br> 
    269293 
     
    325349      </label></td> 
    326350    </tr> 
    327     <tr class="property"> 
    328       <td> 
    329         {'Shared picture size'|@translate} 
    330       </td> 
    331       <td> 
    332         {html_options name="tumblr[img_size]" values=$img_sizes output=$img_sizes|translate selected=$tumblr.img_size} 
    333       </td> 
    334     </tr> 
    335351  </tbody> 
    336352</table> 
    337353</div> {* <!-- tumblr --> *} 
    338354 
    339 <div class="socialbutt {if not $reddit.enabled}disabled{else}enabled{/if}"> {* <!-- reddit --> *} 
    340 <table> 
    341   <thead> 
    342     <tr><td colspan="2"> 
    343       <label title="{if $reddit.enabled}{'Disable'|@translate}{else}{'Enable'|@translate}{/if}"> 
    344         <img src="{$SOCIALBUTT_PATH}template/images/reddit_logo.png"/> 
    345         <input class="enable" style="display:none;" type="checkbox" name="reddit[enabled]" {if $reddit.enabled}checked="checked"{/if}/> 
    346       </label> 
    347     </td></tr> 
    348   </thead> 
    349   <tbody> 
    350     <tr class="property"> 
    351       <td> 
    352         {'Button type'|@translate} 
    353       </td> 
    354       <td></td> 
    355     </tr> 
    356     <tr class="button"> 
    357       <td><label> 
    358         <img src="http://fr.reddit.com/static/spreddit7.gif"/> 
    359         <input type="radio" name="reddit[type]" value="spreddit7" {if $reddit.type=='spreddit7'}checked="checked"{/if}/> 
    360       </label></td> 
    361       <td><label> 
    362         <input type="radio" name="reddit[type]" value="spreddit6" {if $reddit.type=='spreddit6'}checked="checked"{/if}/> 
    363         <img src="http://fr.reddit.com/static/spreddit6.gif"/> 
    364       </label></td> 
    365     </tr> 
    366     <tr class="button"> 
    367       <td><label> 
    368         <img src="http://fr.reddit.com/static/spreddit1.gif"/> 
    369         <input type="radio" name="reddit[type]" value="spreddit1" {if $reddit.type=='spreddit1'}checked="checked"{/if}/> 
    370       </label></td> 
    371       <td><label> 
    372         <input type="radio" name="reddit[type]" value="interactive" {if $reddit.type=='interactive'}checked="checked"{/if}/> 
    373         <img src="{$SOCIALBUTT_PATH}template/images/reddit_interactive.png"/> 
    374       </label></td> 
    375     </tr> 
    376     <tr class="property"> 
    377       <td> 
    378         <label for="reddit_community">{'Community'|@translate}</label> 
    379       </td> 
    380       <td> 
    381         <input type="text" id="reddit_community" name="reddit[community]" value="{$reddit.community}"/> 
    382       </td> 
    383     </tr> 
    384   </tbody> 
    385 </table> 
    386 </div> {* <!-- tumblr --> *} 
     355<div class="socialbutt {if not $pinterest.enabled}disabled{else}enabled{/if}"> {* <!-- pinterest --> *} 
     356<table> 
     357  <thead> 
     358    <tr><td colspan="2"> 
     359      <label title="{if $pinterest.enabled}{'Disable'|@translate}{else}{'Enable'|@translate}{/if}"> 
     360        <img src="{$SOCIALBUTT_PATH}template/images/pinterest_logo.png"/> 
     361        <input class="enable" style="display:none;" type="checkbox" name="pinterest[enabled]" {if $pinterest.enabled}checked="checked"{/if}/> 
     362      </label> 
     363    </td></tr> 
     364  </thead> 
     365  <tbody> 
     366    <tr class="property not-light"> 
     367      <td> 
     368        {'Annotation'|@translate} 
     369      </td> 
     370      <td> 
     371        <label><input type="radio" name="pinterest[layout]" value="none" {if $pinterest.layout=='none'}checked="checked"{/if}/> {'None'|@translate}</label><br> 
     372        <label><input type="radio" name="pinterest[layout]" value="horizontal" {if $pinterest.layout=='horizontal'}checked="checked"{/if}/> {'Right bubble'|@translate}</label><br> 
     373        <label><input type="radio" name="pinterest[layout]" value="vertical" {if $pinterest.layout=='vertical'}checked="checked"{/if}/> {'Top bubble'|@translate}</label> 
     374      </td> 
     375    </tr> 
     376  </tbody> 
     377</table> 
     378</div> {* <!-- pinterest --> *} 
    387379 
    388380<br> 
  • extensions/SocialButtons/template/facebook.tpl

    r24757 r24788  
    11{strip} 
    22{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> 
     3  {if $SOCIALBUTT.basename=='picture'} 
     4    <a href="http://www.facebook.com/sharer.php?s=100&p[url]={$SOCIALBUTT.share_url|urlencode}&p[title]={$PAGE_TITLE|cat:' | '|cat:$GALLERY_TITLE|urlencode}&p[summary]={$COMMENT_IMG|cat:$SOCIALBUTT.copyright|urlencode}&p[images][0]={$SOCIALBUTT.source|urlencode}" 
     5  {else} 
     6    <a href="http://www.facebook.com/sharer.php?s=100&p[url]={$SOCIALBUTT.share_url|urlencode}&p[title]={$PAGE_TITLE|cat:' | '|cat:$GALLERY_TITLE|urlencode}&p[summary]={$CONTENT_DESCRIPTION|cat:$SOCIALBUTT.copyright|urlencode}" 
     7  {/if} 
     8    onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=500,width=500');return false;" target="_blank"  rel="nofollow"> 
     9    <img src="{$ROOT_PATH}{$SOCIALBUTT_PATH}template/images/facebook_{$SOCIALBUTT.FACEBOOK.color}.png" alt="Share on Facebook"></a> 
    610{else} 
    7 {footer_script}jQuery('body').prepend('<div id="fb-root"></div>');{/footer_script} 
    8 {combine_script id='facebook_jssdk' load='footer' path='https://connect.facebook.net/'|cat:$SOCIALBUTT.FACEBOOK.lang|cat:'/all.js#xfbml=1'} 
    9 <div style="display:inline-block;" class="fb-like" data-send="false" data-show-faces="false"  
    10   data-href="{$SOCIALBUTT.share_url}" data-layout="{$SOCIALBUTT.FACEBOOK.layout}" data-colorscheme="{$SOCIALBUTT.FACEBOOK.color}"></div> 
     11  {footer_script}jQuery('body').prepend('<div id="fb-root"></div>');{/footer_script} 
     12  {combine_script id='facebook_jssdk' load='footer' path='https://connect.facebook.net/'|cat:$SOCIALBUTT.FACEBOOK.lang|cat:'/all.js#xfbml=1'} 
     13  <div style="display:inline-block;" class="fb-like" data-send="false" data-show-faces="false"  
     14    data-href="{$SOCIALBUTT.share_url}" data-layout="{$SOCIALBUTT.FACEBOOK.layout}" data-colorscheme="{$SOCIALBUTT.FACEBOOK.color}"></div> 
    1115{/if} 
    1216{/strip} 
  • extensions/SocialButtons/template/google.tpl

    r24757 r24788  
    11{strip} 
    22{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> 
     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> 
    66{else} 
    7 {combine_script id='google_plusone' load='footer' path='https://apis.google.com/js/plusone.js'} 
    8 <script type="text/javascript">window.___gcfg = {ldelim}lang: '{$SOCIALBUTT.GOOGLE.lang}'};</script> 
    9 <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> 
     7  {combine_script id='google_plusone' load='footer' path='https://apis.google.com/js/plusone.js'} 
     8  <script type="text/javascript">window.___gcfg = {ldelim}lang: '{$SOCIALBUTT.GOOGLE.lang}'};</script> 
     9  <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> 
    1010{/if} 
    1111{/strip} 
  • extensions/SocialButtons/template/pinterest.tpl

    r24757 r24788  
    11{strip} 
    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" 
     2<a href="http://pinterest.com/pin/create/button/?url={$SOCIALBUTT.share_url|urlencode}&media={$SOCIALBUTT.source|urlencode}&description={$PAGE_TITLE|cat:' '|cat:$SOCIALBUTT.copyright|urlencode}" rel="nofollow" 
    33{if $SOCIALBUTT.light} 
    44  onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=470,width=600');return false;" target="_blank" 
  • extensions/SocialButtons/template/reddit.tpl

    r24758 r24788  
    11{strip} 
    22{if not $SOCIALBUTT.light && $SOCIALBUTT.REDDIT.type == 'interactive'} 
    3 <script type="text/javascript"> 
    4 reddit_url = "{$SOCIALBUTT.share_url|escape:javascript}"; 
    5 reddit_title = "{$PAGE_TITLE|cat:' | '|cat:$GALLERY_TITLE|escape:javascript}"; 
    6 reddit_target = "{$SOCIALBUTT.REDDIT.community|escape:javascript}"; 
    7 reddit_newwindow = 1; 
    8 </script> 
    9 <script type="text/javascript" src="http://{$SOCIALBUTT.REDDIT.lang}.reddit.com/static/button/button1.js"></script> 
     3  <script type="text/javascript"> 
     4  reddit_url = "{$SOCIALBUTT.share_url|escape:javascript}"; 
     5  reddit_title = "{$PAGE_TITLE|cat:' | '|cat:$GALLERY_TITLE|escape:javascript}"; 
     6  reddit_target = "{$SOCIALBUTT.REDDIT.community|escape:javascript}"; 
     7  reddit_newwindow = 1; 
     8  </script> 
     9  <script type="text/javascript" src="http://{$SOCIALBUTT.REDDIT.lang}.reddit.com/static/button/button1.js"></script> 
    1010{else} 
    11 <a href="http://{$SOCIALBUTT.REDDIT.lang}.reddit.com/submit?url={$SOCIALBUTT.share_url|urlencode}&title={$PAGE_TITLE|cat:' | '|cat:$GALLERY_TITLE|urlencode}&target={$SOCIALBUTT.REDDIT.community|urlencode}" rel="nofollow" target="_blank"> 
    12   <img src="http://www.reddit.com/static/{$SOCIALBUTT.REDDIT.type}.gif" alt="Submit to reddit"></a> 
     11  <a href="http://{$SOCIALBUTT.REDDIT.lang}.reddit.com/submit?url={$SOCIALBUTT.share_url|urlencode}&title={$PAGE_TITLE|cat:' | '|cat:$GALLERY_TITLE|urlencode}&target={$SOCIALBUTT.REDDIT.community|urlencode}" rel="nofollow" target="_blank"> 
     12    <img src="http://www.reddit.com/static/{$SOCIALBUTT.REDDIT.type}.gif" alt="Submit to reddit"></a> 
    1313{/if} 
    1414{/strip} 
  • extensions/SocialButtons/template/tumblr.tpl

    r24757 r24788  
    11{strip} 
    2 {if $SOCIALBUTT.TUMBLR.mode=='photo'} 
    3 {capture assign="inline_tags"}{foreach from=$related_tags item=tag name=tag_loop}{if !$smarty.foreach.tag_loop.first},{/if}{$tag.name}{/foreach}{/capture} 
    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"  
     2{if $SOCIALBUTT.basename=='picture'} 
     3  {capture assign="inline_tags"}{foreach from=$related_tags item=tag name=tag_loop}{if !$smarty.foreach.tag_loop.first},{/if}{$tag.name}{/foreach}{/capture} 
     4  <a href="http://www.tumblr.com/share/photo?source={$SOCIALBUTT.source|urlencode}&caption={$PAGE_TITLE|cat:' '|cat:$SOCIALBUTT.copyright|urlencode}&clickthru={$SOCIALBUTT.share_url|urlencode}&tags={$inline_tags|urlencode}" 
    55{else} 
    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"  
     6  <a href="http://www.tumblr.com/share/link?url={$SOCIALBUTT.share_url|urlencode}&name={$PAGE_TITLE|cat:' | '|cat:$GALLERY_TITLE|urlencode}&description={$CONTENT_DESCRIPTION|cat:$SOCIALBUTT.copyright|urlencode}" 
    77{/if} 
    88{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" 
     9  onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=430,width=500');return false;" target="_blank" rel="nofollow"  
    1010{else} 
    1111  {combine_script id='tumblr_share' load='footer' path='http://platform.tumblr.com/v1/share.js'} 
Note: See TracChangeset for help on using the changeset viewer.