I had the same problem with the spam comments. Try this:
1. Go to
reCaptcha.net and sign up.
2. Once you sign up, save your private and public keys where you can access them quickly.
3. Download the latest version of reCaptcha for PHP
here.
4. Copy
recaptchalib.php into your
/inc folder under you cutenews directory.
5. Open the
shows.inc.php file under that
/inc folder.
6. Find:
CODE
if($allow_add_comment){
And add this
BELOW it.
CODE
//----------------------------------
// Recaptcha
//----------------------------------
require_once('recaptchalib.php');
$privatekey = "###";
$resp = recaptcha_check_answer ($privatekey,
$_SERVER["REMOTE_ADDR"],
$_POST["recaptcha_challenge_field"],
$_POST["recaptcha_response_field"]);
if (!$resp->is_valid) {
die ("The reCAPTCHA wasn't entered correctly. Go back and try it again." .
"(reCAPTCHA said: " . $resp->error . ")");
}
(Replace the
### with your
private key.)
This code validates the captcha.
7. Now find:
CODE
$template_form = str_replace("{smilies}", $smilies_form, $template_form);
And add this
ABOVE it:
CODE
require_once('recaptchalib.php');
$publickey = "###";
$template_form = str_replace("{captcha}", recaptcha_get_html($publickey), $template_form);
(Replace the
### with your
public key.
This code will display your captcha.
8. Finally, find:
CODE
echo"<div style=\"text-align: center;\">This name is owned by a registered user and you must enter password to use it<br />
<form name=passwordForm id=passwordForm method=\"post\" action=\"\">
And
REPLACE it with this:
CODE
echo"<div style=\"text-align: center;\">";
echo"<form name=passwordForm id=passwordForm method=\"post\" action=\"\">";
require_once('recaptchalib.php');
$publickey = "###";
echo recaptcha_get_html($publickey);
echo"
(Replace the
### with your
public key.)
This code adds the captcha window to the page displayed when an admin needs to verify their password when they leave a comment.
The rearranging happens because recaptcha needs to be inside the
<form> tag.
9. Save the
shows.inc.php file.
10. Go to your cutenews control panel (i.e. -
http://www.yoursite.com/cutenews/index.php) and select
Options.
11. Click on
Edit Templates.
12. Now click on the
Add Comment Form part and add the below to wherever you want the captcha to be displayed.
CODE
<tr>
<td width="450" height="1">
<small>CAPTCHA:</small>
</td>
<td>
{captcha}
</td>
</tr>
I know it's not the most prettiest thing in the world but it works great and it provides cool features like audio. You can look around the reCaptcha site to find adjustments that you can make to the box itself. Good Luck.