Index: /extensions/SocialButtons/admin.php
===================================================================
--- /extensions/SocialButtons/admin.php	(revision 21231)
+++ /extensions/SocialButtons/admin.php	(revision 21232)
@@ -11,4 +11,5 @@
   $conf['SocialButtons'] = array(
     'position' => $_POST['position'],
+    'on_index' => get_boolean($_POST['on_index']),
     'twitter' => array(
       'enabled' => isset($_POST['twitter']['enabled']),
Index: /extensions/SocialButtons/include/install.inc.php
===================================================================
--- /extensions/SocialButtons/include/install.inc.php	(revision 21231)
+++ /extensions/SocialButtons/include/install.inc.php	(revision 21232)
@@ -10,4 +10,5 @@
     $default_config = array(
       'position' => 'toolbar',
+      'on_index' => true,
       'twitter' => array(
         'enabled' => true,
@@ -64,4 +65,5 @@
   {
     $new_conf = unserialize($conf['SocialButtons']);
+    
     if (empty($new_conf['pinterest']))
     {
@@ -71,7 +73,12 @@
         'img_size' => 'Original',
         );
-      $conf['SocialButtons'] = serialize($new_conf);
-      conf_update_param('SocialButtons', $conf['SocialButtons']);
     }
+    if (!isset($new_conf['on_index']))
+    {
+      $new_conf['on_index'] = true;
+    }
+    
+    $conf['SocialButtons'] = serialize($new_conf);
+    conf_update_param('SocialButtons', $conf['SocialButtons']);
   }
 }
Index: /extensions/SocialButtons/language/en_UK/plugin.lang.php
===================================================================
--- /extensions/SocialButtons/language/en_UK/plugin.lang.php	(revision 21231)
+++ /extensions/SocialButtons/language/en_UK/plugin.lang.php	(revision 21232)
@@ -10,3 +10,6 @@
 $lang['Right bubble'] = 'Right bubble';
 $lang['Top bubble'] = 'Top bubble';
+$lang['Display buttons'] = 'Display buttons';
+$lang['on photo and album pages'] = 'on photo and album pages';
+$lang['only on photo pages'] = 'only on photo pages';
 ?>
Index: /extensions/SocialButtons/language/fr_FR/plugin.lang.php
===================================================================
--- /extensions/SocialButtons/language/fr_FR/plugin.lang.php	(revision 21231)
+++ /extensions/SocialButtons/language/fr_FR/plugin.lang.php	(revision 21232)
@@ -12,3 +12,6 @@
 $lang['Right bubble'] = 'Bulle à droite';
 $lang['Top bubble'] = 'Bulle en haut';
+$lang['Display buttons'] = 'Afficher les boutons';
+$lang['on photo and album'] = 'sur les photos et les albums';
+$lang['only on photo'] = 'uniquement sur les photos';
 ?>
Index: /extensions/SocialButtons/main.inc.php
===================================================================
--- /extensions/SocialButtons/main.inc.php	(revision 21231)
+++ /extensions/SocialButtons/main.inc.php	(revision 21232)
@@ -103,5 +103,5 @@
     $share_url = $root_url.ltrim(duplicate_picture_url(), './');
   }
-  else if ($basename == 'index')
+  else if ($basename == 'index' and $conf['SocialButtons']['on_index'])
   {
     $conf['SocialButtons']['position'] = 'index';
@@ -118,5 +118,5 @@
     'share_url' => $share_url,
     'position' => $conf['SocialButtons']['position'],
-    'copyright' => ' (from <a href="'.$root_url.'">'.$conf['gallery_title'].'</a>)',
+    'copyright' => ' (from <a href="'.$share_url.'">'.$conf['gallery_title'].'</a>)',
     );
   $buttons = array();
@@ -171,12 +171,10 @@
     case 'index':
       foreach ($buttons as $button) {
-        // $template->add_index_button('<li>'.$button.'</li>', 100);
-        $template->concat('PLUGIN_INDEX_ACTIONS', "\n<li>".$button."</li>");
+        $template->add_index_button('<li>'.$button.'</li>', 100);
       }
       break;
     case 'toolbar':
       foreach ($buttons as $button) {
-        // $template->add_picture_button($button, 100);
-        $template->concat('PLUGIN_PICTURE_ACTIONS', "\n".$button);
+        $template->add_picture_button($button, 100);
       }
       break;
@@ -193,10 +191,10 @@
     case 'top':
       $search = '<div id="theImage">';
-      $add = '<div>{foreach from=$SOCIALBUTT_BUTTONS item=BUTTON}{$BUTTON}{/foreach}</div>';
+      $add = '<div>{foreach from=$SOCIALBUTT_BUTTONS item=BUTTON}{$BUTTON} {/foreach}</div>';
       break;
       
     case 'bottom':
       $search = '{$ELEMENT_CONTENT}';
-      $add = '<div>{foreach from=$SOCIALBUTT_BUTTONS item=BUTTON}{$BUTTON}{/foreach}</div>';
+      $add = '<div>{foreach from=$SOCIALBUTT_BUTTONS item=BUTTON}{$BUTTON} {/foreach}</div>';
       break;
   }
Index: /extensions/SocialButtons/template/admin.tpl
===================================================================
--- /extensions/SocialButtons/template/admin.tpl	(revision 21231)
+++ /extensions/SocialButtons/template/admin.tpl	(revision 21232)
@@ -45,4 +45,13 @@
     </td>
   </tr>
+  <tr class="property">
+    <td>
+      {'Display buttons'|@translate}
+    </td>
+    <td>
+      <label><input type="radio" name="on_index" value="true" {if $on_index}checked="checked"{/if}/> {'on photo and album'|@translate}</label><br>
+      <label><input type="radio" name="on_index" value="false" {if not $on_index}checked="checked"{/if}/> {'only on photo'|@translate}</label>
+    </td>
+  </tr>
 </table>
 </div>
Index: /extensions/SocialButtons/template/facebook.tpl
===================================================================
--- /extensions/SocialButtons/template/facebook.tpl	(revision 21231)
+++ /extensions/SocialButtons/template/facebook.tpl	(revision 21232)
@@ -5,5 +5,5 @@
 {if $SOCIALBUTT.FACEBOOK.layout=='none'}
 {html_style}{literal}
-.fb-like span { height: 22px !important; overflow: hidden !important; margin-right:10px; }
+.fb-like span { height: 22px !important; overflow: hidden !important; }
 .fb-like iframe { top: -41px; }
 {/literal}{/html_style}
