Index: /extensions/ConcoursPhoto/admin/params.php
===================================================================
--- /extensions/ConcoursPhoto/admin/params.php	(revision 4259)
+++ /extensions/ConcoursPhoto/admin/params.php	(revision 4260)
@@ -14,4 +14,5 @@
 
   $concours->my_config['mask_author'] = isset($_POST['mask_author']);
+  $concours->my_config['thumb_note'] = isset($_POST['thumb_note']);
 
   $concours->save_config();
@@ -28,4 +29,5 @@
 	'SHOW_MENUBAR' 			=> ($concours->my_config['active_menubar'] ? 'checked="checked"' : ''),
     'MASK_AUTHOR' 			=> ($concours->my_config['mask_author'] ? 'checked="checked"' : ''),
+    'THUMB_NOTE' 			=> ($concours->my_config['thumb_note'] ? 'checked="checked"' : ''),
 			));
 
Index: /extensions/ConcoursPhoto/admin/template/params.tpl
===================================================================
--- /extensions/ConcoursPhoto/admin/template/params.tpl	(revision 4259)
+++ /extensions/ConcoursPhoto/admin/template/params.tpl	(revision 4260)
@@ -30,4 +30,10 @@
 		<TD colspan="2">
 		    <input type="checkbox" name="mask_author" {$MASK_AUTHOR}/> {'concours_mask_author'|@translate} 
+		    <br/>
+		</TD>
+	</TR>
+	<TR>
+		<TD colspan="2">
+		    <input type="checkbox" name="thumb_note" {$THUMB_NOTE}/> {'concours_thumb_note'|@translate} 
 		    <br/>
 		</TD>
Index: /extensions/ConcoursPhoto/include/Concours.class.php
===================================================================
--- /extensions/ConcoursPhoto/include/Concours.class.php	(revision 4259)
+++ /extensions/ConcoursPhoto/include/Concours.class.php	(revision 4260)
@@ -724,4 +724,46 @@
 }
 //  END DEBUG
+
+
+	// disable author name on image which are present in a concours.
+	// check the categories where the current image is present and disable the author name
+		if ($this->my_config['mask_author'] && $this->my_config['mask_author'] == true)
+		{
+			// Get all categories where the current image is present
+			$query = '
+			SELECT category_id,uppercats,commentable,global_rank
+			  FROM '.IMAGE_CATEGORY_TABLE.'
+				INNER JOIN '.CATEGORIES_TABLE.' ON category_id = id
+			  WHERE image_id = '.$page['image_id'].'
+			  ;';
+//	               echo $query;
+			$result = pwg_query($query);
+			$related_categories = array();
+			while ($row = mysql_fetch_array($result))
+			{
+			  array_push($related_categories, $row['category_id']);
+			}
+			//
+            //echo related_categories;
+            if (count($related_categories))
+            {
+                // Request for all concours prepared & actived on each categories
+                $query = '
+                    SELECT *
+                    FROM ' . CONCOURS_TABLE .' 
+                    WHERE category IN ('.implode(',', $related_categories).')
+                    AND time_to_sec(TIMEDIFF(now(), end_date)) < 0
+                ';
+        //                echo $query;
+                $result = pwg_query($query);
+                // If one or more concours are found, the author name is masked
+                if ($result && mysql_fetch_assoc($result))
+                    $template->assign('INFO_AUTHOR',l10n('concours_img_author'));
+            }
+		}
+
+	// End disable author name
+
+
 		if (($page['section']) == 'categories' AND !empty($page['category']))
 		{
@@ -729,5 +771,6 @@
 			//------------
 			// Step 1
-            
+
+/*            
             if ($this->my_config['mask_author'] && $this->my_config['mask_author'] == true)
             {
@@ -744,5 +787,5 @@
                     $template->assign('INFO_AUTHOR',l10n('concours_img_author'));
             }
-
+*/
             
 			$query = '
@@ -907,5 +950,6 @@
 				$template->assign( 'concours_infos', array(
 							'name'	=> $concours['name'],
-							'descr'	=> $concours['descr']
+							'descr'	=> $concours['descr'],
+                            'note'  => $this->get_img_globalnote_user($page['current_item'], $concours['id'])
 								));
 				
@@ -1446,5 +1490,5 @@
 	if ($menu->get_id() != 'menubar' OR $this->my_config['active_menubar'] == false)
 	  return;
-	$menu->register_block( new RegisteredBlock( 'CONCOURS_menu', 'Polls', 'MYPOLLS'));
+	$menu->register_block( new RegisteredBlock( 'CONCOURS_menu', 'concours', 'ConcoursPhoto'));
 	}
 
@@ -1546,4 +1590,5 @@
 		global $page;
 		
