Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
phpBB3 reCAPTCHA Plugin (working)
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
openglobaleconomy.com  
View profile  
 More options Mar 13 2008, 4:37 pm
From: "openglobaleconomy.com" <jacksmar...@yahoo.co.uk>
Date: Thu, 13 Mar 2008 13:37:05 -0700 (PDT)
Local: Thurs, Mar 13 2008 4:37 pm
Subject: [patch] phpBB3 reCAPTCHA Plugin (working)
Hi,

I've "hacked" together a simple phpBB3 reCAPTCHA plugin. It was tested
on a development webserver, so you should use it at your own risk in a
production environment.

Files you will need:
reCAPTCHA PHP plugin, available at:
http://code.google.com/p/recaptcha/downloads/list

Extract the file 'recaptchalib.php' and place it in:
%phpbb_root_path%/includes/captcha

Files that will be modified in your phpBB3 directory:
%phpbb_root_path%/styles/prosilver/template/ucp_register.html
%phpbb_root_path%/includes/ucp/ucp_register.php

Code to modify:
In ucp_register.html, locate:
<dd>{CONFIRM_IMG}</dd>

Then delete the following lines of code or comment them out:
<dd><input type="text" name="confirm_code" id="confirm_code" size="8"
maxlength="8" class="inputbox narrow" title="{L_CONFIRM_CODE}" /></dd>
<dd>{L_CONFIRM_CODE_EXPLAIN}</dd>

In ucp_register.php, there are many changes that you'll have to make,
so I'll have to make the instructions compact.

/*Step 1. Place this code before the line "class ucp_register," which
is near the top of ucp_register.php*/

require_once($phpbb_root_path . 'includes/captcha/recaptchalib.' .
$phpEx);

/*Step 2. Place this code after the line "global $config, $db, $user,
$auth, $template, $phpbb_root_path, $phpEx;" which is a few lines
after step 1.*/

// Get a key from http://recaptcha.net/api/getkey
$publickey = '';
$privatekey = '';

# the response from reCAPTCHA
$resp = null;
# the error code from reCAPTCHA, if any
$error = null;

/*Step 3. Place this code on the line "$confirm_id =
request_var('confirm_id', '');" in other words, replace the original
code with this new code*/

$confirm_id = (isset($_POST['recaptcha_response_field']));

/*Step 4. Comment out or delete the following line of code.*/

'confirm_code'  => array('string', !$config['enable_confirm'], 5, 8),

/*Step 5a. Go to the section:
// Visual Confirmation handling
$wrong_confirm = false;
if ($config['enable_confirm'])*/
   if (!$confirm_id) {
   }
   else {
   /* Comment out or delete all code within the first else statement
(which has nested if...else statements within it) and replace with the
code in Step 5b.*/
   }

}

/*Step 5b. Place the following code within the first else statement.*/
$resp = recaptcha_check_answer ($privatekey,
                                        $_SERVER["REMOTE_ADDR"],

$_POST["recaptcha_challenge_field"],

$_POST["recaptcha_response_field"]);

if ($resp->is_valid == false) {
$error[] = $user->lang['CONFIRM_CODE_WRONG'];
$wrong_confirm = true;

/*Step 6. Comment out or delete everything between the following two
lines of code. The two lines themselves are also deleted. In total,
you should be deleting about 13 non-empty lines of code*/
//first line of code.
$code = gen_rand_string(mt_rand(5, 8));

//last line of code
$db->sql_query($sql);

/*Step 7. A few lines after the end of Step 6, replace "$confirm_image
= " and its values with the following line of code. Basically, you're
assigning the variable $confirm_image with a new value.

$confirm_image = recaptcha_get_html($publickey, $error);

Step 8. You should be done. I hope. It works for me on my development
webserver, on a basically vanilla version of phpbb3.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
starbuckt  
View profile  
 More options May 6 2008, 3:41 pm
From: starbuckt <starbu...@gmail.com>
Date: Tue, 6 May 2008 12:41:09 -0700 (PDT)
Local: Tues, May 6 2008 3:41 pm
Subject: Re: phpBB3 reCAPTCHA Plugin (working)
I've followed your directions and everything seems to be working fine,
but the old "Confirm Code" input box is still appearing directly below
the reCAPTCHA during registration.  It also says "Enter the code
exactly as it appears. All letters are case insensitive, there is no
zero." below the input box.  How can I get rid of these old remnants
of the original captcha?  I dug through the .php files but I can't
figure out where these are getting included from.  Thanks!

On Mar 13, 1:37 pm, "openglobaleconomy.com" <jacksmar...@yahoo.co.uk>
wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
starbuckt  
View profile  
 More options May 19 2008, 8:38 pm
From: starbuckt <starbu...@gmail.com>
Date: Mon, 19 May 2008 17:38:40 -0700 (PDT)
Local: Mon, May 19 2008 8:38 pm
Subject: Re: phpBB3 reCAPTCHA Plugin (working)
Ok, so I figured out that phpbb3 seems to cache pages nearly
indefinitely.  If you are having problems seeing your changes after
modifying the template files for your style try this:

Go to the "cache" folder in your phpbb3 directory.  Find the file that
you are trying to change.  Rename the file temporarily (just in case)
and then load up the forum and reload the page you are having problems
with.  This will cause phpbb3 to reload that page and your changes
should appear.  If everything seems to be working then you can safely
go back and remove the cache file you renamed.

On May 6, 12:41 pm, starbuckt <starbu...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »