diff --git a/admin.php b/admin.php index ab8fefc..1bcf8b4 100644 --- a/admin.php +++ b/admin.php @@ -1,5 +1,5 @@ set_filename('facebook_button', realpath(SOCIALBUTT_PATH .'template/facebook.tpl')); $buttons[] = 'facebook_button'; } - -?> \ No newline at end of file diff --git a/include/google.inc.php b/include/google.inc.php index 0cf436d..dc3b962 100644 --- a/include/google.inc.php +++ b/include/google.inc.php @@ -44,5 +44,3 @@ function socialbutt_google($basename, $root_url, &$tpl_vars, &$buttons) $template->set_filename('google_button', realpath(SOCIALBUTT_PATH .'template/google.tpl')); $buttons[] = 'google_button'; } - -?> \ No newline at end of file diff --git a/include/linkedin.inc.php b/include/linkedin.inc.php index ef580e2..6cca7bf 100644 --- a/include/linkedin.inc.php +++ b/include/linkedin.inc.php @@ -38,5 +38,3 @@ function socialbutt_linkedin($basename, $root_url, &$tpl_vars, &$buttons) $template->set_filename('linkedin_button', realpath(SOCIALBUTT_PATH .'template/linkedin.tpl')); $buttons[] = 'linkedin_button'; } - -?> \ No newline at end of file diff --git a/include/pinterest.inc.php b/include/pinterest.inc.php index 0b36228..62b6009 100644 --- a/include/pinterest.inc.php +++ b/include/pinterest.inc.php @@ -17,5 +17,3 @@ function socialbutt_pinterest($basename, $root_url, &$tpl_vars, &$buttons) $template->set_filename('pinterest_button', realpath(SOCIALBUTT_PATH .'template/pinterest.tpl')); $buttons[] = 'pinterest_button'; } - -?> \ No newline at end of file diff --git a/include/reddit.inc.php b/include/reddit.inc.php index d0ab014..95ad00b 100644 --- a/include/reddit.inc.php +++ b/include/reddit.inc.php @@ -41,5 +41,3 @@ function socialbutt_reddit($basename, $root_url, &$tpl_vars, &$buttons) $template->set_filename('reddit_button', realpath(SOCIALBUTT_PATH .'template/reddit.tpl')); $buttons[] = 'reddit_button'; } - -?> \ No newline at end of file diff --git a/include/tumblr.inc.php b/include/tumblr.inc.php index e81b805..3b2e75e 100644 --- a/include/tumblr.inc.php +++ b/include/tumblr.inc.php @@ -11,5 +11,3 @@ function socialbutt_tumblr($basename, $root_url, &$tpl_vars, &$buttons) $template->set_filename('tumblr_button', realpath(SOCIALBUTT_PATH .'template/tumblr.tpl')); $buttons[] = 'tumblr_button'; } - -?> \ No newline at end of file diff --git a/include/twitter.inc.php b/include/twitter.inc.php index 5f8134f..3337e61 100644 --- a/include/twitter.inc.php +++ b/include/twitter.inc.php @@ -32,5 +32,3 @@ function socialbutt_twitter($basename, $root_url, &$tpl_vars, &$buttons) $template->set_filename('twitter_button', realpath(SOCIALBUTT_PATH .'template/twitter.tpl')); $buttons[] = 'twitter_button'; } - -?> \ No newline at end of file diff --git a/maintain.class.php b/maintain.class.php index 8abf9c9..9cea92a 100644 --- a/maintain.class.php +++ b/maintain.class.php @@ -45,6 +45,8 @@ class SocialButtons_maintain extends PluginMaintain function install($plugin_version, &$errors=array()) { + global $conf; + if (empty($conf['SocialButtons'])) { if (isset($conf['TumblrShare'])) @@ -66,13 +68,13 @@ class SocialButtons_maintain extends PluginMaintain if (!empty($temp['size'])) $this->default_config['google']['size'] = $temp['size']; if (!empty($temp['annotation'])) $this->default_config['google']['annotation'] = $temp['annotation']; } - + conf_update_param('SocialButtons', $this->default_config, true); } else { $new_conf = safe_unserialize($conf['SocialButtons']); - + if (empty($new_conf['pinterest'])) { $new_conf['pinterest'] = array( @@ -80,7 +82,7 @@ class SocialButtons_maintain extends PluginMaintain 'layout' => 'horizontal', ); } - + if (empty($new_conf['reddit'])) { $new_conf['reddit'] = array( @@ -89,7 +91,7 @@ class SocialButtons_maintain extends PluginMaintain 'community' => null, ); } - + if (empty($new_conf['linkedin'])) { $new_conf['linkedin'] = array( @@ -97,28 +99,28 @@ class SocialButtons_maintain extends PluginMaintain 'counter' => 'right', ); } - + if (!isset($new_conf['on_index'])) { $new_conf['on_index'] = true; } - + if ($new_conf['facebook']['layout'] == 'none') { $new_conf['facebook']['layout'] = 'button_count'; } - + if (!isset($new_conf['light'])) { $new_conf['light'] = false; } - + if (!isset($new_conf['img_size'])) { $new_conf['img_size'] = isset($new_conf['tumblr']['img_size']) ? $new_conf['tumblr']['img_size'] : 'Original'; unset($new_conf['tumblr']['img_size'], $new_conf['pinterest']['img_size']); } - + conf_update_param('SocialButtons', $new_conf, true); } } diff --git a/template/facebook.tpl b/template/facebook.tpl index 4f731b2..973ade4 100644 --- a/template/facebook.tpl +++ b/template/facebook.tpl @@ -1,11 +1,6 @@ {strip} {if $SOCIALBUTT.light} - Facebook {else}