[RC1] Registration Auth Code (RAC)

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
User avatar
rakastajatar
Registered User
Posts: 44
Joined: Mon Jan 31, 2005 4:46 am
Contact:

Re: [RC1] Registration Auth Code (RAC)

Post by rakastajatar » Tue Oct 14, 2008 12:57 am

Code: Select all

The confirmation code you entered was incorrect
Now I receive this. I went back and reviewed everything. making sure evrey code was placed in the right place. the code i placed in the register form is the code in the usercp_register.php

User avatar
ric323
Former Team Member
Posts: 22908
Joined: Tue Feb 06, 2007 12:33 am
Location: Melbourne, Australia
Name: Ric
Contact:

Re: [RC1] Registration Auth Code (RAC)

Post by ric323 » Tue Oct 14, 2008 1:15 am

When you followed this instruction:

Code: Select all

# 
#-----[ BEFORE, ADD ]------------------------------------------
# Hint: Change the third definition to say where the code will be displayed. The link is 
#    there as a guidelines; you don't necessarily need to use it.
#    You may also change $lang['rac_location'] to a question, to which the code is the answer.
#    Examples: http://www.marshalrusty.com/phpBB/spam/description.gif and http://www.marshalrusty.com/phpBB/spam/question.gif
#
// RAC MOD Begin
$lang['rac_incorrect'] = 'The authorization code you have entered is incorrect. The location of the code should be stated on the registration page. Please try again.';
$lang['rac_code'] = 'Authorization Code';
$lang['rac_location'] = 'You can find the auth code on the following page: <a href="http://wwww.yoursite.com">Location Title</a>';
// RAC MOD End 
What did you enter on the last line?
You have changed the link to something which just reloads the registration page itself, when the intention is it should link to a page giving the answer, or just provide the answer directly. You are also supposed to change "Location Title" to describe the page which the answer is on.

In the edit to usercp_register.php:

Code: Select all

# 
#-----[ AFTER, ADD ]------------------------------------------
# Hint: Change the 'qwerty12345' to the auth code that you want to use
#    If you want the code to be case insensitive, use the following instead of the first line (without the # in front):
#    if (strtolower($HTTP_POST_VARS['RAC']) != 'qwerty12345')
#
        // RAC MOD Begin
        if ($HTTP_POST_VARS['RAC'] != 'qwerty12345') 
Have you left the last line exactly the same?
Please post that line, with the 10 lines before and after it from your edited file.
The Knowledge Base contains solutions to many common problems!
How to fix "Doesn't have a default value" and "Incorrect string value: xxx for column 'post_text' " errors.
How to do a clean re-install of the latest phpBB3 version.
Problems with permissions? Read phpBB3 Permissions

User avatar
rakastajatar
Registered User
Posts: 44
Joined: Mon Jan 31, 2005 4:46 am
Contact:

Re: [RC1] Registration Auth Code (RAC)

Post by rakastajatar » Wed Oct 15, 2008 1:59 am

What I have for the usercp_register.php file.

Code: Select all

