Index: extensions/SocialButtons/admin.php
===================================================================
--- extensions/SocialButtons/admin.php	(revision 20367)
+++ extensions/SocialButtons/admin.php	(revision 20374)
@@ -32,4 +32,9 @@
       'layout' => $_POST['facebook']['layout'],
       ),
+    'pinterest' => array(
+      'enabled' => isset($_POST['pinterest']['enabled']),
+      'layout' => $_POST['pinterest']['layout'],
+      'img_size' => $_POST['pinterest']['img_size'],
+      ),
     );
   
Index: extensions/SocialButtons/include/facebook.inc.php
===================================================================
--- extensions/SocialButtons/include/facebook.inc.php	(revision 20367)
+++ extensions/SocialButtons/include/facebook.inc.php	(revision 20374)
@@ -2,5 +2,5 @@
 defined('SOCIALBUTT_PATH') or die('Hacking attempt!');
 
-function socialbutt_facebook($basename, $root_url, &$tpl_vars)
+function socialbutt_facebook($basename, $root_url, &$tpl_vars, &$buttons)
 {
   global $conf, $template, $user;
@@ -42,5 +42,5 @@
   
   $template->set_filename('facebook_button', realpath(SOCIALBUTT_PATH .'template/facebook.tpl'));
-  return 'facebook_button';
+  $buttons[] = 'facebook_button';
 }
 
Index: extensions/SocialButtons/include/google.inc.php
===================================================================
--- extensions/SocialButtons/include/google.inc.php	(revision 20367)
+++ extensions/SocialButtons/include/google.inc.php	(revision 20374)
@@ -2,5 +2,5 @@
 defined('SOCIALBUTT_PATH') or die('Hacking attempt!');
 
-function socialbutt_google($basename, $root_url, &$tpl_vars)
+function socialbutt_google($basename, $root_url, &$tpl_vars, &$buttons)
 {
   global $conf, $template, $user;
@@ -43,5 +43,5 @@
   
   $template->set_filename('google_button', realpath(SOCIALBUTT_PATH .'template/google.tpl'));
-  return 'google_button';
+  $buttons[] = 'google_button';
 }
 
Index: extensions/SocialButtons/include/install.inc.php
===================================================================
--- extensions/SocialButtons/include/install.inc.php	(revision 20367)
+++ extensions/SocialButtons/include/install.inc.php	(revision 20374)
@@ -31,4 +31,9 @@
         'layout' => 'button_count',
         ),
+      'pinterest' => array(
+        'enabled' => true,
+        'layout' => 'horizontal',
+        'img_size' => 'Original',
+        ),
       );
     
@@ -53,7 +58,20 @@
     }
     
-    
     $conf['SocialButtons'] = serialize($default_config);
     conf_update_param('SocialButtons', $conf['SocialButtons']);
