[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
RMcGirr83
Former Team Member
Posts: 22016
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr

Re: [RC1] Registration Auth Code (RAC)

Post by RMcGirr83 »

More than likely you edited includes/usercp_register.php incorrectly
Former Modifications/Extensions Team Member | My extensions | github | All requests for support via PM will be ignored
Appreciate the extensions/mods/support then buy me a beer Image
TheGreatNewb
Registered User
Posts: 1
Joined: Thu Apr 24, 2008 5:46 pm

Re: [RC1] Registration Auth Code (RAC)

Post by TheGreatNewb »

Great Great Mod! Installed it getting 7-8 bots a day!

Now i have 0!

Works great easy to install and awesome mod.

10/10 Keep Up The Good Modding!
User avatar
turkudweller
Registered User
Posts: 22
Joined: Thu Apr 24, 2008 11:15 am
Contact:

Re: [RC1] Registration Auth Code (RAC)

Post by turkudweller »

RMcGirr83 wrote:More than likely you edited includes/usercp_register.php incorrectly
I've gone back and checked it 4 times line for line. And copy and pasted from the instructions and still no joy :(
Damn shame, because this MOD looked perfect.
phpBB3
albo1
Registered User
Posts: 14
Joined: Sat Sep 23, 2006 8:40 pm

Re: [RC1] Registration Auth Code (RAC)

Post by albo1 »

Hi,
Posts to the PHPBB installation on my site are no longer showing line-breaks or smilies. Line-breaks don't register at all - everything is just one big block of type no matter how many breaks you insert. Smilies aren't showing up as GIFs or as code. The breaks and smilies do show up while editing the posts, but not once submitted.
The only Mod I've installed recently is RAC Mod, and the problem started before I upgraded the board to PHPBB 2.0.23.

I've tried posting this question to the general support forum - I don't know if the sexually explicit nature of my Website is the problem but I've had no answers beyond an initial request for the URL of my site from ric323.

any suggestions as to where to look for a solution?
Thanks!
Albo
djbinks
Registered User
Posts: 2
Joined: Mon Apr 28, 2008 8:57 pm

Re: [RC1] Registration Auth Code (RAC)

Post by djbinks »

Hi all,

Just installed this MOD, and I am getting the following error at the top of the Register Page

Code: Select all

else if ( $mode == 'register' ) {
Warning: Cannot modify header information - headers already sent by (output started at /home/sites/chilternmc.co.uk/public_html/forum/includes/usercp_register.php:2) in /home/sites/chilternmc.co.uk/public_html/forum/includes/page_header.php on line 479

Warning: Cannot modify header information - headers already sent by (output started at /home/sites/chilternmc.co.uk/public_html/forum/includes/usercp_register.php:2) in /home/sites/chilternmc.co.uk/public_html/forum/includes/page_header.php on line 485

Warning: Cannot modify header information - headers already sent by (output started at /home/sites/chilternmc.co.uk/public_html/forum/includes/usercp_register.php:2) in /home/sites/chilternmc.co.uk/public_html/forum/includes/page_header.php on line 486
In usercp_register.php

Code: Select all

	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 (strtolower($HTTP_POST_VARS['RAC']) != 'green')
        {
			$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'];
		}
	}
Any ideas? I followed the guide word for word :(
momentum
Registered User
Posts: 1505
Joined: Thu Sep 20, 2007 4:07 am
Location: Melbourne, Australia

Re: [RC1] Registration Auth Code (RAC)

Post by momentum »

What are you using to edit files with?

Looks like whatever program you're using has added something before the beginning <?php in your usercp_register.php file.

Craig.
QOTY: phpBB is free, good hosting is not. - robert (Lumpy Burgertushie)
djbinks
Registered User
Posts: 2
Joined: Mon Apr 28, 2008 8:57 pm

Re: [RC1] Registration Auth Code (RAC)

Post by djbinks »

Ah right, makes sense - I have just upgraded his board to PHPBB3, so that should stop some of them :D
User avatar
turkudweller
Registered User
Posts: 22
Joined: Thu Apr 24, 2008 11:15 am
Contact:

Re: [RC1] Registration Auth Code (RAC)

Post by turkudweller »

Can anyone try and register at http://turkucc.com/forum/
When you agree to the terms and conditions the middle table disappears and the process stops.
Any ideas would be welcome.
phpBB3
momentum
Registered User
Posts: 1505
Joined: Thu Sep 20, 2007 4:07 am
Location: Melbourne, Australia

Re: [RC1] Registration Auth Code (RAC)

Post by momentum »

turkudweller wrote:Can anyone try and register at http://turkucc.com/forum/
When you agree to the terms and conditions the middle table disappears and the process stops.
Any ideas would be welcome.
I suspect you've put a switch on a line with something else.

Wanna post the relevant parts of all three files for us? Ten lines above and below your edits, plus the edits of course, should be enough. Don't forget the [ code ] tags.

Craig.
QOTY: phpBB is free, good hosting is not. - robert (Lumpy Burgertushie)
User avatar
turkudweller
Registered User
Posts: 22
Joined: Thu Apr 24, 2008 11:15 am
Contact:

Re: [RC1] Registration Auth Code (RAC)

Post by turkudweller »

These two are from file 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' )
	{
	// RAC MOD Begin
        if ($HTTP_POST_VARS['RAC'] != 'blue')
        {
			$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'];
		}
	}

Code: Select all

		'L_PREFERENCES' => $lang['Preferences'],
		'L_PUBLIC_VIEW_EMAIL' => $lang['Public_view_email'],
		'L_ITEMS_REQUIRED' => $lang['Items_required'],
		'L_REGISTRATION_INFO' => $lang['Registration_info'],
		'L_PROFILE_INFO' => $lang['Profile_info'],
		'L_PROFILE_INFO_NOTICE' => $lang['Profile_info_warn'],
		'L_EMAIL_ADDRESS' => $lang['Email_address'],

		'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'], 
    // RAC MOD Begin
		'L_RAC_CODE' 		=> $lang['rac_code'],
		'L_RAC_LOCATION'	=> $lang['rac_location'], 
	// RAC MOD End
		'S_ALLOW_AVATAR_UPLOAD' => $board_config['allow_avatar_upload'],
		'S_ALLOW_AVATAR_LOCAL' => $board_config['allow_avatar_local'],
		'S_ALLOW_AVATAR_REMOTE' => $board_config['allow_avatar_remote'],
		'S_HIDDEN_FIELDS' => $s_hidden_fields,
		'S_FORM_ENCTYPE' => $form_enctype,
		'S_PROFILE_ACTION' => append_sid("profile.$phpEx"))
	);
