Index: smf/Sources/Post.php
===================================================================
--- smf/Sources/Post.php	(revision 983)
+++ smf/Sources/Post.php	(working copy)
@@ -1,4 +1,6 @@
 <?php
+require_once(IA_ROOT_DIR."common/external_libs/recaptchalib.php");
+
 /**********************************************************************************
 * Post.php                                                                        *
 ***********************************************************************************
@@ -365,6 +367,18 @@
 	// Previewing, modifying, or posting?
 	if (isset($_REQUEST['message']) || !empty($context['post_error']))
 	{
+		if($user_info['is_guest'])
+		{
+			$resp = recaptcha_check_answer(IA_CAPTCHA_PRIVATE_KEY,
+									   $_SERVER["REMOTE_ADDR"],
+									   $_POST['recaptcha_challenge_field'],
+									   $_POST['recaptcha_response_field']);
+					
+			if (!$resp->is_valid) {
+				$context['post_error']['wrong_captcha'] = true;
+			}
+		}
+
 		// Validate inputs.
 		if (empty($context['post_error']))
 		{
@@ -403,8 +417,9 @@
 					elseif (preg_match('~^[0-9A-Za-z=_+\-/][0-9A-Za-z=_\'+\-/\.]*@[\w\-]+(\.[\w\-]+)*(\.[\w]{2,6})$~', stripslashes($_REQUEST['email'])) == 0)
 						$context['post_error']['bad_email'] = true;
 				}
-			}
 
+   			}
+
 			// This is self explanatory - got any questions?
 			if (isset($_REQUEST['question']) && trim($_REQUEST['question']) == '')
 				$context['post_error']['no_question'] = true;
@@ -742,7 +757,7 @@
 			$form_message = '';
 		}
 	}
-
+	
 	// !!! This won't work if you're posting an event.
 	if (allowedTo('post_attachment'))
 	{
@@ -1238,7 +1253,7 @@
 		}
 	}
 
-	// If the poster is a guest evaluate the legality of name and email.
+	// If the poster is a guest evaluate the legality of name, email and captcha
 	if ($posterIsGuest)
 	{
 		$_POST['guestname'] = !isset($_POST['guestname']) ? '' : trim($_POST['guestname']);
@@ -1263,6 +1278,15 @@
 			// Now make sure this email address is not banned from posting.
 			isBannedEmail($_POST['email'], 'cannot_post', sprintf($txt['you_are_post_banned'], $txt[28]));
 		}
+
+		$resp = recaptcha_check_answer(IA_CAPTCHA_PRIVATE_KEY,
+								   $_SERVER["REMOTE_ADDR"],
+								   $_POST['recaptcha_challenge_field'],
+								   $_POST['recaptcha_response_field']);
+				
+		if (!$resp->is_valid) {
+			$post_errors[] = 'wrong_captcha';
+		}
 	}
 	// Check the subject and message.
 	if (!isset($_POST['subject']) || $func['htmltrim']($_POST['subject']) === '')
@@ -2337,4 +2361,4 @@
 		obExit(false);
 }
 
-?>
\ No newline at end of file
+?>
Index: smf/Themes/default/Post.template.php
===================================================================
--- smf/Themes/default/Post.template.php	(revision 983)
+++ smf/Themes/default/Post.template.php	(working copy)
@@ -1,5 +1,6 @@
 <?php
 // Version: 1.1; Post
+require_once(IA_ROOT_DIR."common/external_libs/recaptchalib.php");
 
 // The main template for the post page.
 function template_main()
@@ -335,6 +336,7 @@
 									<input type="text" name="email" size="25" value="', $context['email'], '" tabindex="', $context['tabindex']++, '" />
 								</td>
 							</tr>';
+	
 	}
 
 	// Are you posting a calendar event?
@@ -518,7 +520,27 @@
 											', $context['last_modified'], '
 										</td>
 									</tr>';
-
+	
+	// if the user is guest, he is shown a captcha
+	if (isset($context['name']) && isset($context['email']))
+	{
+		echo '
+							<tr>
+								<td align="right" style="font-weight: bold;', isset($context['post_error']['wrong_captcha']) ? 'color: red;' : '', '" id="caption_captcha">',
+									$txt['captcha'], ': 
+								</td>
+								<td>
+									<script>
+										var RecaptchaOptions = {
+										theme : \'clean\',
+										};
+									</script>
+								';
+		echo recaptcha_get_html(IA_CAPTCHA_PUBLIC_KEY);
+		echo '	
+								</td>
+							</tr>';
+	}
 	// If the admin has enabled the hiding of the additional options - show a link and image for it.
 	if (!empty($settings['additional_options_collapsable']))
 		echo '
@@ -620,6 +642,7 @@
 							</tr>';
 	}
 
+
 	// Finally, the submit buttons.
 	echo '
 							<tr>
@@ -1186,4 +1209,4 @@
 		// ]]></script>';
 }
 
-?>
\ No newline at end of file
+?>
Index: smf/Themes/default/languages/Errors.romanian-utf8.php
===================================================================
--- smf/Themes/default/languages/Errors.romanian-utf8.php	(revision 983)
+++ smf/Themes/default/languages/Errors.romanian-utf8.php	(working copy)
@@ -212,6 +212,7 @@
 $txt['error_bad_bcc'] = 'Unul sau mai mulţi \'si către \' - destinatari nu au putut fi găsiţi.';
 $txt['error_form_already_submitted'] = 'Deja ai trimis acest mesaj! Probabil ai apasat din greseala dublu-click, sau ai încearcat refresh.';
 $txt['error_poll_few'] = 'Trebuie să ai cel puţin două opţiuni!';
+$txt['error_wrong_captcha'] = 'Cuvintele introduse pentru verificare sunt incorecte.';
 
 $txt['smiley_not_found'] = 'Zâmbetul nu a fost găsit.';
 $txt['smiley_has_no_code'] = 'Nu ai dat nici un cod pentru acest zâmbet.';
@@ -290,4 +291,4 @@
 
 $txt['visual_verification_failed'] = 'Literele introduse de tine nu corespund cu cele afişate în fotografie.';
 
-?>
\ No newline at end of file
+?>
Index: smf/Themes/default/languages/Post.romanian-utf8.php
===================================================================
--- smf/Themes/default/languages/Post.romanian-utf8.php	(revision 983)
+++ smf/Themes/default/languages/Post.romanian-utf8.php	(working copy)
@@ -183,4 +183,6 @@
 $txt['announce_topic'] = 'Anunţa mesajul.';
 $txt['announce_regular_members'] = 'Membri obişnuiţi';
 
-?>
\ No newline at end of file
+$txt['captcha'] = 'Captcha';
+
+?>
