Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: I GIVE UP.. wp-recaptcha WT%^&


bigkill
Participant

@bigkill

thank you for advice.. but you guys must think I’m a programmer.. sorry Im just a networking guy with web design hobby. When it comes to PHP I’m a green horn but have been hacking WP for some time now with decent success. with that said here is where I stand and what I have tried.. so far no good

I have been working in bp-core-signup.php

I inserted this ***** add_action( ‘signup_extra_fields’, ‘public.php’ ); *****

before line (and tried it after ) 123ish

do_action( ‘signup_extra_fields’, $errors );

and also

I inserted this

add_filter( ‘wpmu_validate_user_signup’, ‘private.php’, 10, 1 );

before line (and tried it after )

return wpmu_validate_user_signup($_POST, $_POST);

am i putting it in the right areas??

the code in public.php is a follows:

<?php
require_once('recaptchalib.php');
$publickey = "…"; // you got this from the signup page
echo recaptcha_get_html($publickey);
?>

the code in private.php is a follows:

`

<?php

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 . “)”);

}

?>

I did indeed try adding the code directly in the fields (both with and without php tags) ** add_action( ‘signup_extra_fields’, ‘code-from-above-pasted-here’ ); ** .. that didn’t work out..

Help please? Thanks

Skip to toolbar