Index: /extensions/see_photos_by_user/admin.php
===================================================================
--- /extensions/see_photos_by_user/admin.php	(revision 27427)
+++ /extensions/see_photos_by_user/admin.php	(revision 27428)
@@ -18,4 +18,5 @@
 	'SPBU2' => $conf['see_photos_by_user_limit'],
 	'SPBU3' => $conf['see_photos_by_user_order'],
+	'SPBU4' => $conf['see_photos_by_user_show'],
     )
   );
@@ -37,5 +38,21 @@
 $template->assign('spbu', $SPBU3);
 $template->assign('spbuT', $SPBU3T); 
- 
+
+$SPBU3T2 = array(
+    l10n('link Specials menu')." - ".l10n('select users box'),
+    l10n('bloc menu users')." - ".l10n('select users box'),
+    l10n('link Specials menu')." - ".l10n('select users box')." - ".l10n('bloc menu users'),
+	l10n('bloc menu users'),
+  );
+  
+$SPBU32 = array(
+    '1',
+    '2',
+    '3',
+	'4',
+  );
+
+$template->assign('spbu2', $SPBU32);
+$template->assign('spbuT2', $SPBU3T2); 
 
 if (isset($_POST['submitspbu']))
@@ -50,4 +67,5 @@
 {array_push( $page['errors'], l10n('Minimal number photos for show users is incorrect !'));}
 conf_update_param('see_photos_by_user_order', $_POST['insspbu3']);
+conf_update_param('see_photos_by_user_show', $_POST['insspbu4']);
 
 if (!$page['errors'])
@@ -59,4 +77,5 @@
 	  'SPBU2' => stripslashes($_POST['insspbu2']),
 	  'SPBU3' => stripslashes($_POST['insspbu3']),
+	  'SPBU4' => stripslashes($_POST['insspbu4']),
       )
     );
Index: /extensions/see_photos_by_user/admin.tpl
===================================================================
--- /extensions/see_photos_by_user/admin.tpl	(revision 27427)
+++ /extensions/see_photos_by_user/admin.tpl	(revision 27428)
@@ -13,8 +13,11 @@
  </p>
  <p>
-  <strong>{'users order'|@translate}</strong> 
+  <strong>{'Users order'|@translate}</strong> 
   {html_options name="insspbu3" values=$spbu output=$spbuT selected="{$SPBU3}"}
  </p>
-
+ <p>
+  <strong>{'Show'|@translate}</strong> 
+  {html_options name="insspbu4" values=$spbu2 output=$spbuT2 selected="{$SPBU4}"}
+ </p>
   <p>
     <input class="submit" type="submit" name="submitspbu" value="{'Submit'|@translate}">
Index: /extensions/see_photos_by_user/language/da_DK/plugin.lang.php
===================================================================
--- /extensions/see_photos_by_user/language/da_DK/plugin.lang.php	(revision 27427)
+++ /extensions/see_photos_by_user/language/da_DK/plugin.lang.php	(revision 27428)
@@ -33,4 +33,4 @@
 $lang['users by reverse alphabetical order'] = 'brugere i omvendt alfabetisk rækkefølge';
 $lang['users in alphabetical order'] = 'brugere i alfabetisk rækkefølge';
-$lang['users order'] = 'brugerrækkefølge';
+$lang['Users order'] = 'brugerrækkefølge';
 ?>
Index: /extensions/see_photos_by_user/language/de_DE/plugin.lang.php
===================================================================
--- /extensions/see_photos_by_user/language/de_DE/plugin.lang.php	(revision 27427)
+++ /extensions/see_photos_by_user/language/de_DE/plugin.lang.php	(revision 27428)
@@ -31,4 +31,4 @@
 $lang['users by reverse alphabetical order'] = 'Benutzer in umgekehrter alphabetischer Anordnung';
 $lang['users in alphabetical order'] = 'Benutzer in alphabetischer Anordnung';
-$lang['users order'] = 'Benutzer Anordnung';
+$lang['Users order'] = 'Benutzer Anordnung';
 ?>
Index: /extensions/see_photos_by_user/language/en_UK/plugin.lang.php
===================================================================
--- /extensions/see_photos_by_user/language/en_UK/plugin.lang.php	(revision 27427)
+++ /extensions/see_photos_by_user/language/en_UK/plugin.lang.php	(revision 27428)
@@ -10,7 +10,10 @@
 $lang['Minimal number photos for show users'] = 'Minimal number photos for show users';
 $lang['Maximal number users'] = 'Maximal number users';
