Index: /trunk/admin/configuration.php
===================================================================
--- /trunk/admin/configuration.php	(revision 1762)
+++ /trunk/admin/configuration.php	(revision 1763)
@@ -233,4 +233,6 @@
     $show_yes = ($conf['show_nb_comments']==true)?'checked="checked"':'';
     $show_no = ($conf['show_nb_comments']==false)?'checked="checked"':'';
+    $hits_yes = ($conf['show_nb_hits']==true)?'checked="checked"':'';
+    $hits_no = ($conf['show_nb_hits']==false)?'checked="checked"':'';
     $expand_yes = ($conf['auto_expand']==true)?'checked="checked"':'';
     $expand_no  = ($conf['auto_expand']==false)?'checked="checked"':'';
@@ -248,5 +250,7 @@
         'EXPAND_NO'=>$expand_no,
         'SHOW_COMMENTS_YES'=>$show_yes,
-        'SHOW_COMMENTS_NO'=>$show_no
+        'SHOW_COMMENTS_NO'=>$show_no,
+        'SHOW_HITS_YES'=>$hits_yes,
+        'SHOW_HITS_NO'=>$hits_no,
         ));
 
Index: /trunk/admin/include/functions.php
===================================================================
--- /trunk/admin/include/functions.php	(revision 1762)
+++ /trunk/admin/include/functions.php	(revision 1763)
@@ -1158,4 +1158,6 @@
       $insert['show_nb_comments'] =
         boolean_to_string($conf['show_nb_comments']);
+      $insert['show_nb_hits'] =
+        boolean_to_string($conf['show_nb_hits']);
       $insert['maxwidth'] = $conf['default_maxwidth'];
       $insert['maxheight'] = $conf['default_maxheight'];
Index: /trunk/admin/user_list.php
===================================================================
--- /trunk/admin/user_list.php	(revision 1762)
+++ /trunk/admin/user_list.php	(revision 1763)
@@ -343,7 +343,8 @@
     array('nb_image_line', 'nb_line_page', 'template', 'language',
           'recent_period', 'maxwidth', 'expand', 'show_nb_comments',
-          'maxheight', 'status', 'enabled_high');
-
-  $true_false_fields = array('expand', 'show_nb_comments', 'enabled_high');
+          'show_nb_hits', 'maxheight', 'status', 'enabled_high');
+
+  $true_false_fields = array('expand', 'show_nb_comments', 
+                       'show_nb_hits', 'enabled_high');
   if ($conf['allow_adviser'])
   {
@@ -557,4 +558,5 @@
 //   $user['expand'] = $conf['auto_expand'];
 //   $user['show_nb_comments'] = $conf['show_nb_comments'];
+//   $user['show_nb_hits'] = $conf['show_nb_hits'];
 // ---
 
@@ -577,4 +579,8 @@
       'SHOW_NB_COMMENTS_NO' =>
         'false' == $_POST['show_nb_comments'] ? 'checked="checked"' : '',
+      'SHOW_NB_HITS_YES' =>
+        'true' == $_POST['show_nb_hits'] ? 'checked="checked"' : '',
+      'SHOW_NB_HITS_NO' =>
+        'false' == $_POST['show_nb_hits'] ? 'checked="checked"' : '',
       'ENABLED_HIGH_YES' => 'true' == $_POST['enabled_high'] ? 'checked="checked"' : '',
       'ENABLED_HIGH_NO' => 'false' == $_POST['enabled_high'] ? 'checked="checked"' : '',
Index: /trunk/include/category_default.inc.php
===================================================================
--- /trunk/include/category_default.inc.php	(revision 1762)
+++ /trunk/include/category_default.inc.php	(revision 1763)
@@ -105,4 +105,12 @@
       )
     );
+  if ($user['show_nb_hits']
+      and isset($page['category']) 
+      and $conf['show_nb_hits'])
+  {
+    $template->assign_block_vars(
+      'thumbnails.line.thumbnail.nb_hits',
+      array('HITS'=> l10n_dec('%d hit', '%d hits', $row['hit'])));
+  }
 
   if ($conf['show_thumbnail_caption'])
Index: /trunk/include/config_default.inc.php
===================================================================
--- /trunk/include/config_default.inc.php	(revision 1762)
+++ /trunk/include/config_default.inc.php	(revision 1763)
@@ -161,4 +161,8 @@
 // bottom of each page ?
 $conf['show_version'] = true;
+
+// show_nb_hits :  	Show hits count under thumbnails
+// false = never... true = depending on profile...
+$conf['show_nb_hits'] = false;
 
 // links : list of external links to add in the menu. An example is the best
