Index: /extensions/SocialButtons/include/facebook.inc.php
===================================================================
--- /extensions/SocialButtons/include/facebook.inc.php	(revision 23200)
+++ /extensions/SocialButtons/include/facebook.inc.php	(revision 23201)
@@ -18,5 +18,5 @@
   
   // if the link is in the toolbar, we must use smaller buttons
-  if ( $conf['SocialButtons']['position'] == 'index' or  $conf['SocialButtons']['position'] == 'toolbar')
+  if ($conf['SocialButtons']['position'] == 'index' or $conf['SocialButtons']['position'] == 'toolbar')
   {
     if ($conf['SocialButtons']['facebook']['layout'] == 'box_count')
Index: /extensions/SocialButtons/include/google.inc.php
===================================================================
--- /extensions/SocialButtons/include/google.inc.php	(revision 23200)
+++ /extensions/SocialButtons/include/google.inc.php	(revision 23201)
@@ -15,5 +15,5 @@
   
   // if the link is in the toolbar, we must use smaller buttons
-  if ( $conf['SocialButtons']['position'] == 'index' or  $conf['SocialButtons']['position'] == 'toolbar')
+  if ($conf['SocialButtons']['position'] == 'index' or $conf['SocialButtons']['position'] == 'toolbar')
   {
     if ($conf['SocialButtons']['google']['size'] == 'tall' and $conf['SocialButtons']['google']['annotation'] == 'bubble')
Index: /extensions/SocialButtons/include/install.inc.php
===================================================================
--- /extensions/SocialButtons/include/install.inc.php	(revision 23200)
+++ /extensions/SocialButtons/include/install.inc.php	(revision 23201)
@@ -79,4 +79,9 @@
     }
     
+    if ($new_conf['facebook']['layout'] == 'none')
+    {
+      $new_conf['facebook']['layout'] = 'button_count';
+    }
+    
     $conf['SocialButtons'] = serialize($new_conf);
     conf_update_param('SocialButtons', $conf['SocialButtons']);
Index: /extensions/SocialButtons/include/pinterest.inc.php
===================================================================
--- /extensions/SocialButtons/include/pinterest.inc.php	(revision 23200)
+++ /extensions/SocialButtons/include/pinterest.inc.php	(revision 23201)
@@ -18,9 +18,9 @@
   if ($conf['SocialButtons']['pinterest']['img_size'] == 'Original')
   {
-    $tpl_vars['PINTEREST']['source'] = $root_url.ltrim($picture['current']['src_image']->get_url(), './');
+    $tpl_vars['PINTEREST']['source'] = $picture['current']['src_image']->get_url();
   }
   else
   {
-    $tpl_vars['PINTEREST']['source'] = $root_url.ltrim(DerivativeImage::url($conf['SocialButtons']['pinterest']['img_size'], $picture['current']['src_image']), './');
+    $tpl_vars['PINTEREST']['source'] = DerivativeImage::url($conf['SocialButtons']['pinterest']['img_size'], $picture['current']['src_image']);
   }
   
Index: /extensions/SocialButtons/include/tumblr.inc.php
===================================================================
--- /extensions/SocialButtons/include/tumblr.inc.php	(revision 23200)
+++ /extensions/SocialButtons/include/tumblr.inc.php	(revision 23201)
@@ -19,9 +19,9 @@
     if ($conf['SocialButtons']['tumblr']['img_size'] == 'Original')
     {
-      $tpl_vars['TUMBLR']['source'] = $root_url.ltrim($picture['current']['src_image']->get_url(), './');
+      $tpl_vars['TUMBLR']['source'] = $picture['current']['src_image']->get_url();
     }
     else
     {
-      $tpl_vars['TUMBLR']['source'] = $root_url.ltrim(DerivativeImage::url($conf['SocialButtons']['tumblr']['img_size'], $picture['current']['src_image']), './');
+      $tpl_vars['TUMBLR']['source'] = DerivativeImage::url($conf['SocialButtons']['tumblr']['img_size'], $picture['current']['src_image']);
     }
   }
Index: /extensions/SocialButtons/main.inc.php
===================================================================
--- /extensions/SocialButtons/main.inc.php	(revision 23200)
+++ /extensions/SocialButtons/main.inc.php	(revision 23201)
@@ -97,14 +97,19 @@
   
   $basename = script_basename();