+  }
+  else
+  {
+    $new_conf = unserialize($conf['SocialButtons']);
+    if (empty($new_conf['pinterest']))
+    {
+      $new_conf['pinterest'] = array(
+        'enabled' => true,
+        'layout' => 'horizontal',
+        'img_size' => 'Original',
+        );
+      $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 20374)
+++ extensions/SocialButtons/include/pinterest.inc.php	(revision 20374)
@@ -0,0 +1,33 @@
+<?php
+defined('SOCIALBUTT_PATH') or die('Hacking attempt!');
+
+function socialbutt_pinterest($basename, $root_url, &$tpl_vars, &$buttons)
+{
+  // only on piture page
+  if ($basename != 'picture')
+  {
+    return;
+  }
+  
+  global $conf, $template, $picture;
+  
+  // config
+  $tpl_vars['PINTEREST'] = $conf['SocialButtons']['pinterest'];
+  $tpl_vars['PINTEREST']['copyright'] = ' (from <a href="'.$root_url.'">'.$conf['gallery_title'].'</a>)';
+  $tpl_vars['PINTEREST']['title'] = $picture['current']['TITLE'];
+  
+  if ($conf['SocialButtons']['pinterest']['img_size'] == 'Original')
+  {
+    $tpl_vars['PINTEREST']['source'] = $root_url.ltrim($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']), './');
+  }
+  
+  
+  $template->set_filename('pinterest_button', realpath(SOCIALBUTT_PATH .'template/pinterest.tpl'));
+  $buttons[] = 'pinterest_button';
+}
+
+?>  
Index: extensions/SocialButtons/include/tumblr.inc.php
===================================================================
--- extensions/SocialButtons/include/tumblr.inc.php	(revision 20367)
+++ extensions/SocialButtons/include/tumblr.inc.php	(revision 20374)
@@ -2,7 +2,7 @@
 defined('SOCIALBUTT_PATH') or die('Hacking attempt!');
 
-function socialbutt_tumblr($basename, $root_url, &$tpl_vars)
+function socialbutt_tumblr($basename, $root_url, &$tpl_vars, &$buttons)
 {
-  global $conf, $template, $user;
+  global $conf, $template;
   
   $tumblr_css = array(
@@ -51,5 +51,5 @@
   
   $template->set_filename('tumblr_button', realpath(SOCIALBUTT_PATH .'template/tumblr.tpl'));
-  return 'tumblr_button';
+  $buttons[] = 'tumblr_button';
 }
 
Index: extensions/SocialButtons/include/twitter.inc.php
===================================================================
--- extensions/SocialButtons/include/twitter.inc.php	(revision 20367)
+++ extensions/SocialButtons/include/twitter.inc.php	(revision 20374)
@@ -2,5 +2,5 @@
 defined('SOCIALBUTT_PATH') or die('Hacking attempt!');
 
-function socialbutt_twitter($basename, $root_url, &$tpl_vars) 
+function socialbutt_twitter($basename, $root_url, &$tpl_vars, &$buttons) 
 {
   global $conf, $template, $user;
@@ -31,5 +31,5 @@
   
   $template->set_filename('twitter_button', realpath(SOCIALBUTT_PATH .'template/twitter.tpl'));
-  return 'twitter_button';
+  $buttons[] = 'twitter_button';
 }
 
Index: extensions/SocialButtons/main.inc.php
===================================================================
--- extensions/SocialButtons/main.inc.php	(revision 20367)
+++ extensions/SocialButtons/main.inc.php	(revision 20374)
@@ -125,20 +125,25 @@
   {
     include_once(SOCIALBUTT_PATH . 'include/google.inc.php');
-    $buttons[] = socialbutt_google($basename, $root_url, $tpl_vars);
+    socialbutt_google($basename, $root_url, $tpl_vars, $buttons);
   }
   if ($conf['SocialButtons']['twitter']['enabled'])
   {
     include_once(SOCIALBUTT_PATH . 'include/twitter.inc.php');
-    $buttons[] = socialbutt_twitter($basename, $root_url, $tpl_vars);
+    socialbutt_twitter($basename, $root_url, $tpl_vars, $buttons);
   }
   if ($conf['SocialButtons']['facebook']['enabled'])
   {
     include_once(SOCIALBUTT_PATH . 'include/facebook.inc.php');
-    $buttons[] = socialbutt_facebook($basename, $root_url, $tpl_vars);
+    socialbutt_facebook($basename, $root_url, $tpl_vars, $buttons);
   }
   if ($conf['SocialButtons']['tumblr']['enabled'])
   {
     include_once(SOCIALBUTT_PATH . 'include/tumblr.inc.php');
-    $buttons[] = socialbutt_tumblr($basename, $root_url, $tpl_vars);
+    socialbutt_tumblr($basename, $root_url, $tpl_vars, $buttons);
+  }
+  if ($conf['SocialButtons']['pinterest']['enabled'] and $basename=='picture')
+  {
+    include_once(SOCIALBUTT_PATH . 'include/pinterest.inc.php');
+    socialbutt_pinterest($basename, $root_url, $tpl_vars, $buttons);
   }
   
Index: extensions/SocialButtons/template/admin.tpl
===================================================================
--- extensions/SocialButtons/template/admin.tpl	(revision 20367)
+++ extensions/SocialButtons/template/admin.tpl	(revision 20374)
@@ -50,5 +50,190 @@
 <br>
 
-<div class="socialbutt">
+
+<div class="socialbutt"> {* <!-- twitter --> *}
+<table>
+  <thead>
+    <tr><td colspan="2">
+      <label title="{if $twitter.enabled}{'Disable'|@translate}{else}{'Enable'|@translate}{/if}">
+        <img {if not $twitter.enabled}class="grayscale"{/if} src="{$SOCIALBUTT_PATH}template/images/twitter_logo.png"/>
+        <input class="enable" style="display:none;" type="checkbox" name="twitter[enabled]" {if $twitter.enabled}checked="checked"{/if}/>
+      </label>
+    </td></tr>
+  </thead>
+  <tbody {if not $twitter.enabled}style="display:none;"{/if}>
+    <tr class="property">
+      <td>
+        {'Button type'|@translate}
+      </td>
+      <td></td>
+    </tr>
+    <tr class="button">
+      <td><label>
+        20px
+        <img src="{$SOCIALBUTT_PATH}template/images/twitter_small.png"/>
+        <input type="radio" name="twitter[size]" value="small" {if $twitter.size=='small'}checked="checked"{/if}/>
+      </label></td>
+      <td><label>
+        <input type="radio" name="twitter[size]" value="large" {if $twitter.size=='large'}checked="checked"{/if}/>
+        <img src="{$SOCIALBUTT_PATH}template/images/twitter_large.png"/>
+        28px
+      </label></td>
+    </tr>
+    <tr class="property">
+      <td>
+        {'Annotation'|@translate}
+      </td>
+      <td>
+        <label><input type="radio" name="twitter[count]" value="none" {if $twitter.count=='none'}checked="checked"{/if}/> {'None'|@translate}</label><br>
+        <label><input type="radio" name="twitter[count]" value="bubble" {if $twitter.count=='bubble'}checked="checked"{/if}/> {'Bubble'|@translate}</label><br>
+      </td>
+    </tr>
+    <tr class="property">
+      <td>
+        <label for="twitter_via">{'Via'|@translate}</label>
+      </td>
+      <td>
+        @ <input type="text" id="twitter_via" name="twitter[via]" value="{$twitter.via}"/>
+      </td>
+    </tr>
+  </tbody>
+</table>
+</div> {* <!-- twitter --> *}
+
+<div class="socialbutt"> {* <!-- google --> *}
+<table>
+  <thead>
+    <tr><td colspan="2">
+      <label title="{if $google.enabled}{'Disable'|@translate}{else}{'Enable'|@translate}{/if}">
+        <img {if not $google.enabled}class="grayscale"{/if} src="{$SOCIALBUTT_PATH}template/images/google_logo.png"/>
+        <input class="enable" style="display:none;" type="checkbox" name="google[enabled]" {if $google.enabled}checked="checked"{/if}/>
+      </label>
+    </td></tr>
+  </thead>
+  <tbody {if not $google.enabled}style="display:none;"{/if}>
+    <tr class="property">
+      <td>
+        {'Button type'|@translate}
+      </td>
+      <td></td>
+    </tr>
+    <tr class="button">
+      <td><label>
+        15px
+        <img src="{$SOCIALBUTT_PATH}template/images/google_small.png"/>
+        <input type="radio" name="google[size]" value="small" {if $google.size=='small'}checked="checked"{/if}/>
+      </label></td>
+      <td><label>
+        <input type="radio" name="google[size]" value="medium" {if $google.size=='medium'}checked="checked"{/if}/>
+        <img src="{$SOCIALBUTT_PATH}template/images/google_medium.png"/>
+        20px
+      </label></td>
+    </tr>
+    <tr class="button">
+      <td><label>
+        24px
+        <img src="{$SOCIALBUTT_PATH}template/images/google_standard.png"/>
+        <input type="radio" name="google[size]" value="standard" {if $google.size=='standard'}checked="checked"{/if}/>
+      </label></td>
+      <td><label>
+        <input type="radio" name="google[size]" value="tall" {if $google.size=='tall'}checked="checked"{/if}/>
+        <img src="{$SOCIALBUTT_PATH}template/images/google_tall.png"/>
+        60px
+      </label></td>
+    </tr>
+    <tr class="property">
+      <td>
+        {'Annotation'|@translate}
+      </td>
+      <td>
+        <label><input type="radio" name="google[annotation]" value="none" {if $google.annotation=='none'}checked="checked"{/if}/> {'None'|@translate}</label><br>
+        <label><input type="radio" name="google[annotation]" value="bubble" {if $google.annotation=='bubble'}checked="checked"{/if}/> {'Bubble'|@translate}</label><br>
+        <label><input type="radio" name="google[annotation]" value="inline" {if $google.annotation=='inline'}checked="checked"{/if}/> {'Inline text'|@translate}</label>
+      </td>
+    </tr>
+  </tbody>
+</table>
+</div> {* <!-- google --> *}
+
+<br>
+
+<div class="socialbutt"> {* <!-- pinterest --> *}
+<table>
+  <thead>
+    <tr><td colspan="2">
+      <label title="{if $pinterest.enabled}{'Disable'|@translate}{else}{'Enable'|@translate}{/if}">
+        <img {if not $pinterest.enabled}class="grayscale"{/if} src="{$SOCIALBUTT_PATH}template/images/pinterest_logo.png"/>
+        <input class="enable" style="display:none;" type="checkbox" name="pinterest[enabled]" {if $pinterest.enabled}checked="checked"{/if}/>
+      </label>
+    </td></tr>
+  </thead>
+  <tbody {if not $pinterest.enabled}style="display:none;"{/if}>
+    <tr class="property">
+      <td>
+        {'Shared picture size'|@translate}
+      </td>
+      <td>
+        {html_options name="pinterest[img_size]" values=$img_sizes output=$img_sizes|translate selected=$pinterest.img_size}
+      </td>
+    </tr>
+    <tr class="property">
+      <td>
+        {'Annotation'|@translate}
+      </td>
+      <td>
+        <label><input type="radio" name="pinterest[layout]" value="none" {if $pinterest.layout=='none'}checked="checked"{/if}/> {'None'|@translate}</label><br>
+        <label><input type="radio" name="pinterest[layout]" value="horizontal" {if $pinterest.layout=='horizontal'}checked="checked"{/if}/> {'Right bubble'|@translate}</label><br>
+        <label><input type="radio" name="pinterest[layout]" value="vertical" {if $pinterest.layout=='vertical'}checked="checked"{/if}/> {'Top bubble'|@translate}</label>
+      </td>
+    </tr>
+  </tbody>
+</table>
+</div> {* <!-- pinterest --> *}
+
+<div class="socialbutt"> {* <!-- facebook --> *}
+<table>
+  <thead>
+    <tr><td colspan="2">
+      <label title="{if $facebook.enabled}{'Disable'|@translate}{else}{'Enable'|@translate}{/if}">
+        <img {if not $facebook.enabled}class="grayscale"{/if} src="{$SOCIALBUTT_PATH}template/images/facebook_logo.png"/>
+        <input class="enable" style="display:none;" type="checkbox" name="facebook[enabled]" {if $facebook.enabled}checked="checked"{/if}/>
+      </label>
+    </td></tr>
+  </thead>
+  <tbody {if not $facebook.enabled}style="display:none;"{/if}>
+    <tr class="property">
+      <td>
+        {'Button type'|@translate}
+      </td>
+      <td></td>
+    </tr>
+    <tr class="button">
+      <td><label>
+        <img src="{$SOCIALBUTT_PATH}template/images/facebook_light.png"/>
+        <input type="radio" name="facebook[color]" value="light" {if $facebook.color=='light'}checked="checked"{/if}/>
+      </label></td>
+      <td><label>
+        <input type="radio" name="facebook[color]" value="dark" {if $facebook.color=='dark'}checked="checked"{/if}/>
+        <img src="{$SOCIALBUTT_PATH}template/images/facebook_dark.png"/>
+      </label></td>
+    </tr>
+    <tr class="property">
+      <td>
+        {'Annotation'|@translate}
+      </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="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>
+        <label><input type="radio" name="facebook[layout]" value="standard" {if $facebook.layout=='standard'}checked="checked"{/if}/> {'Inline text'|@translate}</label>
+      </td>
+    </tr>
+  </tbody>
+</table>
+</div> {* <!-- facebook --> *}
+
+<br>
+
+<div class="socialbutt"> {* <!-- tumblr --> *}
 <table>
   <thead>
@@ -117,153 +302,5 @@
   </tbody>
 </table>
-</div>
-
-<div class="socialbutt">
-<table>
-  <thead>
-    <tr><td colspan="2">
-      <label title="{if $google.enabled}{'Disable'|@translate}{else}{'Enable'|@translate}{/if}">
-        <img {if not $google.enabled}class="grayscale"{/if} src="{$SOCIALBUTT_PATH}template/images/google_logo.png"/>
-        <input class="enable" style="display:none;" type="checkbox" name="google[enabled]" {if $google.enabled}checked="checked"{/if}/>
-      </label>
-    </td></tr>
-  </thead>
-  <tbody {if not $google.enabled}style="display:none;"{/if}>
-    <tr class="property">
-      <td>
-        {'Button type'|@translate}
-      </td>
-      <td></td>
-    </tr>
-    <tr class="button">
-      <td><label>
-        15px
-        <img src="{$SOCIALBUTT_PATH}template/images/google_small.png"/>
-        <input type="radio" name="google[size]" value="small" {if $google.size=='small'}checked="checked"{/if}/>
-      </label></td>
-      <td><label>
-        <input type="radio" name="google[size]" value="medium" {if $google.size=='medium'}checked="checked"{/if}/>
-        <img src="{$SOCIALBUTT_PATH}template/images/google_medium.png"/>
-        20px
-      </label></td>
-    </tr>
-    <tr class="button">
-      <td><label>
-        24px
-        <img src="{$SOCIALBUTT_PATH}template/images/google_standard.png"/>
-        <input type="radio" name="google[size]" value="standard" {if $google.size=='standard'}checked="checked"{/if}/>
-      </label></td>
-      <td><label>
-        <input type="radio" name="google[size]" value="tall" {if $google.size=='tall'}checked="checked"{/if}/>
-        <img src="{$SOCIALBUTT_PATH}template/images/google_tall.png"/>
-        60px
-      </label></td>
-    </tr>
-    <tr class="property">
-      <td>
-        {'Annotation'|@translate}
-      </td>
-      <td>
-        <label><input type="radio" name="google[annotation]" value="none" {if $google.annotation=='none'}checked="checked"{/if}/> {'None'|@translate}</label><br>
-        <label><input type="radio" name="google[annotation]" value="bubble" {if $google.annotation=='bubble'}checked="checked"{/if}/> {'Bubble'|@translate}</label><br>
-        <label><input type="radio" name="google[annotation]" value="inline" {if $google.annotation=='inline'}checked="checked"{/if}/> {'Inline text'|@translate}</label>
-      </td>
-    </tr>
-  </tbody>
-</table>
-</div>
-
-<br>
-
-<div class="socialbutt">
-<table>
-  <thead>
-    <tr><td colspan="2">
-      <label title="{if $twitter.enabled}{'Disable'|@translate}{else}{'Enable'|@translate}{/if}">
-        <img {if not $twitter.enabled}class="grayscale"{/if} src="{$SOCIALBUTT_PATH}template/images/twitter_logo.png"/>
-        <input class="enable" style="display:none;" type="checkbox" name="twitter[enabled]" {if $twitter.enabled}checked="checked"{/if}/>
-      </label>
-    </td></tr>
-  </thead>
-  <tbody {if not $twitter.enabled}style="display:none;"{/if}>
-    <tr class="property">
-      <td>
-        {'Button type'|@translate}
-      </td>
-      <td></td>
-    </tr>
-    <tr class="button">
-      <td><label>
-        20px
-        <img src="{$SOCIALBUTT_PATH}template/images/twitter_small.png"/>
-        <input type="radio" name="twitter[size]" value="small" {if $twitter.size=='small'}checked="checked"{/if}/>
-      </label></td>
-      <td><label>
-        <input type="radio" name="twitter[size]" value="large" {if $twitter.size=='large'}checked="checked"{/if}/>
-        <img src="{$SOCIALBUTT_PATH}template/images/twitter_large.png"/>
-        28px
-      </label></td>
-    </tr>
-    <tr class="property">
-      <td>
-        {'Annotation'|@translate}
-      </td>
-      <td>
-        <label><input type="radio" name="twitter[count]" value="none" {if $twitter.count=='none'}checked="checked"{/if}/> {'None'|@translate}</label><br>
-        <label><input type="radio" name="twitter[count]" value="bubble" {if $twitter.count=='bubble'}checked="checked"{/if}/> {'Bubble'|@translate}</label><br>
-      </td>
-    </tr>
-    <tr class="property">
-      <td>
-        <label for="twitter_via">{'Via'|@translate}</label>
-      </td>
-      <td>
-        @ <input type="text" id="twitter_via" name="twitter[via]" value="{$twitter.via}"/>
-      </td>
-    </tr>
-  </tbody>
-</table>
-</div>
-
-<div class="socialbutt">
-<table>
-  <thead>
-    <tr><td colspan="2">
-      <label title="{if $facebook.enabled}{'Disable'|@translate}{else}{'Enable'|@translate}{/if}">
-        <img {if not $facebook.enabled}class="grayscale"{/if} src="{$SOCIALBUTT_PATH}template/images/facebook_logo.png"/>
-        <input class="enable" style="display:none;" type="checkbox" name="facebook[enabled]" {if $facebook.enabled}checked="checked"{/if}/>
-      </label>
-    </td></tr>
-  </thead>
-  <tbody {if not $facebook.enabled}style="display:none;"{/if}>
-    <tr class="property">
-      <td>
-        {'Button type'|@translate}
-      </td>
-      <td></td>
-    </tr>
-    <tr class="button">
-      <td><label>
-        <img src="{$SOCIALBUTT_PATH}template/images/facebook_light.png"/>
-        <input type="radio" name="facebook[color]" value="light" {if $facebook.color=='light'}checked="checked"{/if}/>
-      </label></td>
-      <td><label>
-        <input type="radio" name="facebook[color]" value="dark" {if $facebook.color=='dark'}checked="checked"{/if}/>
-        <img src="{$SOCIALBUTT_PATH}template/images/facebook_dark.png"/>
-      </label></td>
-    </tr>
-    <tr class="property">
-      <td>
-        {'Annotation'|@translate}
-      </td>
-      <td>
-        <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>
-        <label><input type="radio" name="facebook[layout]" value="standard" {if $facebook.layout=='standard'}checked="checked"{/if}/> {'Inline text'|@translate}</label>
-      </td>
-    </tr>
-  </tbody>
-</table>
-</div>
+</div> {* <!-- tumblr --> *}
 
 <br>
Index: extensions/SocialButtons/template/facebook.tpl
===================================================================
--- extensions/SocialButtons/template/facebook.tpl	(revision 20367)
+++ extensions/SocialButtons/template/facebook.tpl	(revision 20374)
@@ -3,5 +3,15 @@
 {combine_script id='facebook_jssdk' load='async' 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; margin-right:10px; }
+.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="{$SOCIALBUTT.FACEBOOK.layout}" data-colorscheme="{$SOCIALBUTT.FACEBOOK.color}"></div>
+  data-href="{$SOCIALBUTT.share_url}" data-layout="{$facebook_layout}" data-colorscheme="{$SOCIALBUTT.FACEBOOK.color}"></div>
 {/strip}
Index: extensions/SocialButtons/template/pinterest.tpl
===================================================================
--- extensions/SocialButtons/template/pinterest.tpl	(revision 20374)
+++ extensions/SocialButtons/template/pinterest.tpl	(revision 20374)
@@ -0,0 +1,6 @@
+{strip}
+{combine_script id='pinterest_pinit' path='http://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|urlencode}{$SOCIALBUTT.PINTEREST.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}
