Index: /extensions/FacebookPlug/Plugin/admin.config.php
===================================================================
--- /extensions/FacebookPlug/Plugin/admin.config.php	(revision 8281)
+++ /extensions/FacebookPlug/Plugin/admin.config.php	(revision 8282)
@@ -50,5 +50,5 @@
 $tabsheet = new tabsheet();
 $tabsheet->add('social_plugin',
-               l10n('Social plugin'),
+               l10n('Social plugins'),
                add_url_params($base_url, array('tab' => 'social_plugin')));
 $tabsheet->add('advanced',
@@ -72,4 +72,7 @@
       $conf['fbp']['social_plugin_like_button']['action'] = $action[$_POST['FBP_SOCIAL_PLUGIN_LIKE_BUTTON_ACTION']];
       $conf['fbp']['social_plugin_like_button']['colorscheme'] = $colorscheme[$_POST['FBP_SOCIAL_PLUGIN_LIKE_BUTTON_COLORSCHEME']];
+      // Facepile
+      $conf['fbp']['social_plugin_facepile']['enabled'] = empty($_POST['FBP_SOCIAL_PLUGIN_FACEPILE_ENABLED']) ? false : true;
+      $conf['fbp']['social_plugin_facepile']['max_rows'] = intval($_POST['FBP_SOCIAL_PLUGIN_FACEPILE_MAX_ROWS']);
       // Like box
       $conf['fbp']['social_plugin_like_box']['enabled'] = empty($_POST['FBP_SOCIAL_PLUGIN_LIKE_BOX_ENABLED']) ? false : true;
@@ -86,8 +89,4 @@
       $conf['fbp']['async_script'] = empty($_POST['FBP_ASYNC_SCRIPT']) ? false : true;
       $conf['fbp']['allow_fb_access_private_page'] = empty($_POST['FBP_ALLOW_FB_ACCESS_PRIVATE_PAGE']) ? false : true;
-    //~ if (isset($_POST['fbp_day_number']))
-    //~ {
-      //~ $conf['fbp']['day_number'] = $_POST['fbp_day_number'];
-    //~ }
       break;
     }
@@ -121,5 +120,5 @@
         'like_button' => array
           (
-            'FB_PAGE' => 'http://developers.facebook.com/docs/reference/plugins/like',
+            'FB_PAGE' => 'http://developers.facebook.com/docs/reference/plugins/like/',
             'ENABLED' => ($conf['fbp']['social_plugin_like_button']['enabled'] ? 'checked="checked"' : ''),
             'URL_TYPE_OPTIONS' => $url_type_l10n,
@@ -133,7 +132,13 @@
             'COLORSCHEME_OPTIONS_SELECTED' => array_search($conf['fbp']['social_plugin_like_button']['colorscheme'], $colorscheme),
           ),
+       'facepile' => array
+          (
+            'FB_PAGE' => 'http://developers.facebook.com/docs/reference/plugins/facepile/',
+            'ENABLED' => ($conf['fbp']['social_plugin_facepile']['enabled'] ? 'checked="checked"' : ''),
+            'MAX_ROWS' => $conf['fbp']['social_plugin_facepile']['max_rows'],
+          ),
        'like_box' => array
           (
-            'FB_PAGE' => 'http://developers.facebook.com/docs/reference/plugins/like-box',
+            'FB_PAGE' => 'http://developers.facebook.com/docs/reference/plugins/like-box/',
             'ENABLED' => ($conf['fbp']['social_plugin_like_box']['enabled'] ? 'checked="checked"' : ''),
             'URL' => $conf['fbp']['social_plugin_like_box']['url'],
Index: /extensions/FacebookPlug/Plugin/include/conf.inc.php
===================================================================
--- /extensions/FacebookPlug/Plugin/include/conf.inc.php	(revision 8281)
+++ /extensions/FacebookPlug/Plugin/include/conf.inc.php	(revision 8282)
@@ -26,33 +26,4 @@
 global $conf;
 
-/*$conf['fbp'] = array_merge(
-  // default values
-  array
-  (
-    'allow_fb_access_private_page' => true,
-    'async_script' => false,
-    'social_plugin_like_button' => array
-      (
-        'enabled' => true,
-        'url_type' => 'page',
-        'layout' => 'standard',
-        'show_faces' => true,
-        'action' => 'like',
-        'colorscheme' => 'dark',
-      ),
-    'social_plugin_like_box' => array
-      (
-        'enabled' => false,
-        'url' => 'http://www.facebook.com/Piwigo',
-        'url_type' => 'page',
-        'colorscheme' => 'dark',
-        'show_faces' => true,
-        'stream' => true,
-        'header' => true,
-      ),
-  ),
-  unserialize($conf['fbp'])
-  );*/
-
 $conf['fbp'] = array_merge(
   // default values
@@ -63,4 +34,5 @@
     'social_plugin_like_button' => array(),
     'social_plugin_like_box' => array(),
+    'social_plugin_facepile' => array(),
   ),
   unserialize($conf['fbp']));