Index: /trunk/include/functions_user.inc.php
===================================================================
--- /trunk/include/functions_user.inc.php	(revision 1762)
+++ /trunk/include/functions_user.inc.php	(revision 1763)
@@ -161,4 +161,5 @@
     $user['expand'] = $conf['auto_expand'];
     $user['show_nb_comments'] = $conf['show_nb_comments'];
+    $user['show_nb_hits'] = $conf['show_nb_hits'];
     $user['enabled_high'] = $conf['newuser_default_enabled_high'];
   }
@@ -776,4 +777,5 @@
       'expand' => boolean_to_string($conf['auto_expand']),
       'show_nb_comments' => boolean_to_string($conf['show_nb_comments']),
+      'show_nb_hits' => boolean_to_string($conf['show_nb_hits']),
       'maxwidth' => $conf['default_maxwidth'],
       'maxheight' => $conf['default_maxheight'],
Index: /trunk/language/en_UK.iso-8859-1/common.lang.php
===================================================================
--- /trunk/language/en_UK.iso-8859-1/common.lang.php	(revision 1762)
+++ /trunk/language/en_UK.iso-8859-1/common.lang.php	(revision 1763)
@@ -300,4 +300,6 @@
 $lang['%d new comment'] = '%d new comment';
 $lang['%d new comments'] = '%d new comments';
+$lang['%d hit'] = '%d hit';
+$lang['%d hits'] = '%d hits';
 $lang['%d new element'] = '%d new element';
 $lang['%d new elements'] = '%d new elements';
@@ -571,4 +573,5 @@
 $lang['set as category representative'] = 'set as category representative';
 $lang['show_nb_comments'] = 'Show number of comments';
+$lang['show_nb_hits'] = 'Show hits count';
 $lang['slideshow'] = 'slideshow';
 $lang['slideshow_stop'] = 'stop the slideshow';
Index: /trunk/language/en_UK.iso-8859-1/help/configuration.html
===================================================================
--- /trunk/language/en_UK.iso-8859-1/help/configuration.html	(revision 1762)
+++ /trunk/language/en_UK.iso-8859-1/help/configuration.html	(revision 1763)
@@ -94,4 +94,10 @@
   for each picture on the thumbnails page. Resource consuming.</li>
 
+  <li><strong>Show hits count</strong>: display hits observed on picture
+  just under its thumbnail on the thumbnails page. 
+  Only when advanced configuration parameter is: <br />
+  $conf['show_nb_hits'] = true; <br />
+  Notice: it is false by default.</li>
+
   <li><strong>Maximum width of the pictures</strong>: maximum displayed
   width. If pictures are larger than this setting, they will be resized on
Index: /trunk/language/fr_FR.iso-8859-1/common.lang.php
===================================================================
--- /trunk/language/fr_FR.iso-8859-1/common.lang.php	(revision 1762)
+++ /trunk/language/fr_FR.iso-8859-1/common.lang.php	(revision 1763)
@@ -300,4 +300,6 @@
 $lang['%d new comment'] = '%d nouveau commentaire utilisateur';
 $lang['%d new comments'] = '%d nouveaux commentaires utilisateur';
+$lang['%d hit'] = 'vue %d fois';
+$lang['%d hits'] = 'vue %d fois';
 $lang['%d new element'] = '%d nouvel élément';
 $lang['%d new elements'] = '%d nouveaux éléments';
@@ -572,4 +574,5 @@
 $lang['set as category representative'] = 'élire comme représentant de cette catégorie';
 $lang['show_nb_comments'] = 'Montrer le nombre de commentaires';
+$lang['show_nb_hits'] = 'Montrer le nombre de visualisations';
 $lang['slideshow'] = 'diaporama';
 $lang['slideshow_stop'] = 'arrêter le diaporama';
Index: /trunk/language/fr_FR.iso-8859-1/help/configuration.html
===================================================================
--- /trunk/language/fr_FR.iso-8859-1/help/configuration.html	(revision 1762)
+++ /trunk/language/fr_FR.iso-8859-1/help/configuration.html	(revision 1763)
@@ -99,4 +99,10 @@
 ressources.</li>
 
+  <li><strong>Montrer le nombre de visualisations  </strong>: affiche les 
+  « hits » relevés sur une image sous sa miniature dans la page de miniatures.
+  Uniquement valable si le paramètre de configuration avancée est :<br />
+  $conf['show_nb_hits'] = true; <br />
+  N.B.: par defaut il est à false.</li>
+
   <li><strong>Largeur maximum des images</strong>: à l'affichage. Si l'image
 est plus large que ce paramètre, alors elle sera redimensionnée à
