--- posting.php.orig	2007-10-22 00:35:09.000000000 +0200
+++ posting.php	2007-10-22 00:49:36.000000000 +0200
@@ -554,6 +554,63 @@
 		case 'editpost':
 		case 'newtopic':
 		case 'reply':
+
+
+// add by reg : http://forums.phpbb-fr.com/viewtopic_86246.html
+
+          if ( $board_config['enable_confirm'] && !$userdata['session_logged_in'] )
+          {
+             if ( empty($HTTP_POST_VARS['confirm_id']) || empty($HTTP_POST_VARS['confirm_code']) )
+             {
+                $error = TRUE;
+                $error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['Confirm_code_wrong'];
+             }
+             else
+             {
+                $confirm_id = htmlspecialchars($HTTP_POST_VARS['confirm_id']);
+                if (!preg_match('/^[A-Za-z0-9]+$/', $confirm_id))
+                {
+                   $confirm_id = '';
+                }
+
+                $sql = 'SELECT code 
+                   FROM ' . CONFIRM_TABLE . " 
+                   WHERE confirm_id = '$confirm_id' 
+                      AND session_id = '" . $userdata['session_id'] . "'";
+                if (!($result = $db->sql_query($sql)))
+                {
+                   message_die(GENERAL_ERROR, 'Could not obtain confirmation code', __LINE__, __FILE__, $sql);
+                }
+
+                if ($row = $db->sql_fetchrow($result))
+                {
+                   if ($row['code'] != $HTTP_POST_VARS['confirm_code'])
+                   {
+                      $error = TRUE;
+                      $error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['Confirm_code_wrong'];
+                   }
+                   else
+                   {
+                      $sql = 'DELETE FROM ' . CONFIRM_TABLE . " 
+                         WHERE confirm_id = '$confirm_id' 
+                            AND session_id = '" . $userdata['session_id'] . "'";
+                      if (!$db->sql_query($sql))
+                      {
+                         message_die(GENERAL_ERROR, 'Could not delete confirmation code', __LINE__, __FILE__, $sql);
+                      }
+                   }
+                }
+                else
+                { 
+                   $error = TRUE;
+                   $error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['Confirm_code_wrong'];
+                } 
+                $db->sql_freeresult($result);
+             }
+          }
+
+//end
+
 			$username = ( !empty($HTTP_POST_VARS['username']) ) ? $HTTP_POST_VARS['username'] : '';
 			$subject = ( !empty($HTTP_POST_VARS['subject']) ) ? trim($HTTP_POST_VARS['subject']) : '';
 			$message = ( !empty($HTTP_POST_VARS['message']) ) ? $HTTP_POST_VARS['message'] : '';
@@ -961,6 +1018,70 @@
 		break;
 }
 
+// add by reg : http://forums.phpbb-fr.com/viewtopic_86246.html
+
+// 
+ // Visual confirmation for guests 
+ // 
+ $confirm_image = '';
+ if( !$userdata['session_logged_in'] && (!empty($board_config['enable_confirm'])) )
+ {
+    $sql = 'SELECT session_id 
+       FROM ' . SESSIONS_TABLE;
+    if (!($result = $db->sql_query($sql)))
+    {
+       message_die(GENERAL_ERROR, 'Could not select session data', '', __LINE__, __FILE__, $sql);
+    }
+
+    if ($row = $db->sql_fetchrow($result))
+    {
+       $confirm_sql = '';
+       do
+       {
+          $confirm_sql .= (($confirm_sql != '') ? ', ' : '') . "'" . $row['session_id'] . "'";
+       }
+       while ($row = $db->sql_fetchrow($result));
+
+       $sql = 'DELETE FROM ' .  CONFIRM_TABLE . " 
+          WHERE session_id NOT IN ($confirm_sql)";
+       if (!$db->sql_query($sql))
+       {
+          message_die(GENERAL_ERROR, 'Could not delete stale confirm data', '', __LINE__, __FILE__, $sql);
+       }
+    }
+    $db->sql_freeresult($result);
+
+    $confirm_chars = array('A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J',  'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T',  'U', 'V', 'W', 'X', 'Y', 'Z', '1', '2', '3', '4', '5', '6', '7', '8', '9');
+
+    list($usec, $sec) = explode(' ', microtime());
+    mt_srand($sec * $usec);
+
+    $max_chars = count($confirm_chars) - 1;
+    $code = '';
+    for ($i = 0; $i < 6; $i++)
+    {
+       $code .= $confirm_chars[mt_rand(0, $max_chars)];
+    }
+
+    $confirm_id = md5(uniqid($user_ip));
+
+    $sql = 'INSERT INTO ' . CONFIRM_TABLE . " (confirm_id, session_id, code) 
+       VALUES ('$confirm_id', '". $userdata['session_id'] . "', '$code')";
+    if (!$db->sql_query($sql))
+    {
+       message_die(GENERAL_ERROR, 'Could not insert new confirm code information', '', __LINE__, __FILE__, $sql);
+    }
+
+    unset($code);
+
+    $confirm_image = (@extension_loaded('zlib')) ? '<img src="' . append_sid("profile.$phpEx?mode=confirm&amp;id=$confirm_id") . '" alt="" title="" />' : '<img src="' . append_sid("profile.$phpEx?mode=confirm&amp;id=$confirm_id&amp;c=1") . '" alt="" title="" /><img src="' . append_sid("profile.$phpEx?mode=confirm&amp;id=$confirm_id&amp;c=2") . '" alt="" title="" /><img src="' . append_sid("profile.$phpEx?mode=confirm&amp;id=$confirm_id&amp;c=3") . '" alt="" title="" /><img src="' . append_sid("profile.$phpEx?mode=confirm&amp;id=$confirm_id&amp;c=4") . '" alt="" title="" /><img src="' . append_sid("profile.$phpEx?mode=confirm&amp;id=$confirm_id&amp;c=5") . '" alt="" title="" /><img src="' . append_sid("profile.$phpEx?mode=confirm&amp;id=$confirm_id&amp;c=6") . '" alt="" title="" />';
+    $hidden_form_fields .= '<input type="hidden" name="confirm_id" value="' . $confirm_id . '" />';
+
+    $template->assign_block_vars('switch_confirm', array());
+ }
+
+// end
+
 // Generate smilies listing for page output
 generate_smilies('inline', PAGE_POSTING);
 
