Changeset 24788 for extensions/SocialButtons/include
- Timestamp:
- Oct 6, 2013, 9:05:18 PM (11 years ago)
- Location:
- extensions/SocialButtons/include
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/SocialButtons/include/install.inc.php
r24758 r24788 11 11 'position' => 'toolbar', 12 12 'on_index' => true, 13 'img_size' => 'Original', 13 14 'light' => false, 14 15 'twitter' => array( … … 26 27 'enabled' => true, 27 28 'type' => 'share_1', 28 'img_size' => 'Original',29 29 ), 30 30 'facebook' => array( … … 36 36 'enabled' => true, 37 37 'layout' => 'horizontal', 38 'img_size' => 'Original',39 38 ), 40 39 'reddit' => array( … … 48 47 { 49 48 $temp = is_string($conf['TumblrShare']) ? unserialize($conf['TumblrShare']) : $conf['TumblrShare']; 50 if (!empty($temp['type'])) $default_config['tumblr']['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']; 52 51 } 53 52 if (isset($conf['TweetThis'])) … … 77 76 'enabled' => true, 78 77 'layout' => 'horizontal', 79 'img_size' => 'Original',80 78 ); 81 79 } … … 105 103 } 106 104 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 107 111 $conf['SocialButtons'] = serialize($new_conf); 108 112 conf_update_param('SocialButtons', $conf['SocialButtons']); -
extensions/SocialButtons/include/pinterest.inc.php
r24757 r24788 10 10 } 11 11 12 global $conf, $template , $picture;12 global $conf, $template; 13 13 14 14 // config 15 15 $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 else23 {24 $tpl_vars['PINTEREST']['source'] = DerivativeImage::url($conf['SocialButtons']['pinterest']['img_size'], $picture['current']['src_image']);25 }26 27 16 28 17 $template->set_filename('pinterest_button', realpath(SOCIALBUTT_PATH .'template/pinterest.tpl')); -
extensions/SocialButtons/include/reddit.inc.php
r24758 r24788 19 19 $conf['SocialButtons']['reddit']['type'] = 'spreddit7'; 20 20 } 21 21 22 22 23 // config -
extensions/SocialButtons/include/tumblr.inc.php
r23202 r24788 9 9 $tpl_vars['TUMBLR'] = $conf['SocialButtons']['tumblr']; 10 10 11 // button on piture page12 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 else24 {25 $tpl_vars['TUMBLR']['source'] = DerivativeImage::url($conf['SocialButtons']['tumblr']['img_size'], $picture['current']['src_image']);26 }27 }28 // button on other pages29 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 38 11 $template->set_filename('tumblr_button', realpath(SOCIALBUTT_PATH .'template/tumblr.tpl')); 39 12 $buttons[] = 'tumblr_button';
Note: See TracChangeset
for help on using the changeset viewer.