-$lang['users order'] = 'users order';
+$lang['Users order'] = 'users order';
 $lang['Maximal number users is incorrect !'] = 'Maximal number users is incorrect !';
 $lang['Minimal number photos for show users is incorrect !'] = 'Minimal number photos for show users is incorrect !';
-
+$lang['link Specials menu'] = 'link Specials menu';
+$lang['select users box'] = 'select users box';
+$lang['bloc menu users'] = 'bloc menu users';
+$lang['Show'] = 'Show';
 ?>
Index: /extensions/see_photos_by_user/language/fr_FR/plugin.lang.php
===================================================================
--- /extensions/see_photos_by_user/language/fr_FR/plugin.lang.php	(revision 27427)
+++ /extensions/see_photos_by_user/language/fr_FR/plugin.lang.php	(revision 27428)
@@ -10,6 +10,10 @@
 $lang['Minimal number photos for show users'] = 'Nombre minimal de photos pour montrer les utilisateurs';
 $lang['Maximal number users'] = 'nombre maximal d\'utilisateurs';
-$lang['users order'] = 'ordre des utilisateurs';
+$lang['Users order'] = 'Ordre des utilisateurs';
 $lang['Maximal number users is incorrect !'] = 'Le nombre minimal de photos pour montrer les utilisateurs est incorrect !';
 $lang['Minimal number photos for show users is incorrect !'] = 'Le nombre maximal d\'utilisateurs est incorrect !';
+$lang['link Specials menu'] = 'le liens dans le menu Spéciales';
+$lang['select users box'] = 'la boite de sélection d\'utilisateurs';
+$lang['bloc menu users'] = 'le bloc menu utilisateurs';
+$lang['Show'] = 'Montrer';
 ?>
Index: /extensions/see_photos_by_user/language/it_IT/plugin.lang.php
===================================================================
--- /extensions/see_photos_by_user/language/it_IT/plugin.lang.php	(revision 27427)
+++ /extensions/see_photos_by_user/language/it_IT/plugin.lang.php	(revision 27428)
@@ -23,5 +23,5 @@
 $lang['users by reverse alphabetical order'] = 'utenti per ordine alfabetico inverso';
 $lang['users in alphabetical order'] = 'utenti in ordine alfabetico';
-$lang['users order'] = 'ordine utenti';
+$lang['Users order'] = 'ordine utenti';
 $lang['select user'] = 'seleziona utente';
 $lang['submit'] = 'invia';
Index: /extensions/see_photos_by_user/main.inc.php
===================================================================
--- /extensions/see_photos_by_user/main.inc.php	(revision 27427)
+++ /extensions/see_photos_by_user/main.inc.php	(revision 27428)
@@ -15,5 +15,11 @@
 load_language('plugin.lang', SPBA_PATH);
 