+  set_make_full_url();
   $root_url = get_absolute_root_url();
   
   if ($basename == 'picture')
   {
-    $share_url = $root_url.ltrim(duplicate_picture_url(), './');
+    // global $picture;
+    
+    // if ($picture['current']['level'] > 0) return;
+    
+    $share_url = duplicate_picture_url();
   }
   else if ($basename == 'index' and $conf['SocialButtons']['on_index'])
   {
     $conf['SocialButtons']['position'] = 'index';
-    $share_url = $root_url.ltrim(duplicate_index_url(array(), array('start')), './');
+    $share_url = duplicate_index_url(array(), array('start'));
   }
   else
@@ -118,5 +123,5 @@
     'share_url' => $share_url,
     'position' => $conf['SocialButtons']['position'],
-    'copyright' => ' (from <a href="'.$share_url.'">'.$conf['gallery_title'].'</a>)',
+    'copyright' => '(from <a href="'.$share_url.'">'.$conf['gallery_title'].'</a>)',
     );
   $buttons = array();
@@ -148,4 +153,6 @@
     socialbutt_pinterest($basename, $root_url, $tpl_vars, $buttons);
   }
+  
+  unset_make_full_url();
   
   if (empty($buttons))
Index: /extensions/SocialButtons/template/admin.tpl
===================================================================
--- /extensions/SocialButtons/template/admin.tpl	(revision 23200)
+++ /extensions/SocialButtons/template/admin.tpl	(revision 23201)
@@ -226,5 +226,5 @@
       </td>
       <td>
-        <label><input type="radio" name="facebook[layout]" value="none" {if $facebook.layout=='none'}checked="checked"{/if}/> {'None'|@translate}</label><br>
+        <!-- <label><input type="radio" name="facebook[layout]" value="none" {if $facebook.layout=='none'}checked="checked"{/if}/> {'None'|@translate}</label><br> -->
         <label><input type="radio" name="facebook[layout]" value="button_count" {if $facebook.layout=='button_count'}checked="checked"{/if}/> {'Right bubble'|@translate}</label><br>
         <label><input type="radio" name="facebook[layout]" value="box_count" {if $facebook.layout=='box_count'}checked="checked"{/if}/> {'Top bubble'|@translate}</label><br>
Index: /extensions/SocialButtons/template/facebook.tpl
===================================================================
--- /extensions/SocialButtons/template/facebook.tpl	(revision 23200)
+++ /extensions/SocialButtons/template/facebook.tpl	(revision 23201)
@@ -3,15 +3,5 @@
 {combine_script id='facebook_jssdk' load='footer' path='https://connect.facebook.net/'|cat:$SOCIALBUTT.FACEBOOK.lang|cat:'/all.js#xfbml=1'}
 
-{if $SOCIALBUTT.FACEBOOK.layout=='none'}
-{html_style}{literal}
-.fb-like span { height: 22px !important; overflow: hidden !important; }
-.fb-like iframe { top: -41px; }
-{/literal}{/html_style}
-{assign var=facebook_layout value='box_count'}
-{else}
-{assign var=facebook_layout value=$SOCIALBUTT.FACEBOOK.layout}
-{/if}
-
 <div style="display:inline-block;" class="fb-like" data-send="false" data-show-faces="false" 
-  data-href="{$SOCIALBUTT.share_url}" data-layout="{$facebook_layout}" data-colorscheme="{$SOCIALBUTT.FACEBOOK.color}"></div>
+  data-href="{$SOCIALBUTT.share_url}" data-layout="{$SOCIALBUTT.FACEBOOK.layout}" data-colorscheme="{$SOCIALBUTT.FACEBOOK.color}"></div>
 {/strip}
Index: /extensions/SocialButtons/template/google.tpl
===================================================================
--- /extensions/SocialButtons/template/google.tpl	(revision 23200)
+++ /extensions/SocialButtons/template/google.tpl	(revision 23201)
@@ -3,4 +3,4 @@
 
 <script type="text/javascript">window.___gcfg = {ldelim}lang: '{$SOCIALBUTT.GOOGLE.lang}'};</script>
-<div style="display:inline-block;" class="g-plusone" data-size="{$SOCIALBUTT.GOOGLE.size}" data-annotation="{$SOCIALBUTT.GOOGLE.annotation}" data-href="{$SOCIALBUTT.share_url}"></div>
+<div style="display:inline-block;" class="g-plusone" data-size="{$SOCIALBUTT.GOOGLE.size}" data-annotation="{$SOCIALBUTT.GOOGLE.annotation}" data-href="{$SOCIALBUTT.share_url}" data-recommendations="false"></div>
 {/strip}
Index: /extensions/SocialButtons/template/pinterest.tpl
===================================================================
--- /extensions/SocialButtons/template/pinterest.tpl	(revision 23200)
+++ /extensions/SocialButtons/template/pinterest.tpl	(revision 23201)
@@ -1,6 +1,6 @@
 {strip}
