From 6800ac4d1b7c2090630a149d1b9789679d338911 Mon Sep 17 00:00:00 2001 From: Dylan Lloyd Date: Thu, 10 Mar 2011 04:03:04 -0500 Subject: [PATCH] Improved styling --- includes/ajax.js | 1 + includes/style.css | 3 ++- index.php | 27 ++++++++++++++------------- 3 files changed, 17 insertions(+), 14 deletions(-) diff --git a/includes/ajax.js b/includes/ajax.js index afc73e8..2bc9cce 100644 --- a/includes/ajax.js +++ b/includes/ajax.js @@ -1,4 +1,5 @@ $(document).ready(function() { + $('#recaptcha_widget').show(); $('.submit').click(function() { if ($('#comment_text').val() != '') { var challenge = Recaptcha.get_challenge(); diff --git a/includes/style.css b/includes/style.css index abdbb98..f076221 100644 --- a/includes/style.css +++ b/includes/style.css @@ -208,5 +208,6 @@ pre { right:0px; } -#recaptcha_div { +#recaptcha_widget { + display:none; } diff --git a/index.php b/index.php index ef5eddf..b773705 100644 --- a/index.php +++ b/index.php @@ -361,9 +361,6 @@ class note extends cms { } private function verify() { - var_dump($_POST['captcha']); - var_dump(isset($_POST['captcha'])); - var_dump(isset($_POST['captcha']) || false); if (!isset($_POST['captcha'])) { require_once('includes/recaptchalib.php'); echo "
"; @@ -404,9 +401,6 @@ class note extends cms {

END_OF_NAVIGATION; - if ($this->failed_captcha) { - echo "sorry, reCAPTCHA said you're not human.


"; - } if (!$this->comments_enabled) { $this->display_comment_link(); } @@ -466,8 +460,7 @@ Recaptcha.create("$publickey", END_CAPTCHA_STYLE; require_once('includes/recaptchalib.php'); - // Trailing slash is necessary for reloads to work - $url = $this->url . "verify/"; + $url = $this->url . "verify"; echo "
"; echo << @@ -490,15 +483,23 @@ END_CAPTCHA_STYLE;




+ END_OF_FORM; echo recaptcha_get_html($this->recaptcha_publickey); + if ($this->failed_captcha) { echo << - - - - + reCAPTCHA said you're not human, + + + END_OF_FORM; + } else { + echo << + + +END_OF_FORM; + } } } -- 2.30.2