+global $conf;
+$showSPBU = $conf['see_photos_by_user_show'];
+
+if ($showSPBU == 1 OR $showSPBU == 3)
+{
 add_event_handler('blockmanager_apply' , 'add_link_SPBA');
+}
 function add_link_SPBA($menu_ref_arr)
  {
@@ -56,4 +62,64 @@
 
 
+
+if ($showSPBU == 2 OR $showSPBU == 3 OR $showSPBU == 4)
+{
+add_event_handler('blockmanager_register_blocks', 'register_users_menubar_blocks');
+add_event_handler('blockmanager_apply', 'users_apply');
+}
+function register_users_menubar_blocks( $menu_ref_arr )
+{
+  $menu = & $menu_ref_arr[0];
+  if ($menu->get_id() != 'menubar')
+    return;
+  $menu->register_block( new RegisteredBlock( 'mbUsers','Users',('See photos by user')));
+}
+
+function users_apply($menu_ref_arr)
+{
+global $template, $conf, $user;
+$menu = & $menu_ref_arr[0];
+load_language('plugin.lang', SPBA_PATH);
+load_language('lang', PHPWG_ROOT_PATH.'local/', array('no_fallback'=>true, 'local'=>true));
+
+$userslistemenu1 = pwg_query('
+SELECT UT.id, UT.username, COUNT(DISTINCT(IT.id)) AS PBU, IT.id
+ FROM ' . USERS_TABLE . ' as UT
+ INNER JOIN '.IMAGES_TABLE.' AS IT ON IT.added_by = UT.id
+ INNER JOIN '.IMAGE_CATEGORY_TABLE.' AS ic ON IT.id = ic.image_id
+  '.get_sql_condition_FandF
+  (
+    array
+      (
+        'forbidden_categories' => 'category_id',
+        'visible_categories' => 'category_id',
+        'visible_images' => 'id'
+      ),
+    'WHERE'
+  ).'
+ GROUP BY IT.added_by
+ HAVING PBU >'.$conf['see_photos_by_user_nbphotos'].'
+ ORDER BY '.$conf['see_photos_by_user_order'].'
+ LIMIT '.$conf['see_photos_by_user_limit'].';');
+
+if (pwg_db_num_rows($userslistemenu1)) {	
+ while ($userslistemenu = pwg_db_fetch_assoc($userslistemenu1))
+	{
+    $items = array(
+      'USERSSPBYL' => $userslistemenu['username'],
+	  'USERSSPBYLC' => $userslistemenu['PBU'],
+		);
+		
+	$template->append('userslistemenu1', $items);
+  	}
+}
+$linkusersliste = get_root_url().'index.php?/user-';
+$template->assign('USERSSPBY', $linkusersliste);
+   
+ if (($block = $menu->get_block( 'mbUsers' )) != null) {
+ $template->set_template_dir(SPBA_PATH);
+ $block->template = 'menubar_users.tpl';}
+}
+
 add_event_handler('get_admin_plugin_menu_links', 'SPBA_admin_menu');
 function SPBA_admin_menu($menu)
Index: /extensions/see_photos_by_user/maintain.inc.php
===================================================================
--- /extensions/see_photos_by_user/maintain.inc.php	(revision 27427)
+++ /extensions/see_photos_by_user/maintain.inc.php	(revision 27428)
@@ -5,15 +5,19 @@
 function plugin_activate()
 {
- if (!isset($conf['see_photos_by_user_nbphotos']))
+if (!isset($conf['see_photos_by_user_nbphotos']))
  {
  conf_update_param('see_photos_by_user_nbphotos', '0');
  }
-  if (!isset($conf['see_photos_by_user_limit']))
+if (!isset($conf['see_photos_by_user_limit']))
  {
  conf_update_param('see_photos_by_user_limit', '1000');
  }
-   if (!isset($conf['see_photos_by_user_order']))
+if (!isset($conf['see_photos_by_user_order']))
  {
  conf_update_param('see_photos_by_user_order', 'username ASC');
+ }
+if (!isset($conf['see_photos_by_user_order']))
+ {
+ conf_update_param('see_photos_by_user_show', '1');
  }
 }
Index: /extensions/see_photos_by_user/menubar_users.tpl
===================================================================
--- /extensions/see_photos_by_user/menubar_users.tpl	(revision 27428)
+++ /extensions/see_photos_by_user/menubar_users.tpl	(revision 27428)
@@ -0,0 +1,10 @@
+<dt>{'Users'|@translate}</dt>
+<dd>
+ <ul>
+  {foreach from=$userslistemenu1 item=userslistemenu}
+  <li>
+  <a href = "{$USERSSPBY}{$userslistemenu.USERSSPBYL}">{$userslistemenu.USERSSPBYL} [{$userslistemenu.USERSSPBYLC}]</a><br>
+  </li>
+  {/foreach}
+  </lu>
+ </dd>
Index: /extensions/see_photos_by_user/pagespba.php
===================================================================
--- /extensions/see_photos_by_user/pagespba.php	(revision 27427)
+++ /extensions/see_photos_by_user/pagespba.php	(revision 27428)
@@ -57,4 +57,8 @@
 $page['section'] = $me;
 }
+$showSPBU = $conf['see_photos_by_user_show'];
+
+if ($showSPBU == 1 OR $showSPBU == 2 OR $showSPBU == 3)
+{
 //read auteur list
 $groups = array();
@@ -112,4 +116,4 @@
 $template->assign('SPBA2', 'toto');
 $template->set_filename('SPBA', realpath(SPBA_PATH.'pagespba.tpl'));
-$template->assign_var_from_handle('CONTENT', 'SPBA');
+$template->assign_var_from_handle('CONTENT', 'SPBA');}
 ?>
