Changeset 26100


Ignore:
Timestamp:
Dec 23, 2013, 12:44:02 AM (7 years ago)
Author:
mistic100
Message:

update for Piwigo 2.6 and update Facebook options

Location:
extensions/SocialButtons
Files:
1 added
2 deleted
7 edited

Legend:

Unmodified
Added
Removed
  • extensions/SocialButtons/admin.php

    r25178 r26100  
    3131    'facebook' => array(
    3232      'enabled' => isset($_POST['facebook']['enabled']),
    33       'color' => $_POST['facebook']['color'],
    3433      'layout' => $_POST['facebook']['layout'],
    3534      ),
     
    5049 
    5150  conf_update_param('SocialButtons', serialize($conf['SocialButtons']));
    52   array_push($page['infos'], l10n('Information data registered in database'));
     51  $page['infos'][] = l10n('Information data registered in database');
    5352 
    5453  // the prefilter changes, we must delete compiled templatess
  • extensions/SocialButtons/main.inc.php

    r25473 r26100  
    1111defined('PHPWG_ROOT_PATH') or die('Hacking attempt!');
    1212
    13 global $prefixeTable;
    14 
    1513// +-----------------------------------------------------------------------+
    1614// | Define plugin constants                                               |
    1715// +-----------------------------------------------------------------------+
    18 defined('SOCIALBUTT_ID') or define('SOCIALBUTT_ID', basename(dirname(__FILE__)));
     16define('SOCIALBUTT_ID',      basename(dirname(__FILE__)));
    1917define('SOCIALBUTT_PATH' ,   PHPWG_PLUGINS_PATH . SOCIALBUTT_ID . '/');
    2018define('SOCIALBUTT_ADMIN',   get_root_url() . 'admin.php?page=plugin-' . SOCIALBUTT_ID);
     
    3432  function socialbutt_admin_plugin_menu_links($menu)
    3533  {
    36     array_push($menu, array(
     34    $menu[] = array(
    3735      'NAME' => 'Social Buttons',
    3836      'URL' => SOCIALBUTT_ADMIN,
    39     ));
     37      );
    4038    return $menu;
    4139  }
     
    5452{
    5553  global $conf, $pwg_loaded_plugins;
    56  
    57   // apply upgrade if needed
    58   if (
    59     SOCIALBUTT_VERSION == 'auto' or
    60     $pwg_loaded_plugins[SOCIALBUTT_ID]['version'] == 'auto' or
    61     version_compare($pwg_loaded_plugins[SOCIALBUTT_ID]['version'], SOCIALBUTT_VERSION, '<')
    62   )
    63   {
    64     // call install function
    65     include_once(SOCIALBUTT_PATH . 'include/install.inc.php');
    66     socialbutt_install();
    67    
    68     // update plugin version in database
    69     if ( $pwg_loaded_plugins[SOCIALBUTT_ID]['version'] != 'auto' and SOCIALBUTT_VERSION != 'auto' )
    70     {
    71       $query = '
    72 UPDATE '. PLUGINS_TABLE .'
    73 SET version = "'. SOCIALBUTT_VERSION .'"
    74 WHERE id = "'. SOCIALBUTT_ID .'"';
    75       pwg_query($query);
    76      
    77       $pwg_loaded_plugins[SOCIALBUTT_ID]['version'] = SOCIALBUTT_VERSION;
    78      
    79       if (defined('IN_ADMIN'))
    80       {
    81         $_SESSION['page_infos'][] = 'Social Buttons updated to version '. SOCIALBUTT_VERSION;
    82       }
    83     }
    84   }
    85  
    86   // prepare plugin configuration
     54
     55  include_once(SOCIALBUTT_PATH . 'maintain.inc.php');
     56  $maintain = new SocialButtons_maintain(SOCIALBUTT_ID);
     57  $maintain->autoUpdate(SOCIALBUTT_VERSION, 'install');
     58
    8759  $conf['SocialButtons'] = unserialize($conf['SocialButtons']);
    8860}
     
    147119    if ($conf['SocialButtons'][$service]['enabled'])
    148120    {
     121      if ($service=='pinterest' && $basename!='picture')
     122      {
     123        continue;
     124      }
    149125      include_once(SOCIALBUTT_PATH . 'include/'. $service .'.inc.php');
    150126      call_user_func_array('socialbutt_'.$service, array($basename, $root_url, &$tpl_vars, &$buttons));
  • extensions/SocialButtons/maintain.inc.php

    r24757 r26100  
    22defined('PHPWG_ROOT_PATH') or die('Hacking attempt!');
    33
    4 defined('SOCIALBUTT_ID') or define('SOCIALBUTT_ID', basename(dirname(__FILE__)));
    5 include_once(PHPWG_PLUGINS_PATH . SOCIALBUTT_ID . '/include/install.inc.php');
     4class SocialButtons_maintain extends PluginMaintain
     5{
     6  private $installed = false;
     7 
     8  private $default_config = array(
     9    'position' => 'toolbar',
     10    'on_index' => true,
     11    'img_size' => 'Original',
     12    'light' => false,
     13    'twitter' => array(
     14      'enabled' => true,
     15      'size' => 'small',
     16      'count' => 'bubble',
     17      'via' => null,
     18      ),
     19    'google' => array(
     20      'enabled' => true,
     21      'size' => 'medium',
     22      'annotation' => 'bubble',
     23      ),
     24    'tumblr' => array(
     25      'enabled' => true,
     26      'type' => 'share_1',
     27      ),
     28    'facebook' => array(
     29      'enabled' => true,
     30      'color' => 'light',
     31      'layout' => 'button_count',
     32      ),
     33    'pinterest' => array(
     34      'enabled' => true,
     35      'layout' => 'horizontal',
     36      ),
     37    'reddit' => array(
     38      'enabled' => true,
     39      'type' => 'interactive',
     40      'community' => null,
     41      ),
     42    'linkedin' => array(
     43      'enabled' => true,
     44      'counter' => 'right',
     45      ),
     46    );
    647
     48  function install($plugin_version, &$errors=array())
     49  {
     50    if (empty($conf['SocialButtons']))
     51    {
     52      if (isset($conf['TumblrShare']))
     53      {
     54        $temp = is_string($conf['TumblrShare']) ? unserialize($conf['TumblrShare']) : $conf['TumblrShare'];
     55        if (!empty($temp['type']))      $this->default_config['tumblr']['type'] = $temp['type'];
     56        if (!empty($temp['img_size']))  $this->default_config['img_size'] =       $temp['img_size'];
     57      }
     58      if (isset($conf['TweetThis']))
     59      {
     60        $temp = is_string($conf['TweetThis']) ? unserialize($conf['TweetThis']) : $conf['TweetThis'];
     61        if (!empty($temp['type']))  $this->default_config['twitter']['size'] =  $temp['size'];
     62        if (!empty($temp['count'])) $this->default_config['twitter']['count'] = $temp['count'] ? 'bubble' : 'none';
     63        if (!empty($temp['via']))   $this->default_config['twitter']['via'] =   $temp['via'];
     64      }
     65      if (isset($conf['GooglePlusOne']))
     66      {
     67        $temp = is_string($conf['GooglePlusOne']) ? unserialize($conf['GooglePlusOne']) : $conf['GooglePlusOne'];
     68        if (!empty($temp['size']))        $this->default_config['google']['size'] =       $temp['size'];
     69        if (!empty($temp['annotation']))  $this->default_config['google']['annotation'] = $temp['annotation'];
     70      }
     71     
     72      $conf['SocialButtons'] = serialize($this->default_config);
     73      conf_update_param('SocialButtons', $conf['SocialButtons']);
     74    }
     75    else
     76    {
     77      $new_conf = is_string($conf['SocialButtons']) ? unserialize($conf['SocialButtons']) : $conf['SocialButtons'];
     78     
     79      if (empty($new_conf['pinterest']))
     80      {
     81        $new_conf['pinterest'] = array(
     82          'enabled' => true,
     83          'layout' => 'horizontal',
     84          );
     85      }
     86     
     87      if (empty($new_conf['reddit']))
     88      {
     89        $new_conf['reddit'] = array(
     90          'enabled' => false,
     91          'type' => 'interactive',
     92          'community' => null,
     93          );
     94      }
     95     
     96      if (empty($new_conf['linkedin']))
     97      {
     98        $new_conf['linkedin'] = array(
     99          'enabled' => false,
     100          'counter' => 'right',
     101          );
     102      }
     103     
     104      if (!isset($new_conf['on_index']))
     105      {
     106        $new_conf['on_index'] = true;
     107      }
     108     
     109      if ($new_conf['facebook']['layout'] == 'none')
     110      {
     111        $new_conf['facebook']['layout'] = 'button_count';
     112      }
     113     
     114      if (!isset($new_conf['light']))
     115      {
     116        $new_conf['light'] = false;
     117      }
     118     
     119      if (!isset($new_conf['img_size']))
     120      {
     121        $new_conf['img_size'] = isset($new_conf['tumblr']['img_size']) ? $new_conf['tumblr']['img_size'] : 'Original';
     122        unset($new_conf['tumblr']['img_size'], $new_conf['pinterest']['img_size']);
     123      }
     124     
     125      $conf['SocialButtons'] = serialize($new_conf);
     126      conf_update_param('SocialButtons', $conf['SocialButtons']);
     127    }
    7128
    8 function plugin_install()
    9 {
    10   socialbutt_install();
    11   define('socialbutt_installed', true);
    12 }
     129    $this->installed = true;
     130  }
    13131
     132  function activate($plugin_version, &$errors=array())
     133  {
     134    if (!$this->installed)
     135    {
     136      $this->install($plugin_version, $errors);
     137    }
     138  }
    14139
    15 function plugin_activate()
    16 {
    17   if (!defined('socialbutt_installed'))
     140  function deactivate()
    18141  {
    19     socialbutt_install();
     142  }
     143
     144  function uninstall()
     145  {
     146    conf_delete_param('SocialButtons');
    20147  }
    21148}
    22149
    23 
    24 function plugin_uninstall()
    25 {
    26   global $conf;
    27  
    28   pwg_query('DELETE FROM `'. CONFIG_TABLE .'` WHERE param = "SocialButtons";');
    29   unset($conf['SocialButtons']);
    30 }
    31 
    32150?>
  • extensions/SocialButtons/template/admin.tpl

    r25178 r26100  
    11{combine_css path=$SOCIALBUTT_PATH|@cat:"template/style.css"}
    22
    3 {html_style}{literal}
     3{html_style}
    44.socialbutt.disabled thead img {
    55  -webkit-filter: grayscale(100%); /* Chrome 19+ & Safari 6+ */
     
    77  filter: gray; /* IE6-9 */
    88}
    9 {/literal}
    109{if $light}
    11 .not-light {ldelim} display:none; }
     10.not-light { display:none; }
    1211{/if}
    1312{/html_style}
    1413
    15 {footer_script}{literal}
     14{footer_script}
    1615jQuery("input.enable").change(function() {
    1716  $parent = $(this).closest("div.socialbutt");
    1817  if (!$(this).is(":checked")) {
    19     $parent.find("thead label").attr("title", "{/literal}{'Enable'|@translate|escape:javascript}{literal}");
     18    $parent.find("thead label").attr("title", "{'Enable'|translate|escape:javascript}");
    2019    $parent.addClass('disabled');
    2120    $parent.removeClass('enabled');
    2221  }
    2322  else {
    24     $parent.find("thead label").attr("title", "{/literal}{'Disable'|@translate|escape:javascript}{literal}");
     23    $parent.find("thead label").attr("title", "{'Disable'|translate|escape:javascript}");
    2524    $parent.addClass('enabled');
    2625    $parent.removeClass('disabled');
     
    4443  defaultPosition: 'bottom'
    4544});
    46 {/literal}{/footer_script}
     45{/footer_script}
    4746
    4847
     
    5857  <tr class="property">
    5958    <td>
    60       {'Button position on picture page'|@translate}
    61     </td>
    62     <td>
    63       <label><input type="radio" name="position" value="top" {if $position=='top'}checked="checked"{/if}/> {'Top'|@translate}</label>
    64       <label><input type="radio" name="position" value="bottom" {if $position=='bottom'}checked="checked"{/if}/> {'Bottom'|@translate}</label>
    65       <label><input type="radio" name="position" value="toolbar" {if $position=='toolbar'}checked="checked"{/if}/> {'Toolbar'|@translate}</label>
     59      {'Button position on picture page'|translate}
     60    </td>
     61    <td>
     62      <label><input type="radio" name="position" value="top" {if $position=='top'}checked="checked"{/if}/> {'Top'|translate}</label>
     63      <label><input type="radio" name="position" value="bottom" {if $position=='bottom'}checked="checked"{/if}/> {'Bottom'|translate}</label>
     64      <label><input type="radio" name="position" value="toolbar" {if $position=='toolbar'}checked="checked"{/if}/> {'Toolbar'|translate}</label>
    6665    </td>
    6766  </tr>
    6867  <tr class="property">
    6968    <td>
    70       {'Display buttons'|@translate}
    71     </td>
    72     <td>
    73       <label><input type="radio" name="on_index" value="true" {if $on_index}checked="checked"{/if}/> {'on photo and album'|@translate}</label><br>
    74       <label><input type="radio" name="on_index" value="false" {if not $on_index}checked="checked"{/if}/> {'only on photo'|@translate}</label>
     69      {'Display buttons'|translate}
     70    </td>
     71    <td>
     72      <label><input type="radio" name="on_index" value="true" {if $on_index}checked="checked"{/if}/> {'on photo and album'|translate}</label><br>
     73      <label><input type="radio" name="on_index" value="false" {if not $on_index}checked="checked"{/if}/> {'only on photo'|translate}</label>
    7574    </td>
    7675  </tr>
    7776  <tr class="property">
    7877    <td>
    79       {'Shared picture size'|@translate}
     78      {'Shared picture size'|translate}
    8079    </td>
    8180    <td>
     
    8584  <tr class="property">
    8685    <td>
    87       <label for="light_mode">{'Light mode'|@translate}</label>
     86      <label for="light_mode">{'Light mode'|translate}</label>
    8887    </td>
    8988    <td>
    9089      <input type="checkbox" id="light_mode" name="light" {if $light}checked="checked"{/if}/>
    91       <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>
     90      <a class="icon-info-circled-1 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}"></a>
    9291    </td>
    9392  </tr>
     
    102101  <thead>
    103102    <tr><td colspan="2">
    104       <label title="{if $twitter.enabled}{'Disable'|@translate}{else}{'Enable'|@translate}{/if}">
     103      <label title="{if $twitter.enabled}{'Disable'|translate}{else}{'Enable'|translate}{/if}">
    105104        <img src="{$SOCIALBUTT_PATH}template/images/twitter_logo.png"/>
    106105        <input class="enable" style="display:none;" type="checkbox" name="twitter[enabled]" {if $twitter.enabled}checked="checked"{/if}/>
     
    111110    <tr class="property">
    112111      <td>
    113         {'Button type'|@translate}
     112        {'Button type'|translate}
    114113      </td>
    115114      <td></td>
     
    127126    <tr class="property not-light">
    128127      <td>
    129         {'Annotation'|@translate}
    130       </td>
    131       <td>
    132         <label><input type="radio" name="twitter[count]" value="none" {if $twitter.count=='none'}checked="checked"{/if}/> {'None'|@translate}</label><br>
    133         <label><input type="radio" name="twitter[count]" value="bubble" {if $twitter.count=='bubble'}checked="checked"{/if}/> {'Bubble'|@translate}</label><br>
    134       </td>
    135     </tr>
    136     <tr class="property">
    137       <td>
    138         <label for="twitter_via">{'Via'|@translate}</label>
     128        {'Annotation'|translate}
     129      </td>
     130      <td>
     131        <label><input type="radio" name="twitter[count]" value="none" {if $twitter.count=='none'}checked="checked"{/if}/> {'None'|translate}</label><br>
     132        <label><input type="radio" name="twitter[count]" value="bubble" {if $twitter.count=='bubble'}checked="checked"{/if}/> {'Bubble'|translate}</label><br>
     133      </td>
     134    </tr>
     135    <tr class="property">
     136      <td>
     137        <label for="twitter_via">{'Via'|translate}</label>
    139138      </td>
    140139      <td>
     
    150149  <thead>
    151150    <tr><td colspan="2">
    152       <label title="{if $google.enabled}{'Disable'|@translate}{else}{'Enable'|@translate}{/if}">
     151      <label title="{if $google.enabled}{'Disable'|translate}{else}{'Enable'|translate}{/if}">
    153152        <img src="{$SOCIALBUTT_PATH}template/images/google_logo.png"/>
    154153        <input class="enable" style="display:none;" type="checkbox" name="google[enabled]" {if $google.enabled}checked="checked"{/if}/>
     
    159158    <tr class="property">
    160159      <td>
    161         {'Button type'|@translate}
     160        {'Button type'|translate}
    162161      </td>
    163162      <td></td>
     
    185184    <tr class="property not-light">
    186185      <td>
    187         {'Annotation'|@translate}
    188       </td>
    189       <td>
    190         <label><input type="radio" name="google[annotation]" value="none" {if $google.annotation=='none'}checked="checked"{/if}/> {'None'|@translate}</label><br>
    191         <label><input type="radio" name="google[annotation]" value="bubble" {if $google.annotation=='bubble'}checked="checked"{/if}/> {'Bubble'|@translate}</label><br>
    192         <label><input type="radio" name="google[annotation]" value="inline" {if $google.annotation=='inline'}checked="checked"{/if}/> {'Inline text'|@translate}</label>
     186        {'Annotation'|translate}
     187      </td>
     188      <td>
     189        <label><input type="radio" name="google[annotation]" value="none" {if $google.annotation=='none'}checked="checked"{/if}/> {'None'|translate}</label><br>
     190        <label><input type="radio" name="google[annotation]" value="bubble" {if $google.annotation=='bubble'}checked="checked"{/if}/> {'Bubble'|translate}</label><br>
     191        <label><input type="radio" name="google[annotation]" value="inline" {if $google.annotation=='inline'}checked="checked"{/if}/> {'Inline text'|translate}</label>
    193192      </td>
    194193    </tr>
     
    203202  <thead>
    204203    <tr><td colspan="2">
    205       <label title="{if $facebook.enabled}{'Disable'|@translate}{else}{'Enable'|@translate}{/if}">
     204      <label title="{if $facebook.enabled}{'Disable'|translate}{else}{'Enable'|translate}{/if}">
    206205        <img src="{$SOCIALBUTT_PATH}template/images/facebook_logo.png"/>
    207206        <input class="enable" style="display:none;" type="checkbox" name="facebook[enabled]" {if $facebook.enabled}checked="checked"{/if}/>
     
    210209  </thead>
    211210  <tbody>
    212     <tr class="property">
    213       <td>
    214         {'Button type'|@translate}
     211    <tr class="property not-light">
     212      <td>
     213        {'Annotation'|translate}
     214      </td>
     215      <td>
     216        <!-- <label><input type="radio" name="facebook[layout]" value="none" {if $facebook.layout=='none'}checked="checked"{/if}/> {'None'|translate}</label><br> -->
     217        <label><input type="radio" name="facebook[layout]" value="button_count" {if $facebook.layout=='button_count'}checked="checked"{/if}/> {'Right bubble'|translate}</label><br>
     218        <label><input type="radio" name="facebook[layout]" value="box_count" {if $facebook.layout=='box_count'}checked="checked"{/if}/> {'Top bubble'|translate}</label><br>
     219        <label><input type="radio" name="facebook[layout]" value="standard" {if $facebook.layout=='standard'}checked="checked"{/if}/> {'Inline text'|translate}</label>
     220      </td>
     221    </tr>
     222  </tbody>
     223</table>
     224</div> {* <!-- facebook --> *}
     225
     226<div class="socialbutt {if not $pinterest.enabled}disabled{else}enabled{/if}"> {* <!-- pinterest --> *}
     227<table>
     228  <thead>
     229    <tr><td colspan="2">
     230      <label title="{if $pinterest.enabled}{'Disable'|translate}{else}{'Enable'|translate}{/if}">
     231        <img src="{$SOCIALBUTT_PATH}template/images/pinterest_logo.png"/>
     232        <input class="enable" style="display:none;" type="checkbox" name="pinterest[enabled]" {if $pinterest.enabled}checked="checked"{/if}/>
     233      </label>
     234    </td></tr>
     235  </thead>
     236  <tbody>
     237    <tr class="property not-light">
     238      <td>
     239        {'Annotation'|translate}
     240      </td>
     241      <td>
     242        <label><input type="radio" name="pinterest[layout]" value="none" {if $pinterest.layout=='none'}checked="checked"{/if}/> {'None'|translate}</label><br>
     243        <label><input type="radio" name="pinterest[layout]" value="horizontal" {if $pinterest.layout=='horizontal'}checked="checked"{/if}/> {'Right bubble'|translate}</label><br>
     244        <label><input type="radio" name="pinterest[layout]" value="vertical" {if $pinterest.layout=='vertical'}checked="checked"{/if}/> {'Top bubble'|translate}</label>
     245      </td>
     246    </tr>
     247  </tbody>
     248</table>
     249</div> {* <!-- pinterest --> *}
     250
     251<br>
     252
     253<div class="socialbutt {if not $tumblr.enabled}disabled{else}enabled{/if}"> {* <!-- tumblr --> *}
     254<table>
     255  <thead>
     256    <tr><td colspan="2">
     257      <label title="{if $tumblr.enabled}{'Disable'|translate}{else}{'Enable'|translate}{/if}">
     258        <img src="{$SOCIALBUTT_PATH}template/images/tumblr_logo.png"/>
     259        <input class="enable" style="display:none;" type="checkbox" name="tumblr[enabled]" {if $tumblr.enabled}checked="checked"{/if}/>
     260      </label>
     261    </td></tr>
     262  </thead>
     263  <tbody>
     264    <tr class="property">
     265      <td>
     266        {'Button type'|translate}
    215267      </td>
    216268      <td></td>
     
    218270    <tr class="button">
    219271      <td><label>
    220         <img src="{$SOCIALBUTT_PATH}template/images/facebook_light.png"/>
    221         <input type="radio" name="facebook[color]" value="light" {if $facebook.color=='light'}checked="checked"{/if}/>
    222       </label></td>
    223       <td><label>
    224         <input type="radio" name="facebook[color]" value="dark" {if $facebook.color=='dark'}checked="checked"{/if}/>
    225         <img src="{$SOCIALBUTT_PATH}template/images/facebook_dark.png"/>
    226       </label></td>
    227     </tr>
    228     <tr class="property not-light">
    229       <td>
    230         {'Annotation'|@translate}
    231       </td>
    232       <td>
    233         <!-- <label><input type="radio" name="facebook[layout]" value="none" {if $facebook.layout=='none'}checked="checked"{/if}/> {'None'|@translate}</label><br> -->
    234         <label><input type="radio" name="facebook[layout]" value="button_count" {if $facebook.layout=='button_count'}checked="checked"{/if}/> {'Right bubble'|@translate}</label><br>
    235         <label><input type="radio" name="facebook[layout]" value="box_count" {if $facebook.layout=='box_count'}checked="checked"{/if}/> {'Top bubble'|@translate}</label><br>
    236         <label><input type="radio" name="facebook[layout]" value="standard" {if $facebook.layout=='standard'}checked="checked"{/if}/> {'Inline text'|@translate}</label>
    237       </td>
    238     </tr>
    239   </tbody>
    240 </table>
    241 </div> {* <!-- facebook --> *}
     272        <img src="http://platform.tumblr.com/v1/share_1.png"/>
     273        <input type="radio" name="tumblr[type]" value="share_1" {if $tumblr.type=='share_1'}checked="checked"{/if}/>
     274      </label></td>
     275      <td><label>
     276        <input type="radio" name="tumblr[type]" value="share_1T" {if $tumblr.type=='share_1T'}checked="checked"{/if}/>
     277        <img src="http://platform.tumblr.com/v1/share_1T.png"/>
     278      </label></td>
     279    </tr>
     280    <tr class="button">
     281      <td><label>
     282        <img src="http://platform.tumblr.com/v1/share_2.png"/>
     283        <input type="radio" name="tumblr[type]" value="share_2" {if $tumblr.type=='share_2'}checked="checked"{/if}/>
     284      </label></td>
     285      <td><label>
     286        <input type="radio" name="tumblr[type]" value="share_2T" {if $tumblr.type=='share_2T'}checked="checked"{/if}/>
     287        <img src="http://platform.tumblr.com/v1/share_2T.png"/>
     288      </label></td>
     289    </tr>
     290    <tr class="button">
     291      <td><label>
     292        <img src="http://platform.tumblr.com/v1/share_3.png"/>
     293        <input type="radio" name="tumblr[type]" value="share_3" {if $tumblr.type=='share_3'}checked="checked"{/if}/>
     294      </label></td>
     295      <td><label>
     296        <input type="radio" name="tumblr[type]" value="share_3T" {if $tumblr.type=='share_3T'}checked="checked"{/if}/>
     297        <img src="http://platform.tumblr.com/v1/share_3T.png"/>
     298      </label></td>
     299    </tr>
     300    <tr class="button">
     301      <td><label>
     302        <img src="http://platform.tumblr.com/v1/share_4.png"/>
     303        <input type="radio" name="tumblr[type]" value="share_4" {if $tumblr.type=='share_4'}checked="checked"{/if}/>
     304      </label></td>
     305      <td><label>
     306        <input type="radio" name="tumblr[type]" value="share_4T" {if $tumblr.type=='share_4T'}checked="checked"{/if}/>
     307        <img src="http://platform.tumblr.com/v1/share_4T.png"/>
     308      </label></td>
     309    </tr>
     310  </tbody>
     311</table>
     312</div> {* <!-- tumblr --> *}
    242313
    243314<div class="socialbutt {if not $reddit.enabled}disabled{else}enabled{/if}"> {* <!-- reddit --> *}
     
    245316  <thead>
    246317    <tr><td colspan="2">
    247       <label title="{if $reddit.enabled}{'Disable'|@translate}{else}{'Enable'|@translate}{/if}">
     318      <label title="{if $reddit.enabled}{'Disable'|translate}{else}{'Enable'|translate}{/if}">
    248319        <img src="{$SOCIALBUTT_PATH}template/images/reddit_logo.png"/>
    249320        <input class="enable" style="display:none;" type="checkbox" name="reddit[enabled]" {if $reddit.enabled}checked="checked"{/if}/>
     
    254325    <tr class="property">
    255326      <td>
    256         {'Button type'|@translate}
     327        {'Button type'|translate}
    257328      </td>
    258329      <td></td>
     
    280351    <tr class="property">
    281352      <td>
    282         <label for="reddit_community">{'Community'|@translate}</label>
     353        <label for="reddit_community">{'Community'|translate}</label>
    283354      </td>
    284355      <td>
     
    290361</div> {* <!-- reddit --> *}
    291362
    292 <br>
    293 
    294 <div class="socialbutt {if not $tumblr.enabled}disabled{else}enabled{/if}"> {* <!-- tumblr --> *}
    295 <table>
    296   <thead>
    297     <tr><td colspan="2">
    298       <label title="{if $tumblr.enabled}{'Disable'|@translate}{else}{'Enable'|@translate}{/if}">
    299         <img src="{$SOCIALBUTT_PATH}template/images/tumblr_logo.png"/>
    300         <input class="enable" style="display:none;" type="checkbox" name="tumblr[enabled]" {if $tumblr.enabled}checked="checked"{/if}/>
    301       </label>
    302     </td></tr>
    303   </thead>
    304   <tbody>
    305     <tr class="property">
    306       <td>
    307         {'Button type'|@translate}
    308       </td>
    309       <td></td>
    310     </tr>
    311     <tr class="button">
    312       <td><label>
    313         <img src="http://platform.tumblr.com/v1/share_1.png"/>
    314         <input type="radio" name="tumblr[type]" value="share_1" {if $tumblr.type=='share_1'}checked="checked"{/if}/>
    315       </label></td>
    316       <td><label>
    317         <input type="radio" name="tumblr[type]" value="share_1T" {if $tumblr.type=='share_1T'}checked="checked"{/if}/>
    318         <img src="http://platform.tumblr.com/v1/share_1T.png"/>
    319       </label></td>
    320     </tr>
    321     <tr class="button">
    322       <td><label>
    323         <img src="http://platform.tumblr.com/v1/share_2.png"/>
    324         <input type="radio" name="tumblr[type]" value="share_2" {if $tumblr.type=='share_2'}checked="checked"{/if}/>
    325       </label></td>
    326       <td><label>
    327         <input type="radio" name="tumblr[type]" value="share_2T" {if $tumblr.type=='share_2T'}checked="checked"{/if}/>
    328         <img src="http://platform.tumblr.com/v1/share_2T.png"/>
    329       </label></td>
    330     </tr>
    331     <tr class="button">
    332       <td><label>
    333         <img src="http://platform.tumblr.com/v1/share_3.png"/>
    334         <input type="radio" name="tumblr[type]" value="share_3" {if $tumblr.type=='share_3'}checked="checked"{/if}/>
    335       </label></td>
    336       <td><label>
    337         <input type="radio" name="tumblr[type]" value="share_3T" {if $tumblr.type=='share_3T'}checked="checked"{/if}/>
    338         <img src="http://platform.tumblr.com/v1/share_3T.png"/>
    339       </label></td>
    340     </tr>
    341     <tr class="button">
    342       <td><label>
    343         <img src="http://platform.tumblr.com/v1/share_4.png"/>
    344         <input type="radio" name="tumblr[type]" value="share_4" {if $tumblr.type=='share_4'}checked="checked"{/if}/>
    345       </label></td>
    346       <td><label>
    347         <input type="radio" name="tumblr[type]" value="share_4T" {if $tumblr.type=='share_4T'}checked="checked"{/if}/>
    348         <img src="http://platform.tumblr.com/v1/share_4T.png"/>
    349       </label></td>
    350     </tr>
    351   </tbody>
    352 </table>
    353 </div> {* <!-- tumblr --> *}
    354 
    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 --> *}
    379 
    380363<div class="socialbutt {if not $linkedin.enabled}disabled{else}enabled{/if}"> {* <!-- linkedin --> *}
    381364<table>
    382365  <thead>
    383366    <tr><td colspan="2">
    384       <label title="{if $linkedin.enabled}{'Disable'|@translate}{else}{'Enable'|@translate}{/if}">
     367      <label title="{if $linkedin.enabled}{'Disable'|translate}{else}{'Enable'|translate}{/if}">
    385368        <img src="{$SOCIALBUTT_PATH}template/images/linkedin_logo.png"/>
    386369        <input class="enable" style="display:none;" type="checkbox" name="linkedin[enabled]" {if $linkedin.enabled}checked="checked"{/if}/>
     
    391374    <tr class="property not-light">
    392375      <td>
    393         {'Annotation'|@translate}
    394       </td>
    395       <td>
    396         <label><input type="radio" name="linkedin[counter]" value="none" {if $linkedin.counter=='none'}checked="checked"{/if}/> {'None'|@translate}</label><br>
    397         <label><input type="radio" name="linkedin[counter]" value="right" {if $linkedin.counter=='right'}checked="checked"{/if}/> {'Right bubble'|@translate}</label><br>
    398         <label><input type="radio" name="linkedin[counter]" value="top" {if $linkedin.counter=='top'}checked="checked"{/if}/> {'Top bubble'|@translate}</label>
     376        {'Annotation'|translate}
     377      </td>
     378      <td>
     379        <label><input type="radio" name="linkedin[counter]" value="none" {if $linkedin.counter=='none'}checked="checked"{/if}/> {'None'|translate}</label><br>
     380        <label><input type="radio" name="linkedin[counter]" value="right" {if $linkedin.counter=='right'}checked="checked"{/if}/> {'Right bubble'|translate}</label><br>
     381        <label><input type="radio" name="linkedin[counter]" value="top" {if $linkedin.counter=='top'}checked="checked"{/if}/> {'Top bubble'|translate}</label>
    399382      </td>
    400383    </tr>
     
    406389
    407390<div class="submit">
    408   <input type="submit" value="{'Save Settings'|@translate}" name="submit"/>
     391  <input type="submit" value="{'Save Settings'|translate}" name="submit"/>
    409392</div>
    410393
  • extensions/SocialButtons/template/facebook.tpl

    r25178 r26100  
    88  {/if}
    99    onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=500,width=500');return false;" target="_blank" rel="nofollow">
    10     <img src="{$ROOT_PATH}{$SOCIALBUTT_PATH}template/images/facebook_{$SOCIALBUTT.FACEBOOK.color}.png" alt="Facebook"></a>
     10    <img src="{$ROOT_PATH}{$SOCIALBUTT_PATH}template/images/facebook.png" alt="Facebook"></a>
    1111{else}
    12   {footer_script}jQuery('body').prepend('<div id="fb-root"></div>');{/footer_script}
     12  {footer_script require='jquery'}jQuery('body').prepend('<div id="fb-root"></div>');{/footer_script}
    1313  {combine_script id='facebook_jssdk' load='footer' path='https://connect.facebook.net/'|cat:$SOCIALBUTT.FACEBOOK.lang|cat:'/all.js#xfbml=1'}
    1414  <div style="display:inline-block;" class="fb-like" data-send="false" data-show-faces="false"
    15     data-href="{$SOCIALBUTT.share_url}" data-layout="{$SOCIALBUTT.FACEBOOK.layout}" data-colorscheme="{$SOCIALBUTT.FACEBOOK.color}"></div>
     15    data-href="{$SOCIALBUTT.share_url}" data-layout="{$SOCIALBUTT.FACEBOOK.layout}"></div>
    1616{/if}
    1717{/strip}
  • extensions/SocialButtons/template/linkedin.tpl

    r25178 r26100  
    66{else}
    77  {combine_script id='linkedin_share' load='footer' path='https://platform.linkedin.com/in.js'}
    8   <script type="text/javascript">lang: {$SOCIALBUTT.LINKEDIN.lang}</script>
     8  <script type="text/javascript">lang: '{$SOCIALBUTT.LINKEDIN.lang}'</script>
    99  <script type="IN/Share" data-url="{$SOCIALBUTT.share_url}" data-counter="{$SOCIALBUTT.TWITTER.counter}" data-title="{$PAGE_TITLE|cat:' | '|cat:$GALLERY_TITLE}"></script>
    1010{/if}
  • extensions/SocialButtons/template/style.css

    r24757 r26100  
    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 }
Note: See TracChangeset for help on using the changeset viewer.