@@ -1001,6 +1122,12 @@
 	'BBCODE_STATUS' => sprintf($bbcode_status, '<a href="' . append_sid("faq.$phpEx?mode=bbcode") . '" target="_phpbbcode">', '</a>'), 
 	'SMILIES_STATUS' => $smilies_status, 
 
+// add by reg : http://forums.phpbb-fr.com/viewtopic_86246.html
+
+   'CONFIRM_IMG' => $confirm_image,
+
+// end
+
 	'L_SUBJECT' => $lang['Subject'],
 	'L_MESSAGE_BODY' => $lang['Message_body'],
 	'L_OPTIONS' => $lang['Options'],
@@ -1016,6 +1143,14 @@
 	'L_NOTIFY_ON_REPLY' => $lang['Notify'], 
 	'L_DELETE_POST' => $lang['Delete_post'],
 
+// add by reg : http://forums.phpbb-fr.com/viewtopic_86246.html
+
+   'L_CONFIRM_CODE_IMPAIRED'   => sprintf($lang['Confirm_code_impaired'], '<a href="mailto:' . $board_config['board_email'] . '">', '</a>'), 
+    'L_CONFIRM_CODE' => $lang['Confirm_code'],
+    'L_CONFIRM_CODE_EXPLAIN' => $lang['Confirm_code_explain'],
+
+// end
+
 	'L_BBCODE_B_HELP' => $lang['bbcode_b_help'], 
 	'L_BBCODE_I_HELP' => $lang['bbcode_i_help'], 
 	'L_BBCODE_U_HELP' => $lang['bbcode_u_help'], 
--- templates/subSilver/posting_body.tpl.orig	2007-10-22 02:14:56.000000000 +0200
+++ templates/subSilver/posting_body.tpl	2007-10-22 00:58:18.000000000 +0200
@@ -461,6 +461,23 @@
 	  </td>
 	</tr>
 	{POLLBOX}
+
+<!-- // add by reg : http://forums.phpbb-fr.com/viewtopic_86246.html -->
+
+    <!-- Visual Confirmation -->
+    <!-- BEGIN switch_confirm -->
+    <tr>
+       <td class="row1" colspan="2" align="center"><span class="gensmall">{L_CONFIRM_CODE_IMPAIRED}</span><br /><br />{CONFIRM_IMG}<br /><br /></td>
+    </tr>
+    <tr>
+      <td class="row1"><span class="gen">{L_CONFIRM_CODE}: * </span><br /><span class="gensmall">{L_CONFIRM_CODE_EXPLAIN}</span></td>
+      <td class="row2"><input type="text" class="post" style="width: 200px" name="confirm_code" size="6" maxlength="6" value="" /></td>
+    </tr>
+    <!-- END switch_confirm -->
+
+<!-- // end -->
+
+
 	<tr> 
 	  <td class="catBottom" colspan="2" align="center" height="28"> {S_HIDDEN_FORM_FIELDS}<input type="submit" tabindex="5" name="preview" class="mainoption" value="{L_PREVIEW}" />&nbsp;<input type="submit" accesskey="s" tabindex="6" name="post" class="mainoption" value="{L_SUBMIT}" /></td>
 	</tr>
