Skip to:
Content
Pages
Categories
Search
Top
Bottom

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


  • bigkill
    Participant

    @bigkill

    We’ll not really as I would really like to get this going. Couple days and a handful of hours and I can’t figure this out. wp-recaptcha works fine for my comments but it doesn’t appear on the sign up form. Has anyone just installed wp-recaptcha and had it work “out of the box”.. if you had to trick some things out please post a response. Many thanks.

Viewing 15 replies - 1 through 15 (of 15 total)

  • John James Jacoby
    Keymaster

    @johnjamesjacoby

    wp-recapcha won’t have any idea how to hook into the BuddyPress registration page, you’ll have to tell it how.

    I haven’t used this plugin myself, but I’m sure that it only hooks into a normal WordPress registration page, and not the new BuddyPress one.


    bigkill
    Participant

    @bigkill

    john.. to the rescue again. I could add the capcha myself if I knew which php doc’s were the “form.php” and “process.php” Can someone please point me to where the registration form is and where that registration form is processed? I’ll post the modifications necessary to get wp-recapcha working once I have this information, granted I can get it to work..

    I assume – /bigkill.com/wp-content/mu-plugins/bp-core/bp-core-signup this is the “form”

    but where is the “process.php” piece? I assume /registration.php .. but I can’t find this

    TIA


    John James Jacoby
    Keymaster

    @johnjamesjacoby

    I think I would hook into the bp_core_signup_do_headers function.

    That should allow the processing of the re-captcha on each signup page load.

    Attach it to the action ‘signup_extra_fields’ and it will show up.


    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


    John James Jacoby
    Keymaster

    @johnjamesjacoby

    bigkill,

    We’ll be able to get this working this evening, I have no doubt.

    I won’t have time to look at this until about 10pm USA Eastern time, so if you haven’t gotten it by then, I’ll be around to help out.


    bigkill
    Participant

    @bigkill

    I’ll keep hackin John.. can anyone confirm

    a) I’m supposed to be modifying bp-core-signup.php

    b) I’m inserting, add_action( ‘signup_extra_fields’, ‘function_name’ );, into the correct line number – currently 121 ish

    c) I’m inserting, add_filter( ‘wpmu_validate_user_signup’, ‘function_name’, 10, 1 );, into the correct place line 126 ish


    Rich Spott
    Participant

    @richs0914

    Well…I hate to ask such seemingly infantile questions, but…

    I have had wp-recaptcha working fine on the buddypress registration page on http://sportsblognet.com/sbn-start.php (WPMU 2.7/BP RC-1)

    now to the questions…

    Did you apply for a wp-recaptcha Key?

    Did you adjust the settings to work on the registration form? (check two boxes in the settings)

    Did you place wp-recaptcha in mu-plugins?

    I have had no problems and it worked “out-of-the-box” no core files needed to be edited.

    I’m assuming you did all of these things, but the hacking of bp-core-signup.php was not necessary for me, so I had to confirm.


    bigkill
    Participant

    @bigkill

    rich, wp-recaptcha works in my comments section just not the sign-up piece.

    I didn’t install wp-recaptcha in mu-plugins as it would force it sitewide however since you said you didn’t have issues I’ll give it a try in about 1 hour. I can live with it being forced sitewide.

    Thanks for the input, I’ll let you know how it goes.


    bigkill
    Participant

    @bigkill

    okay if I force it sitewide (by placing it in mu-plugins) it works.. BUT recaptcha will allow you to enter only a portion of the image.. I tested this at multiple sites.. get half of the question right and you’re in. Will see how well this works against spam. I though recaptcha was the best but this seems.. not so hot?!?

    john, we are kinda off the hook.. so long as owners don’t mind forcing this sitewide. You agree we mark this resolved? if not I’ll be glad to assist as your lab rat if you have any ideas.

    thank you all for your efforts!


    Rich Spott
    Participant

    @richs0914

    Bigkill,

    glad to see that it’s working (although not as secure as you thought) as i understood it, you have to force it sitewide because the registration page is for your whole site, not just the main one.

    As far as wp-recapatcha not being the best, well this might be the case, but it does prevent some spammers. I was having a problem with scripts bypassing the entire registration process and starting up profiles and blogs without entering any of the required fields, and the only way i got them to stop, was to change my “wp-signup.php” to something different like “sbn-start.php” and replaced the 4 instances of it in the “wp-signup.php” file with “sbn-start.php” and then went into “bp-core-template-tags.php” and replaced the one instance of “wp-signup.php”.

    This solved the problem (crossing fingers), but I still have a few people getting by that I have to manually spam and ban, but I can deal with 2-3 a day versus waking up in the morning and finding 200 spam blogs signup over night.

    Hope I helped.


    John James Jacoby
    Keymaster

    @johnjamesjacoby

    Rich is correct and thanks so much for stepping in.

    I trust Rich’s judgment since I haven’t personally used that plugin myself. I’ll gladly download it and see what I can come up with if you’d like to explore a different alternative.

    Let me know if you’d like marked as resolved or if we should dive deeper. :)


    bigkill
    Participant

    @bigkill

    would be nice if this topic dived deeper into apeatlings comment “Attach it to the action ‘signup_extra_fields’ and it will show up” how does one do this? or is it better to leave this to the uber php geeks?

    good idea on changing the wp-signup.php

    lets mark this resolved..

    bottom line is if you want to use wp-recapatcha you need to install it in mu-plugins

    thank you all for your help.. I’m going to start working on my theme now..


    John James Jacoby
    Keymaster

    @johnjamesjacoby

    I may end up using this as my alternative to Akismet, so I’ll keep this in the back of my mind and revisit it on a more personal level soon.


    trcwest
    Participant

    @trcwest

    I have put recaptcha in mu plugins and i can see it bellow the user name and email.. but it does not process it it just lets anyone through no mater what they type.??

    has any got any thoughts.. i assume its because the bp side of the form process is different to the wp side and its not working..

    what do people do for spam then??

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘I GIVE UP.. wp-recaptcha WT%^&’ is closed to new replies.
Skip to toolbar