Index: /trunk/profile.php
===================================================================
--- /trunk/profile.php	(revision 1762)
+++ /trunk/profile.php	(revision 1763)
@@ -173,5 +173,5 @@
     $fields = array(
       'nb_image_line', 'nb_line_page', 'language', 'maxwidth', 'maxheight',
-      'expand', 'show_nb_comments', 'recent_period', 'template'
+      'expand', 'show_nb_comments', 'show_nb_hits', 'recent_period', 'template'
       );
 
@@ -202,8 +202,14 @@
   $template->set_filename('profile_content', 'profile_content.tpl');
 
-  $expand = ($userdata['expand'] == 'true') ? 'EXPAND_TREE_YES':'EXPAND_TREE_NO';
+  $expand = ($userdata['expand'] == 'true') ? 
+            'EXPAND_TREE_YES':'EXPAND_TREE_NO';
 
   $nb_comments =
-    ($userdata['show_nb_comments'] == 'true') ? 'NB_COMMENTS_YES':'NB_COMMENTS_NO';
+    ($userdata['show_nb_comments'] == 'true') ? 
+               'NB_COMMENTS_YES':'NB_COMMENTS_NO';
+
+  $nb_hits =
+    ($userdata['show_nb_hits'] == 'true') ? 
+               'NB_HITS_YES':'NB_HITS_NO';
 
   $template->assign_vars(
@@ -220,4 +226,5 @@
       $expand=>'checked="checked"',
       $nb_comments=>'checked="checked"',
+      $nb_hits=>'checked="checked"',
   
       'REDIRECT' => $url_redirect,
Index: /trunk/template/yoga/admin/configuration.tpl
===================================================================
--- /trunk/template/yoga/admin/configuration.tpl	(revision 1762)
+++ /trunk/template/yoga/admin/configuration.tpl	(revision 1763)
@@ -195,4 +195,10 @@
 
     <li>
+      <span class="property">{lang:show_nb_hits}</span>
+      <label><input type="radio" class="radio" name="show_nb_hits" value="true" {default.SHOW_HITS_YES} />{lang:Yes}</label>
+      <label><input type="radio" class="radio" name="show_nb_hits" value="false" {default.SHOW_HITS_NO} />{lang:No}</label>
+    </li>
+
+    <li>
       <span class="property">
         <label for="default_maxwidth">{lang:Maximum width of the pictures}</label>
Index: /trunk/template/yoga/admin/user_list.tpl
===================================================================
--- /trunk/template/yoga/admin/user_list.tpl	(revision 1762)
+++ /trunk/template/yoga/admin/user_list.tpl	(revision 1763)
@@ -269,4 +269,14 @@
 
   <tr>
+    <td>{lang:show_nb_hits}</td>
+    <td>
+      <label><input type="radio" name="show_nb_hits" value="leave" checked="checked" /> {lang:leave}</label>
+      / {lang:set to}
+      <label><input type="radio" name="show_nb_hits" value="true" {SHOW_NB_HITS_YES} />{lang:yes}</label>
+      <label><input type="radio" name="show_nb_hits" value="false" {SHOW_NB_HITS_NO} />{lang:no}</label>
+    </td>
+  </tr>
+
+  <tr>
     <td>{lang:maxwidth}</td>
     <td>
Index: /trunk/template/yoga/profile_content.tpl
===================================================================
--- /trunk/template/yoga/profile_content.tpl	(revision 1762)
+++ /trunk/template/yoga/profile_content.tpl	(revision 1763)
@@ -92,4 +92,9 @@
       </li>
       <li>
+        <span class="property">{lang:show_nb_hits}</span>
+        <label><input type="radio" name="show_nb_hits" value="true" {NB_HITS_YES}> {lang:yes}</label>
+        <label><input type="radio" name="show_nb_hits" value="false" {NB_HITS_NO}> {lang:no}</label>
+      </li>
+      <li>
         <span class="property">
           <label for="maxwidth">{lang:maxwidth}</label>
Index: /trunk/template/yoga/thumbnails.tpl
===================================================================
--- /trunk/template/yoga/thumbnails.tpl	(revision 1762)
+++ /trunk/template/yoga/thumbnails.tpl	(revision 1763)
@@ -24,4 +24,7 @@
       <br />{thumbnails.line.thumbnail.nb_comments.NB_COMMENTS} {lang:comments}
       <!-- END nb_comments -->
+      <!-- BEGIN nb_hits -->
+      <br />{thumbnails.line.thumbnail.nb_hits.HITS}
+      <!-- END nb_comments -->
       </span>
     </span>