-{combine_script id='pinterest_pinit' path='http://assets.pinterest.com/js/pinit.js'}
+{combine_script id='pinterest_pinit' load='footer' path='https://assets.pinterest.com/js/pinit.js'}
 
-<a href="http://pinterest.com/pin/create/button/?url={$SOCIALBUTT.share_url|urlencode}&media={$SOCIALBUTT.PINTEREST.source|urlencode}&description={$SOCIALBUTT.PINTEREST.title|cat:$SOCIALBUTT.copyright|urlencode}" 
+<a href="http://pinterest.com/pin/create/button/?url={$SOCIALBUTT.share_url|urlencode}&media={$SOCIALBUTT.PINTEREST.source|urlencode}&description={$SOCIALBUTT.PINTEREST.title|cat:' '|cat:$SOCIALBUTT.copyright|urlencode}" 
   class="pin-it-button" count-layout="{$SOCIALBUTT.PINTEREST.layout}"><img border="0" src="http://assets.pinterest.com/images/PinExt.png" title="Pin It"/></a>
 {/strip}
Index: /extensions/SocialButtons/template/tumblr.tpl
===================================================================
--- /extensions/SocialButtons/template/tumblr.tpl	(revision 23200)
+++ /extensions/SocialButtons/template/tumblr.tpl	(revision 23201)
@@ -4,7 +4,7 @@
 {if $SOCIALBUTT.TUMBLR.mode=='photo'}
 {capture assign="inline_tags"}{foreach from=$related_tags item=tag name=tag_loop}{if !$smarty.foreach.tag_loop.first},{/if}{$tag.name}{/foreach}{/capture}
-<a href="http://www.tumblr.com/share/photo?source={$SOCIALBUTT.TUMBLR.source|urlencode}&caption={$SOCIALBUTT.TUMBLR.title|cat:$SOCIALBUTT.copyright|urlencode}&clickthru={$SOCIALBUTT.share_url|urlencode}&tags={$inline_tags|urlencode}"
+<a href="http://www.tumblr.com/share/photo?source={$SOCIALBUTT.TUMBLR.source|urlencode}&caption={$SOCIALBUTT.TUMBLR.title|cat:' '|cat:$SOCIALBUTT.copyright|urlencode}&clickthru={$SOCIALBUTT.share_url|urlencode}&tags={$inline_tags|urlencode}"
 {else}
-<a href="http://www.tumblr.com/share/link?url={$SOCIALBUTT.share_url|urlencode}&name={$SOCIALBUTT.TUMBLR.title|urlencode}&description={$CONTENT_DESCRIPTION|cat:$SOCIALBUTT.copyright|urlencode}"
+<a href="http://www.tumblr.com/share/link?url={$SOCIALBUTT.share_url|urlencode}&name={$SOCIALBUTT.TUMBLR.title|cat:' | '|cat:$GALLERY_TITLE|urlencode}&description={$CONTENT_DESCRIPTION|cat:$SOCIALBUTT.copyright|urlencode}"
 {/if}
 ><img src="http://platform.tumblr.com/v1/{$SOCIALBUTT.TUMBLR.type}.png" alt="Share on Tumblr"></a>
Index: /extensions/SocialButtons/template/twitter.tpl
===================================================================
--- /extensions/SocialButtons/template/twitter.tpl	(revision 23200)
+++ /extensions/SocialButtons/template/twitter.tpl	(revision 23201)
@@ -1,6 +1,6 @@
 {strip}
-{combine_script id='twitter_widgets' load='footer' path='http://platform.twitter.com/widgets.js'}
+{combine_script id='twitter_widgets' load='footer' path='https://platform.twitter.com/widgets.js'}
 
-<a href="https://twitter.com/share?url={$SOCIALBUTT.share_url}&text={$PAGE_TITLE|cat:' | '|cat:$GALLERY_TITLE}{if $SOCIALBUTT.TWITTER.via}&via={$SOCIALBUTT.TWITTER.via}{/if}" 
+<a href="https://twitter.com/share?url={$SOCIALBUTT.share_url|urlencode}&text={$PAGE_TITLE|cat:' | '|cat:$GALLERY_TITLE|urlencode}{if $SOCIALBUTT.TWITTER.via}&via={$SOCIALBUTT.TWITTER.via}{/if}" 
   data-url="{$SOCIALBUTT.share_url}" data-lang="{$SOCIALBUTT.TWITTER.lang}" data-via="{$SOCIALBUTT.TWITTER.via}"
   data-size="{$SOCIALBUTT.TWITTER.size}" data-count="{$SOCIALBUTT.TWITTER.count}" class="twitter-share-button">
