Index: smf/Sources/Post.php
===================================================================
--- smf/Sources/Post.php (revision 1175)
+++ smf/Sources/Post.php (working copy)
@@ -1392,6 +1392,18 @@ function Post2()
$_POST['email'] = addslashes($user_info['email']);
}
+ // FIXME: IA HACK:
+ // Check if the captcha was correct by guest
+ if ($posterIsGuest && !isset($_REQUEST['msg']) && !IA_DEVELOPMENT_MODE) {
+ if (recaptcha_check_answer(IA_CAPTCHA_PRIVATE_KEY,
+ $_SERVER["REMOTE_ADDR"],
+ $_POST['recaptcha_challenge_field'],
+ $_POST['recaptcha_response_field'])
+ -> is_valid == false) {
+ $post_errors[] = 'wrong_captcha';
+ }
+ }
+
// Any mistakes?
if (!empty($post_errors))
{
@@ -2392,4 +2404,4 @@ function JavaScriptModify()
obExit(false);
}
-?>
\ No newline at end of file
+?>
Index: smf/Themes/default/Post.template.php
===================================================================
--- smf/Themes/default/Post.template.php (revision 1175)
+++ smf/Themes/default/Post.template.php (working copy)
@@ -335,6 +335,25 @@ function template_main()
';
+
+ if (!IA_DEVELOPMENT_MODE) {
+ // FIXME: IA HACK: recaptcha for visitors posting
+ echo '
+
+
+ Verificati-va identitatea:
+ |
+
+
+ ', recaptcha_get_html(IA_CAPTCHA_PUBLIC_KEY),
+ ' |
+
';
+ }
}
// Are you posting a calendar event?
@@ -1186,4 +1205,4 @@ function template_announcement_send()
// ]]>';
}
-?>
\ No newline at end of file
+?>
Index: smf/infoarena.php
===================================================================
--- smf/infoarena.php (revision 1175)
+++ smf/infoarena.php (working copy)
@@ -9,13 +9,13 @@
define("IA_FROM_SMF", true);
-require_once(IA_ROOT_DIR."common/common.php");
-require_once(IA_ROOT_DIR."common/log.php");
+require_once(IA_ROOT_DIR . 'common/common.php');
+require_once(IA_ROOT_DIR . 'common/external_libs/recaptchalib.php');
+require_once(IA_ROOT_DIR . 'common/log.php');
check_requirements();
-require_once(IA_ROOT_DIR."common/security.php");
-require_once(IA_ROOT_DIR."www/utilities.php");
-require_once(IA_ROOT_DIR."www/identity.php");
-
+require_once(IA_ROOT_DIR . 'common/security.php');
+require_once(IA_ROOT_DIR . 'www/utilities.php');
+require_once(IA_ROOT_DIR . 'www/identity.php');
// init SMF hooks to integrate with infoarena
// These are native integration features built into SMF. Sweet!
Index: www/static/css/screen.css
===================================================================
--- www/static/css/screen.css (revision 1175)
+++ www/static/css/screen.css (working copy)
@@ -487,11 +487,6 @@ The basic layout of the homepage is as follows:
font-size: 13px;
padding-left: 5px;
background-color: transparent;
- border: 1px solid;
-}
-
-.blogheader span {
- vertical-align: middle;
}
.blogheader img {