if ( isset($HTTP_POST_VARS['submit']) )
{
	include($phpbb_root_path . 'includes/usercp_avatar.'.$phpEx);

	$passwd_sql = '';
	if ( $mode == 'editprofile' )
	{
		if ( $user_id != $userdata['user_id'] )
		{
			$error = TRUE;
			$error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['Wrong_Profile'];
		}
	}
	else if ( $mode == 'register' )
	// RAC MOD Begin
        if ($HTTP_POST_VARS['RAC'] != '43mjop')
        {
			$error = TRUE;
			$error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['rac_incorrect'];
        }
		// RAC MOD End
	{
		if ( empty($username) || empty($new_password) || empty($password_confirm) || empty($email) )
		{
			$error = TRUE;
			$error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['Fields_empty'];
		}
	}

	if ($board_config['enable_confirm'] && $mode == 'register')
	{
		if (empty($HTTP_POST_VARS['confirm_id']))
		{
			$error = TRUE;
			$error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['Confirm_code_wrong'];
		}
		else
		{
			$confirm_id = htmlspecialchars($HTTP_POST_VARS['confirm_id']);
			if (!preg_match('/^[A-Za-z0-9]+$/', $confirm_id))
			{
				$confirm_id = '';
			}
			
			$sql = 'SELECT code 
				FROM ' . CONFIRM_TABLE . " 
For the lang_main.php file, looks like i put it after. so now it's before.
Gees, this is suppose t obe an easy mod! but i am making it difficult.

i don't have the folder spam and the gif files. before someone they were there now they are not. when the gif file was shown with a code, it always said the code was incorrect when it wasnt.

Code: Select all

$lang['Admin_reauthenticate'] = 'To administer the board you must re-authenticate yourself.';
// RAC MOD Begin
$lang['rac_incorrect'] = 'The authorization code you have entered is incorrect. The location of the code should be stated on the registration page. Please try again.';
$lang['rac_code'] = 'Authorization Code';
$lang['rac_location'] = 'You can find the auth code on the following page: <a href="http://redroomies.com/">Location Title</a>';
// RAC MOD End
//
// That's all, Folks!

User avatar
ric323
Former Team Member
Posts: 22908
Joined: Tue Feb 06, 2007 12:33 am
Location: Melbourne, Australia
Name: Ric
Contact:

Re: [RC1] Registration Auth Code (RAC)

Post by ric323 » Wed Oct 15, 2008 2:22 am

rakastajatar wrote:i don't have the folder spam
I don't know what you are referring to here. The is no "folder spam" in phpBB.
and the gif files. before someone they were there now they are not. when the gif file was shown with a code, it always said the code was incorrect when it wasnt.
I think you are referring to the "Visual Confirmation". (It is NOT a "GIF file")
The code to display it is missing from your profile_add_body.tpl file, but it is still active.
Go into your Admin Control Panel, and switch it off. (In "General Admin", "Configuration", and set "Enable Visual Confirmation" to "No".)
If you can't see it, temporarily set your admin user back to using the default subSilver theme.

Once you do that, registration will work. Your RAC code is working correctly.



Code: Select all

$lang['Admin_reauthenticate'] = 'To administer the board you must re-authenticate yourself.';
// RAC MOD Begin
$lang['rac_incorrect'] = 'The authorization code you have entered is incorrect. The location of the code should be stated on the registration page. Please try again.';
$lang['rac_code'] = 'Authorization Code';
$lang['rac_location'] = 'You can find the auth code on the following page: <a href="http://redroomies.com/">Location Title</a>';
// RAC MOD End
//
// That's all, Folks!
As I already mentioned earlier, you still need to edit the "Location Title" text to describe the page which you are linking to.
The Knowledge Base contains solutions to many common problems!
How to fix "Doesn't have a default value" and "Incorrect string value: xxx for column 'post_text' " errors.
How to do a clean re-install of the latest phpBB3 version.
Problems with permissions? Read phpBB3 Permissions

User avatar
rakastajatar
Registered User
Posts: 44
Joined: Mon Jan 31, 2005 4:46 am
Contact:

Re: [RC1] Registration Auth Code (RAC)

Post by rakastajatar » Wed Oct 15, 2008 5:00 am

ok that clears a lot up for me.

the plast part of you reply,
i do not know correct link or description to place in there.

User avatar
ric323
Former Team Member
Posts: 22908
Joined: Tue Feb 06, 2007 12:33 am
Location: Melbourne, Australia
Name: Ric
Contact:

Re: [RC1] Registration Auth Code (RAC)

Post by ric323 » Wed Oct 15, 2008 5:09 am

rakastajatar wrote:the plast part of you reply,
i do not know correct link or description to place in there.
This is your description of the page that the registration code appears on.
In your case, something like "The Red Roomies home page" or "on our home page" might be appropriate. That's your choice. It has no functional effect on the MOD, it's just a visual aid for people registering on your board.
The Knowledge Base contains solutions to many common problems!
How to fix "Doesn't have a default value" and "Incorrect string value: xxx for column 'post_text' " errors.
How to do a clean re-install of the latest phpBB3 version.
Problems with permissions? Read phpBB3 Permissions

User avatar
rakastajatar
Registered User
Posts: 44
Joined: Mon Jan 31, 2005 4:46 am
Contact:

Re: [RC1] Registration Auth Code (RAC)

Post by rakastajatar » Wed Oct 15, 2008 5:16 am

ric323 wrote:
rakastajatar wrote:the plast part of you reply,
i do not know correct link or description to place in there.
This is your description of the page that the registration code appears on.
In your case, something like "The Red Roomies home page" or "on our home page" might be appropriate. That's your choice. It has no functional effect on the MOD, it's just a visual aid for people registering on your board.
Gott'ca

thanks for all your help!

paddy5
Registered User
Posts: 6
Joined: Fri Jul 13, 2007 4:07 pm

Re: [RC1] Registration Auth Code (RAC)

Post by paddy5 » Wed Oct 29, 2008 4:15 am

bloody marvelous

thank you :)

dandan14
Registered User
Posts: 6
Joined: Fri Nov 30, 2007 4:05 pm

Re: [RC1] Registration Auth Code (RAC)

Post by dandan14 » Wed Nov 19, 2008 3:00 pm

I too am getting the emailer.php error. What I can't figure out is that even after uninstalling the mod (by restoring the backed up files) I still got the error. I even went as far as to restore all my files in the phpbb directory and still get the error.

How could this be that something is still out of whack even after a restore? I'll worry about getting the mod working later, but right now I have to make sure I can let people register. ARG!

User avatar
Lumpy Burgertushie
Registered User
Posts: 63196
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: [RC1] Registration Auth Code (RAC)

Post by Lumpy Burgertushie » Wed Nov 19, 2008 3:06 pm

dandan14 wrote:I too am getting the emailer.php error. What I can't figure out is that even after uninstalling the mod (by restoring the backed up files) I still got the error. I even went as far as to restore all my files in the phpbb directory and still get the error.

How could this be that something is still out of whack even after a restore? I'll worry about getting the mod working later, but right now I have to make sure I can let people register. ARG!
then that means that your email error is not related to the MOD.

please post the exact error and exactly what you are doing when you get it.

also, post a link to your board so we can test.

robertr
I am available for custom work on a donation basis. Please send me a PM with your needs.
Premium phpBB 3.2 Styles by PlanetStyles.net

New phpbb 3.0 support site

dandan14
Registered User
Posts: 6
Joined: Fri Nov 30, 2007 4:05 pm

Re: [RC1] Registration Auth Code (RAC)

Post by dandan14 » Wed Nov 19, 2008 3:07 pm

Well, I got it working, but only after reconfiguring the mail settings. How was that not restored when I restored the files????

User avatar
Lumpy Burgertushie
Registered User
Posts: 63196
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: [RC1] Registration Auth Code (RAC)

Post by Lumpy Burgertushie » Wed Nov 19, 2008 7:17 pm

dandan14 wrote:Well, I got it working, but only after reconfiguring the mail settings. How was that not restored when I restored the files????
because those settings are stored in the database. you could restore the files a hundred times and it would not change any of the settings for the board because they are not in the files.


robert
I am available for custom work on a donation basis. Please send me a PM with your needs.
Premium phpBB 3.2 Styles by PlanetStyles.net

New phpbb 3.0 support site

burgo
Registered User
Posts: 2
Joined: Mon Nov 24, 2008 7:51 pm

Re: [RC1] Registration Auth Code (RAC)

Post by burgo » Mon Nov 24, 2008 7:55 pm

Is there a version of this (very essential) mod for phpBB 3.0.x?

If not, can anyone provide guidelines for implementing/adapting it to work with v.3.0.x?

Thanks in advance.

User avatar
ric323
Former Team Member
Posts: 22908
Joined: Tue Feb 06, 2007 12:33 am
Location: Melbourne, Australia
Name: Ric
Contact:

Re: [RC1] Registration Auth Code (RAC)

Post by ric323 » Mon Nov 24, 2008 10:02 pm

burgo wrote:Is there a version of this (very essential) mod for phpBB 3.0.x?

If not, can anyone provide guidelines for implementing/adapting it to work with v.3.0.x?

Thanks in advance.
It is effectively built-in to phpBB3.
Knowledge Base - Custom Profile Fields as an Anti-Spammer Tool
The Knowledge Base contains solutions to many common problems!
How to fix "Doesn't have a default value" and "Incorrect string value: xxx for column 'post_text' " errors.
How to do a clean re-install of the latest phpBB3 version.
Problems with permissions? Read phpBB3 Permissions

ntonline
Registered User
Posts: 3
Joined: Wed Oct 01, 2008 9:58 pm

Re: [RC1] Registration Auth Code (RAC)

Post by ntonline » Mon Nov 24, 2008 11:56 pm

First, thank you for making this mod available as an open source.

I thought I had successfully installed the mod until I began testing the registration process. I found that users are not able to verify the authorization code. When I attempt to register as an end user I receive the following error message: "The authorization code you have entered is incorrect. The location of the code can be found at the top of this page. Please try again."

The modification has been made to the Conundrum template, not the subSilver template. Below are the portions of code that I have modified. FYI... the title of my site is "Blurbs & Blunders".

includes/usercp_register.php

Code: Select all

	$passwd_sql = '';
	if ( $mode == 'editprofile' )
	{
		if ( $user_id != $userdata['user_id'] )
		{
			$error = TRUE;
			$error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['Wrong_Profile'];
		}
	}
	else if ( $mode == 'register' )
	{ if (strtolower($HTTP_POST_VARS['RAC']) != 'Blurbs')
	        {
			$error = TRUE;
			$error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['rac_incorrect'];
        } if ( empty($username) || empty($new_password) || empty($password_confirm) || empty($email) )
		{
			$error = TRUE;
			$error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['Fields_empty'];
		}
	}

Code: Select all

		'L_CONFIRM_CODE_IMPAIRED'	=> sprintf($lang['Confirm_code_impaired'], '<a href="mailto:' . $board_config['board_email'] . '">', '</a>'), 
		'L_CONFIRM_CODE'			=> $lang['Confirm_code'], 
		'L_CONFIRM_CODE_EXPLAIN'	=> $lang['Confirm_code_explain'],
		'L_RAC_CODE' 		=> $lang['rac_code'],
		'L_RAC_LOCATION'	=> $lang['rac_location'], 
language/lang_english/lang_main.php

Code: Select all

$lang['Admin_reauthenticate'] = 'To administer the board you must re-authenticate yourself.';

$lang['rac_incorrect'] = 'The authorization code you have entered is incorrect. The location of the code can be found at the top of this page. Please try again.';
$lang['rac_code'] = 'Authorization Code';
$lang['rac_location'] = 'What word is missing from this phrase: ______ & Blunders ';
//
// That's all, Folks!
// -------------------------------------------------
templates/Conundrum/profile_add_body.tpl

Code: Select all

	<!-- BEGIN switch_confirm -->
	<tr>
		<td colspan="2"><h2>{L_CONFIRM_CODE}</h2></td>
	</tr>
	<tr>
		<td class="row1 two txtcenter" colspan="2">{L_CONFIRM_CODE_IMPAIRED}<br /><br />{CONFIRM_IMG}<br /><br /></td>
	</tr>
	<tr> 
		<td class="row1 one">{L_CONFIRM_CODE_EXPLAIN}</td>
		<td class="row2 two">
        <input type="text" class="post postmedium" name="confirm_code" maxlength="6" value="" size="20" /></td>
	</tr>
	<tr> 
	  <td class="row1"><span class="gen">{L_RAC_CODE}: * </span><br />
		<span class="gensmall">{L_RAC_LOCATION}</span></td>
	  <td class="row2"> 
		<input type="text" class="post" style="width: 200px" name="RAC" size="25" maxlength="32" />
	  </td>
	</tr>
	<!-- END switch_confirm -->

Post Reply

Return to “[2.0.x] MODs in Development”

Who is online

Users browsing this forum: No registered users and 3 guests

cron