Here's language/lang_english/lang_main.php

Code: Select all

$lang['An_error_occured'] = 'An Error Occurred';
$lang['A_critical_error'] = 'A Critical Error Occurred';

$lang['Admin_reauthenticate'] = 'To administer the board you must re-authenticate yourself.';
$lang['Login_attempts_exceeded'] = 'The maximum number of %s login attempts has been exceeded. You are not allowed to login for the next %s minutes.';
$lang['Please_remove_install_contrib'] = 'Please ensure both the install/ and contrib/ directories are deleted';

$lang['Session_invalid'] = 'Invalid Session. Please resubmit the form.';


// RAC MOD Begin
$lang['rac_incorrect'] = 'The authorization code you have entered is incorrect.';
$lang['rac_code'] = 'Authorization Question';
$lang['rac_location'] = 'What colour is the sky? (all lowercase)';
// RAC MOD End
//
// That's all, Folks!
// -------------------------------------------------

?>
And finally from templates/subSilver/profile_add_body.tpl

Code: Select all

		<input type="password" class="post" style="width: 200px" name="new_password" size="25" maxlength="32" value="{NEW_PASSWORD}" />
	  </td>
	</tr>
	<tr> 
	  <td class="row1"><span class="gen">{L_CONFIRM_PASSWORD}: * </span><br />
		<span class="gensmall">{L_PASSWORD_CONFIRM_IF_CHANGED}</span></td>
	  <td class="row2"> 
		<input type="password" class="post" style="width: 200px" name="password_confirm" size="25" maxlength="32" value="{PASSWORD_CONFIRM}" />
	  </td>
	</tr>
	<!-- BEGIN switch_user_logged_out -->
	<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_user_logged_out -->
	<!-- Visual Confirmation -->
	<!-- BEGIN switch_confirm -->
	<tr>
		<td class="row1" colspan="2" align="center"><span class="gensmall">{L_CONFIRM_CODE_IMPAIRED}</span><br /><br />{CONFIRM_IMG}<br /><br /></td>
	</tr>
	<tr> 
	  <td class="row1"><span class="gen">{L_CONFIRM_CODE}: * </span><br /><span class="gensmall">{L_CONFIRM_CODE_EXPLAIN}</span></td>
	  <td class="row2"><input type="text" class="post" style="width: 200px" name="confirm_code" size="6" maxlength="6" value="" /></td>
	</tr>
	<!-- END switch_confirm -->