@@ -76,5 +48,5 @@
     'action' => 'like',
     'colorscheme' => 'dark',
-    'width' => '',
+    'width' => null,
   ),
   $conf['fbp']['social_plugin_like_button']);
@@ -90,7 +62,21 @@
     'stream' => true,
     'header' => true,
-    'width' => '210',
+    'width' => 210,
   ),
   $conf['fbp']['social_plugin_like_box']);
+
+$conf['fbp']['social_plugin_facepile'] = array_merge(
+  // default values
+  array
+  (
+    'enabled' => true,
+    //'url_type' => 'page',
+    'max_rows' => 1,
+    'width' => null,
+  ),
+  $conf['fbp']['social_plugin_facepile']);
+
+// Same value of like button
+$conf['fbp']['social_plugin_facepile']['url_type'] = $conf['fbp']['social_plugin_like_button']['url_type'];
 
 //~ print_r($conf['fbp']);
Index: /extensions/FacebookPlug/Plugin/include/picture.inc.php
===================================================================
--- /extensions/FacebookPlug/Plugin/include/picture.inc.php	(revision 8281)
+++ /extensions/FacebookPlug/Plugin/include/picture.inc.php	(revision 8282)
@@ -27,44 +27,21 @@
 include_once(FBP_DIR.'/include/header.inc.php');
 
