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/include
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • extensions/SocialButtons/include/install.inc.php

    r23201 r24757  
    1111      'position' => 'toolbar',
    1212      'on_index' => true,
     13      'light' => false,
    1314      'twitter' => array(
    1415        'enabled' => true,
     
    4243    {
    4344      $temp = is_string($conf['TumblrShare']) ? unserialize($conf['TumblrShare']) : $conf['TumblrShare'];
    44       $default_config['tumblr']['type'] = $temp['type'];
    45       $default_config['tumblr']['img_size'] = $temp['img_size'];
     45      if (!empty($temp['type']))      $default_config['tumblr']['type'] =    $temp['type'];
     46      if (!empty($temp['img_size']))  $default_config['tumblr']['img_size'] = $temp['img_size'];
    4647    }
    4748    if (isset($conf['TweetThis']))
    4849    {
    4950      $temp = is_string($conf['TweetThis']) ? unserialize($conf['TweetThis']) : $conf['TweetThis'];
    50       $default_config['twitter']['size'] = $temp['size'];
    51       $default_config['twitter']['count'] = $temp['count'] ? 'bubble' : 'none';
    52       $default_config['twitter']['via'] = $temp['via'];
     51      if (!empty($temp['type']))  $default_config['twitter']['size'] = $temp['size'];
     52      if (!empty($temp['count'])) $default_config['twitter']['count'] = $temp['count'] ? 'bubble' : 'none';
     53      if (!empty($temp['via']))   $default_config['twitter']['via'] =  $temp['via'];
    5354    }
    5455    if (isset($conf['GooglePlusOne']))
    5556    {
    5657      $temp = is_string($conf['GooglePlusOne']) ? unserialize($conf['GooglePlusOne']) : $conf['GooglePlusOne'];
    57       $default_config['google']['size'] = $temp['size'];
    58       $default_config['google']['annotation'] = $temp['annotation'];
     58      if (!empty($temp['size']))        $default_config['google']['size'] =      $temp['size'];
     59      if (!empty($temp['annotation']))  $default_config['google']['annotation'] = $temp['annotation'];
    5960    }
    6061   
     
    6465  else
    6566  {
    66     $new_conf = unserialize($conf['SocialButtons']);
     67    $new_conf = is_string($conf['SocialButtons']) ? unserialize($conf['SocialButtons']) : $conf['SocialButtons'];
    6768   
    6869    if (empty($new_conf['pinterest']))
     
    7475        );
    7576    }
     77   
    7678    if (!isset($new_conf['on_index']))
    7779    {
     
    8486    }
    8587   
     88    if (!isset($new_conf['light']))
     89    {
     90      $new_conf['light'] = false;
     91    }
     92   
    8693    $conf['SocialButtons'] = serialize($new_conf);
    8794    conf_update_param('SocialButtons', $conf['SocialButtons']);
  • extensions/SocialButtons/include/pinterest.inc.php

    r23202 r24757  
    44function socialbutt_pinterest($basename, $root_url, &$tpl_vars, &$buttons)
    55{
    6   // only on piture page
     6  // only on picture page
    77  if ($basename != 'picture')
    88  {
  • extensions/SocialButtons/include/twitter.inc.php

    r20374 r24757  
    66  global $conf, $template, $user;
    77 
    8  $twitter_langs = array(
     8  $twitter_langs = array(
    99    'fr','en','ar','ja','es','de','it','id','pt','ko','tr','ru','nl','fil','msa','zh-tw',
    1010    'zh-cn','hi','no','sv','fi','da','pl','hu','fa','he','ur','th','uk','ca','el','eu','cs'
Note: See TracChangeset for help on using the changeset viewer.