phpBB3
User avatar
turkudweller
Registered User
Posts: 22
Joined: Thu Apr 24, 2008 11:15 am
Contact:

Re: [RC1] Registration Auth Code (RAC)

Post by turkudweller »

Please note that the above changes in file templates/subSilver/profile_add_body.tpl were also added to the same file in the alumnoid skin folder too.
phpBB3
momentum
Registered User
Posts: 1505
Joined: Thu Sep 20, 2007 4:07 am
Location: Melbourne, Australia

Re: [RC1] Registration Auth Code (RAC)

Post by momentum »

I really can't see a single thing wrong with any of your edits. The changes should work as described. I suspect the problem may well lie elsewhere.

What other MODs do you have installed, and do any of these make changes to either the profile.php or includes/usercp_*.php files?

And just as an aside, if you change this line....

Code: Select all

if ($HTTP_POST_VARS['RAC'] != 'blue')
to this...

Code: Select all

if (strtolower($HTTP_POST_VARS['RAC']) != 'blue')
Then the user can enter the word BLUE, Blue or even bLuE and be correct.

Craig.
QOTY: phpBB is free, good hosting is not. - robert (Lumpy Burgertushie)
User avatar
turkudweller
Registered User
Posts: 22
Joined: Thu Apr 24, 2008 11:15 am
Contact:

Re: [RC1] Registration Auth Code (RAC)

Post by turkudweller »

Thanks for your help so far.
The only other Mod I have installed is "EasyMod"
I guess I'll just have to delete the RAC mod and return to Spam Hell :(
I've got a stack of very patient punters waiting to be registered but it looks as if this Mod can't work for me.
phpBB3
momentum
Registered User
Posts: 1505
Joined: Thu Sep 20, 2007 4:07 am
Location: Melbourne, Australia

Re: [RC1] Registration Auth Code (RAC)

Post by momentum »

Which version of phpBB2 is your board using? If it's otherwise unmodified can I suggest you reload new copies profile.php and the six other includes/usercp_*.phpfiles? (not including usercp_register.php as that's now modified) There just has to be a solution to this problem.

Craig.
QOTY: phpBB is free, good hosting is not. - robert (Lumpy Burgertushie)
User avatar
turkudweller
Registered User
Posts: 22
Joined: Thu Apr 24, 2008 11:15 am
Contact:

Re: [RC1] Registration Auth Code (RAC)

Post by turkudweller »

Version 2.0.23 phpBB2.
I've been trying all kinds of re-installations and I've now managed to get the default subsilver skin to work.
So it looks like the error was in the changes to the file templates/subSilver/profile_add_body.tpl
I'll keep hammering away till I get to the bottom of this. I can't take the 200+ spam registrants each day :(
phpBB3
Post Reply

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