Ignore:
Timestamp:
Oct 6, 2013, 9:05:18 PM (11 years ago)
Author:
mistic100
Message:

improve facebook light link and clean code & conf

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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']);
Note: See TracChangeset for help on using the changeset viewer.