-/*function fbp_header($content, &$smarty)
-{
-  global $conf;
-
-  // replace tag html
-  $search = '<html ';
-  $replacement = '<html xmlns:fb="http://www.facebook.com/2008/fbml" ';
-
-  //~ $content = preg_replace('#'.$search.'#', $replacement, $content);
-  return preg_replace('#'.$search.'#', $replacement, $content);
-  //~ $fbp_content = file_get_contents(FBP_DIR.'/tpl/init.fb.tpl');
-
-  $search = '<div id="the_page">';
-  return preg_replace('#'.$search.'#', $fbp_content.$search, $content);
-}*/
-
-/*function fbp_loc_begin_picture()
-{
-  global $template, $user, $page, $conf, $picture;
-
-  // set prefilter
-  $template->set_prefilter('header', 'fbp_header');
-
-  $template->assign('FACEBOOK_APP_ID', FACEBOOK_APP_ID);
-  // define language
-  $template->assign('LANGUAGE', $user['language']);
-  $template->assign('fbp', $conf['fbp']);
-  $template->smarty->register_modifier('boolean_to_string', 'boolean_to_string');
-
-  $template->set_filename('init.fb', FBP_DIR.'/tpl/init.fb.tpl');
-  $template->append('head_elements', $template->parse('init.fb', true));
-}*/
-
 function fbp_render_element_content($content, $current_picture)
 {
   global $template, $user, $page, $conf, $picture;
 
-  if ($page['slideshow'])
+  if ($page['slideshow'] and $conf['fbp']['social_plugin_facepile']['enabled'])
   {
-    // nothing to do on slideshow other media aren't usable
+    $tpl = 'social.plugin.facepile';
+    $type = $conf['fbp']['social_plugin_facepile']['url_type'];
+  }
+  else if ($conf['fbp']['social_plugin_like_button']['enabled'])
+  {
+    $tpl = 'social.plugin.like.button';
+    $type = $conf['fbp']['social_plugin_like_button']['url_type'];
+  }
+  else
+  {
+    // nothing to do
     return $content;
   }
@@ -73,5 +50,5 @@
   // Always use full url for FB social plugin
   set_make_full_url();
-  if ($conf['fbp']['social_plugin_like_button']['url_type'] == 'image')
+  if ($type == 'image')
   {
     $fbp_url_picture = get_element_url($current_picture);
@@ -85,15 +62,6 @@
 
   // XFBML implementation
-  //~ $content .= '
-//~ <div id="fb-xfbml">';
-  if ($conf['fbp']['social_plugin_like_button']['enabled'])
-  {
-    //~ $content .= '
-//~ <div id="fb-xfbml">
-//~ <fb:like href="'.$fbp_url_picture.'" layout="'.$conf['fbp']['social_plugin_like_button']['layout'].'" show_faces="'.boolean_to_string($conf['fbp']['social_plugin_like_button']['show_faces']).'" width="'.@$current_picture['scaled_width'].'" action="'.$conf['fbp']['social_plugin_like_button']['action'].'" colorscheme="'.$conf['fbp']['social_plugin_like_button']['colorscheme'].'"></fb:like>
-//~ </div>';
-    $template->set_filename('social.plugin.like.button', FBP_DIR.'/tpl/social.plugin.like.button.tpl');
-    $content .= $template->parse('social.plugin.like.button', true);
-  }
+  $template->set_filename($tpl, FBP_DIR.'/tpl/'.$tpl.'.tpl');
+  $content .= $template->parse($tpl, true);
 
   return $content;
@@ -125,5 +93,5 @@
 }
 
-if ($conf['fbp']['social_plugin_like_button']['enabled'])
+if ($conf['fbp']['social_plugin_like_button']['enabled'] or $conf['fbp']['social_plugin_facepile']['enabled'])
 {
   //~ add_event_handler('loc_begin_picture', 'fbp_loc_begin_picture');
Index: /extensions/FacebookPlug/Plugin/language/en_UK/plugin.lang.php
===================================================================
--- /extensions/FacebookPlug/Plugin/language/en_UK/plugin.lang.php	(revision 8281)
+++ /extensions/FacebookPlug/Plugin/language/en_UK/plugin.lang.php	(revision 8282)
@@ -18,4 +18,5 @@
 // | USA.                                                                  |
 // +-----------------------------------------------------------------------+
+
 if (!defined('PHPWG_ROOT_PATH'))
 {
@@ -33,5 +34,5 @@
 $lang['light'] = 'light';
 $lang['dark'] = 'dark';
-$lang['Social plugin'] = 'Social plugin';
+$lang['Social plugins'] = 'Social plugins';
 $lang['Advanced'] = 'Advanced';
 $lang['Asynchronous Facebook access'] = 'Asynchronous Facebook access';
@@ -53,3 +54,23 @@
 $lang['Data updated with error'] = 'Data updated with error';
 
+$lang['Facepile'] = 'Facepile';
+$lang['on slideshow pages'] = 'on slideshow pages';
+$lang['Num rows'] = 'Num rows';
+$lang[''] = '';
+$lang[''] = '';
+$lang[''] = '';
+$lang[''] = '';
+$lang[''] = '';
+$lang[''] = '';
+$lang[''] = '';
+$lang[''] = '';
+$lang[''] = '';
+$lang[''] = '';
+$lang[''] = '';
+$lang[''] = '';
+$lang[''] = '';
+$lang[''] = '';
+$lang[''] = '';
+$lang[''] = '';
+
 ?>
Index: /extensions/FacebookPlug/Plugin/language/fr_FR/plugin.lang.php
===================================================================
--- /extensions/FacebookPlug/Plugin/language/fr_FR/plugin.lang.php	(revision 8281)
+++ /extensions/FacebookPlug/Plugin/language/fr_FR/plugin.lang.php	(revision 8282)
@@ -18,4 +18,5 @@
 // | USA.                                                                  |
 // +-----------------------------------------------------------------------+
+
 if (!defined('PHPWG_ROOT_PATH'))
 {
@@ -33,5 +34,5 @@
 $lang['light'] = 'clair';
 $lang['dark'] = 'foncé';
-$lang['Social plugin'] = 'Plugin social';
+$lang['Social plugins'] = 'Modules sociaux';
 $lang['Advanced'] = 'Avancé';
 $lang['Asynchronous Facebook access'] = 'Accès asynchrone à Facebook';
@@ -52,5 +53,7 @@
 $lang['Data updated with success'] = 'Données mises à jour avec succès';
 $lang['Data updated with error'] = 'Données mises à jour avec erreur';
-//~ $lang[''] = '';
+$lang['Facepile'] = 'Facepile';
+$lang['on slideshow pages'] = 'sur les diaporamas';
+$lang['Num rows'] = 'Nombre de lignes';
 
 ?>
Index: /extensions/FacebookPlug/Plugin/tpl/admin.config.tpl
===================================================================
--- /extensions/FacebookPlug/Plugin/tpl/admin.config.tpl	(revision 8281)
+++ /extensions/FacebookPlug/Plugin/tpl/admin.config.tpl	(revision 8282)
@@ -56,10 +56,25 @@
         </label>
       </li>
-{*      <li>
-        <span class="property">
-          <label for="fbp_day_number">{'fbp_day_number'|@translate}</label>
-        </span>
-        <input type="text" size="3" maxlength="4" name="fbp_day_number" id="fbp_day_number" value="{$fbp_DAY_NUMBER}" />
-      </li>*}
+    </div>
+  </ul>
+</fieldset>
+
+<fieldset>
+  <ul>
+    <h3><a href="{$social_plugin.facepile.FB_PAGE}" onclick="window.open(this.href); return false;">{'Facepile'|@translate}</a> {'on slideshow pages'|@translate}</h3>
+    <li>
+      <label>
+        <span class="property">{'Enabled'|@translate}</span>
+        <input type="checkbox" name="FBP_SOCIAL_PLUGIN_FACEPILE_ENABLED" {$social_plugin.facepile.ENABLED} />
+      </label>
+    </li>
+
+    <div id='facepile'>
+      <li>
+        <label>
+          <span class="property">{'Num rows'|@translate}</span>
+          <input type="text" size="3" maxlength="4" name="FBP_SOCIAL_PLUGIN_FACEPILE_MAX_ROWS" value="{$social_plugin.facepile.MAX_ROWS}" />
+        </label>
+      </li>
     </div>
   </ul>
@@ -80,5 +95,5 @@
         <label>
           <span class="property">{'Facebook Page URL'|@translate}</span>
-          <input type="text" size="79" name="FBP_SOCIAL_PLUGIN_LIKE_BOX_URL" value="{$social_plugin.like_box.URL}" />
+          <input type="text" size="39" name="FBP_SOCIAL_PLUGIN_LIKE_BOX_URL" value="{$social_plugin.like_box.URL}" />
         </label>
       </li>
@@ -172,4 +187,5 @@
       //Init all main checkbox
       init_checkbox("FBP_SOCIAL_PLUGIN_LIKE_BUTTON_ENABLED", "like_button");
+      init_checkbox("FBP_SOCIAL_PLUGIN_FACEPILE_ENABLED", "facepile");
       init_checkbox("FBP_SOCIAL_PLUGIN_LIKE_BOX_ENABLED", "like_box");
     });
Index: /extensions/FacebookPlug/Plugin/tpl/social.plugin.facepile.tpl
===================================================================
--- /extensions/FacebookPlug/Plugin/tpl/social.plugin.facepile.tpl	(revision 8282)
+++ /extensions/FacebookPlug/Plugin/tpl/social.plugin.facepile.tpl	(revision 8282)
@@ -0,0 +1,3 @@
+<div id="fb-xfbml-facepile">
+<fb:facepile href="{$fbp_url_picture}" width="{$fbp.social_plugin_facepile.width}" max_rows="{$fbp.social_plugin_facepile.max_rows}"></fb:facepile>
+</div>
Index: /extensions/FacebookPlug/Plugin/tpl/social.plugin.like.button.tpl
===================================================================
--- /extensions/FacebookPlug/Plugin/tpl/social.plugin.like.button.tpl	(revision 8281)
+++ /extensions/FacebookPlug/Plugin/tpl/social.plugin.like.button.tpl	(revision 8282)
@@ -1,3 +1,3 @@
 <div id="fb-xfbml-like-button">
-<fb:like href="{$fbp_url_picture}" width="{$fbp.social_plugin_like_button.width}" layout="{$fbp.social_plugin_like_button.layout}" show_faces="{$fbp.social_plugin_like_button.show_faces|@boolean_to_string}" {*width="{$WIDTH_IMG}"*} action="{$fbp.social_plugin_like_button.action}" colorscheme="{$fbp.social_plugin_like_button.colorscheme}"></fb:like>
+<fb:like href="{$fbp_url_picture}" width="{$fbp.social_plugin_like_button.width}" layout="{$fbp.social_plugin_like_button.layout}" show_faces="{$fbp.social_plugin_like_button.show_faces|@boolean_to_string}" action="{$fbp.social_plugin_like_button.action}" colorscheme="{$fbp.social_plugin_like_button.colorscheme}"></fb:like>
 </div>
