Index: /trunk/admin/configuration.php
===================================================================
--- /trunk/admin/configuration.php	(revision 41)
+++ /trunk/admin/configuration.php	(revision 42)
@@ -42,5 +42,5 @@
        'upload_maxfilesize', 'upload_maxwidth','upload_maxheight',
        'upload_maxwidth_thumbnail','upload_maxheight_thumbnail','log',
-       'comments_validation' );
+       'comments_validation','comments_forall' );
 $default_user_infos =
 array( 'nb_image_line','nb_line_page','language','maxwidth',
@@ -450,4 +450,36 @@
 $vtp->closeSession( $sub, 'param_line' );
 $vtp->closeSession( $sub, 'line' );
+// coments for all ? true -> guests can post messages
+$vtp->addSession( $sub, 'line' );
+$vtp->addSession( $sub, 'param_line' );
+$vtp->setVar( $sub, 'param_line.name', $lang['conf_comments_forall'] );
+$vtp->addSession( $sub, 'group' );
+$vtp->addSession( $sub, 'radio' );
+$vtp->setVar( $sub, 'radio.name', 'comments_forall' );
+$vtp->setVar( $sub, 'radio.value', 'true' );
+$vtp->setVar( $sub, 'radio.option', $lang['yes'] );
+$checked = '';
+if ( $comments_forall == 'true' )
+{
+  $checked = ' checked="checked"';
+}
+$vtp->setVar( $sub, 'radio.checked', $checked );
+$vtp->closeSession( $sub, 'radio' );
+$vtp->addSession( $sub, 'radio' );
+$vtp->setVar( $sub, 'radio.name', 'comments_forall' );
+$vtp->setVar( $sub, 'radio.value', 'false' );
+$vtp->setVar( $sub, 'radio.option', $lang['no'] );
+$checked = '';
+if ( $comments_forall == 'false' )
+{
+  $checked = ' checked="checked"';
+}
+$vtp->setVar( $sub, 'radio.checked', $checked );
+$vtp->closeSession( $sub, 'radio' );
+$vtp->closeSession( $sub, 'group' );
+$vtp->setVar( $sub, 'param_line.def',
+              $lang['conf_comments_forall_info'] );
+$vtp->closeSession( $sub, 'param_line' );
+$vtp->closeSession( $sub, 'line' );
 // number of comments per page
 $vtp->addSession( $sub, 'line' );
Index: /trunk/include/config.inc.php
===================================================================
--- /trunk/include/config.inc.php	(revision 41)
+++ /trunk/include/config.inc.php	(revision 42)
@@ -62,5 +62,6 @@
                 'upload_available', 'upload_maxfilesize', 'upload_maxwidth',
                 'upload_maxheight', 'upload_maxwidth_thumbnail',
-                'upload_maxheight_thumbnail','log','comments_validation' );
+                'upload_maxheight_thumbnail','log','comments_validation',
+                'comments_forall' );
 
 $query  = 'SELECT ';
Index: /trunk/language/francais.php
===================================================================
--- /trunk/language/francais.php	(revision 41)
+++ /trunk/language/francais.php	(revision 42)
@@ -345,4 +345,6 @@
   $lang['conf_comments_validation'] = 'validation';
   $lang['conf_comments_validation_info'] = 'L\'administrateur valide les commentaires avant qu\'ils apparaissent sur le site';
+  $lang['conf_comments_forall'] = 'pour tous ?';
+  $lang['conf_comments_forall_info'] = 'Même les invités non enregistrés peuvent déposer les messages';
   // $lang['conf_remote_site_title'] = 'Site distant';
 // end version 1.3
Index: /trunk/picture.php
===================================================================
--- /trunk/picture.php	(revision 41)
+++ /trunk/picture.php	(revision 42)
@@ -625,18 +625,25 @@
     $vtp->closeSession( $handle, 'comment' );
   }
-  // form action
-  $action = str_replace( '&', '&amp;', $_SERVER['REQUEST_URI'] );
-  $vtp->setGlobalVar( $handle, 'form_action', $action );
-  // display author field if the user is not logged in
-  if ( !$user['is_the_guest'] )
-  {
-    $vtp->addSession( $handle, 'author_known' );
-    $vtp->setVar( $handle, 'author_known.value', $user['pseudo'] );
-    $vtp->closeSession( $handle, 'author_known' );
-  }
-  else
-  {
-    $vtp->addSession( $handle, 'author_field' );
-    $vtp->closeSession( $handle, 'author_field' );
+
+  if ( !$user['is_the_guest']
+       or ( $user['is_the_guest'] and $conf['comments_forall'] ) )
+  {
+    $vtp->addSession( $handle, 'add_comment' );
+    // form action
+    $action = str_replace( '&', '&amp;', $_SERVER['REQUEST_URI'] );
+    $vtp->setGlobalVar( $handle, 'form_action', $action );
+    // display author field if the user is not logged in
+    if ( !$user['is_the_guest'] )
+    {
+      $vtp->addSession( $handle, 'author_known' );
+      $vtp->setVar( $handle, 'author_known.value', $user['pseudo'] );
+      $vtp->closeSession( $handle, 'author_known' );
+    }
+    else
+    {
+      $vtp->addSession( $handle, 'author_field' );
+      $vtp->closeSession( $handle, 'author_field' );
+    }
+    $vtp->closeSession( $handle, 'add_comment' );
   }
   $vtp->closeSession( $handle, 'comments' );
Index: /trunk/template/default/picture.vtp
===================================================================
--- /trunk/template/default/picture.vtp	(revision 41)
+++ /trunk/template/default/picture.vtp	(revision 42)
@@ -163,4 +163,5 @@
               </tr>
             </table>
+            <!--VTP_add_comment-->
             <form method="post" action="{#form_action}">
               <table style="width:100%;">
@@ -180,4 +181,5 @@
               </table>
             </form>
+            <!--/VTP_add_comment-->
           {#frame_end}
         </td>