+		
 		if (isset($page['section']) and $page['section'] == 'concours')
 		{
@@ -1553,4 +1598,56 @@
 
 	
+  // Show the global note under the thumbnail
+  function thumbnail_note($tpl_var) 
+  {
+
+	global $page;
+	$this->get_user_groups();
+
+    if ($this->my_config['thumb_note'] && $this->my_config['thumb_note'] == true)
+    {
+        $concours = array();
+        if (($page['section']) == 'categories' AND !empty($page['category']))
+        {
+            $query = '
+                SELECT *
+                FROM ' . CONCOURS_TABLE .' 
+                WHERE category =' . $page['category']['id'] . '
+                AND time_to_sec(TIMEDIFF(begin_date,now())) < 0
+                AND time_to_sec(TIMEDIFF(now(), end_date)) < 0
+                ';
+
+            $result = pwg_query($query);
+    if ($this->debug) echo $query."\n";
+            while ($row = mysql_fetch_assoc($result))
+            {
+                
+                if (!empty($row['groups']))
+                {
+    if ($this->debug)	echo "GROUPS=".$row['groups'];				
+                    $authorized_groups = explode(',', $row['groups']);
+                    if (array_intersect($this->user_groups, $authorized_groups) == array()) 
+                    {
+    if ($this->debug)	echo "ERROR GROUPS";
+                        continue;
+                    }
+                    $concours = $row;
+                }
+            }
+            if (count($concours))
+            {
+
+                foreach($tpl_var as $cle=>$valeur) {
+                {
+                  $tpl_var[$cle]['NAME'] = $tpl_var[$cle]['NAME'].'<br>&nbsp;'.l10n('thumbnail_global_note').' : '.$this->get_img_globalnote_user($tpl_var[$cle]['ID'], $concours['id']);
+                  }
+                }
+            }
+        }
+    }
+    return $tpl_var;
+  }
+	
+	
 }
 
Index: /extensions/ConcoursPhoto/include/default_values.inc.php
===================================================================
--- /extensions/ConcoursPhoto/include/default_values.inc.php	(revision 4259)
+++ /extensions/ConcoursPhoto/include/default_values.inc.php	(revision 4260)
@@ -8,3 +8,4 @@
 $concours_default_values['nbconcours_menubar'] = 3;	// Nb of last published concours show on concours menubar
 $concours_default_values['mask_author'] =   true; // Mask author for prepared concours
+$concours_default_values['thumb_note'] = true; // Display global note (for user) under thumbnail
 ?>
Index: /extensions/ConcoursPhoto/language/fr_FR/plugin.lang.php
===================================================================
--- /extensions/ConcoursPhoto/language/fr_FR/plugin.lang.php	(revision 4259)
+++ /extensions/ConcoursPhoto/language/fr_FR/plugin.lang.php	(revision 4260)
@@ -69,3 +69,7 @@
 
 $lang['concours_mask_author']   =  'Masquer l\'auteur pour les concours préparés non actifs';
+
+$lang['thumbnail_global_note'] = 'Note concours';
+$lang['concours_thumb_note'] = 'Ajouter la note globale sous les miniatures';
+$lang['concours_global_user_note']  =   'Total enregistré';
 ?>
Index: /extensions/ConcoursPhoto/main.inc.php
===================================================================
--- /extensions/ConcoursPhoto/main.inc.php	(revision 4259)
+++ /extensions/ConcoursPhoto/main.inc.php	(revision 4260)
@@ -58,4 +58,7 @@
 add_event_handler('loc_end_index', array(&$concours, 'index_concours'));
 
+// Add Global note under thumbnail
+add_event_handler('loc_end_index_thumbnails', array(&$concours, 'thumbnail_note'), 50, 2);
+
 
 set_plugin_data($plugin['id'], $concours)
Index: /extensions/ConcoursPhoto/template/concours.tpl
===================================================================
--- /extensions/ConcoursPhoto/template/concours.tpl	(revision 4259)
+++ /extensions/ConcoursPhoto/template/concours.tpl	(revision 4260)
@@ -5,7 +5,12 @@
 	<table>
 		<tr>
-			<td align="left" colspan="5"><b>Concours : {$concours_infos.name}&nbsp;</b>
+			<td align="left" colspan="2"><b>Concours : {$concours_infos.name}&nbsp;</b>
 			<i>({$concours_infos.descr})</i>&nbsp;
-			<td>
+			</td>
+            <td align="right" colspan="2">
+                {'concours_global_user_note'|@translate} : <input type="text" size="4" maxlength="4" name="global_note" value="{$concours_infos.note}" disabled="disabled"/>&nbsp;
+            </td>
+            <td>&nbsp;
+            </td>
 		</tr>
 		<tr><td colspan="5"><br></td></tr>
