[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
Marshalrusty
Project Manager
Project Manager
Posts: 29113
Joined: Mon Nov 22, 2004 10:45 pm
Location: New York City
Name: Yuriy Rusko
Contact:

[RC1] Registration Auth Code (RAC)

Postby Marshalrusty » Sun Jun 10, 2007 8:42 pm

In order to not release two somewhat varying MODs under the same name, I give you the RAC MOD :)

This MOD is based on the "VIP Code MOD" by Martin Aignesberger. A number of improvements have been made to the aforementioned MOD, including:
1) Proper usage of language variables
2) Proper usage of the phpBB MOD Template
3) The removal of 2 unnecessary steps
4) More detailed instructions

The idea remains the same. Users are asked to enter an authorization code during registration, which the administrator sets and displays somewhere on the board. Periodically changing the code and location will throw off bots that have been adapted to the MOD. Alternatively, you can ask a question, to which the code will be the answer.

View/download: http://www.marshalrusty.com/phpBB/rac.mod

Updating from 0.0.1 to 0.0.2 (released 22 July 2007)
Open includes/usercp_register.php
Find:

Code: Select all

         message_die(GENERAL_ERROR, $lang['rac_incorrect']);

Replace with:

Code: Select all

         $error = TRUE;
         $error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['rac_incorrect'];


Getting Support for this MOD
  1. Ask any questions relating to this MOD directly in this topic; please don't PM me.
  2. If you receive an error, please post the error.
  3. If the error points to a specific line in a file, please post the code on that line with around 10 lines on either side of it (if the error is on line 30, post lines 20-40).
  4. If you post code, please use the [code] bbcode tags.
Last edited by Marshalrusty on Sun Jul 22, 2007 7:38 am, edited 5 times in total.
Have comments/praise/complaints/suggestions? Please feel free to PM me.

Need private help? Hire me for all your phpBB and web development needs
Forumatic - Hassle-free phpBB Forum Hosting

User avatar
keith2005
Registered User
Posts: 5
Joined: Mon Sep 12, 2005 3:04 am
Location: Indiana
Contact:

Re: [RC] Registration Auth Code (RAC)

Postby keith2005 » Tue Jun 12, 2007 9:53 am

I installed this mod yesterday and so far it is working great! No spammers since. I modified it a little to require new registrants to email the board administrator for the code. Since there are no spammers now I was able to allow the newest user to be displayed and set the "Enable account activation" to none allowing users to immediately log in as soon as they register. Thanks Martin Aignesberger & Marshalrusty for a great anti spam mod!
COINHUNTING.NET

Website for coin hunters

wentwooddownhill
Registered User
Posts: 327
Joined: Sat Feb 17, 2007 9:15 pm
Contact:

Re: [RC] Registration Auth Code (RAC)

Postby wentwooddownhill » Fri Jun 15, 2007 3:55 pm

Great MOD !!!
Easy to install and it works immediately. I installed it a day or so afgo and instead of having 2 bots daily i now have 0
I strongly advise this mod
visit our mountainbike comunity on http://www.wentwooddownhill.co.uk

Seaking
Registered User
Posts: 1
Joined: Tue Jun 19, 2007 6:42 pm

Re: [RC] Registration Auth Code (RAC)

Postby Seaking » Tue Jun 19, 2007 6:47 pm

I'd love to install VIP to my PHBB message board but not sure how it's done. I've searched through the forum here but I'm not finding how it's done. I'm looking to stop spam registration.

Version 2.0.22

I see the mod file and see the directions but it doesn't say where to put it, append it to what file or anything that I am familiar with.. Can anyone help a brudder out?

Thanks in advance.

User avatar
Marshalrusty
Project Manager
Project Manager
Posts: 29113
Joined: Mon Nov 22, 2004 10:45 pm
Location: New York City
Name: Yuriy Rusko
Contact:

Re: [RC] Registration Auth Code (RAC)

Postby Marshalrusty » Tue Jun 19, 2007 10:37 pm

Please read the MOD installation tutorial: viewtopic.php?f=16&t=61611

Please also note that this topic is for the RAC MOD, not the VIP MOD. While they are similar, they are not the same MOD.
Have comments/praise/complaints/suggestions? Please feel free to PM me.

Need private help? Hire me for all your phpBB and web development needs
Forumatic - Hassle-free phpBB Forum Hosting

Phantomess
Registered User
Posts: 3
Joined: Thu Jul 13, 2006 2:54 pm

Re: [RC] Registration Auth Code (RAC)

Postby Phantomess » Wed Jun 20, 2007 11:39 pm

I tried to install the MOD, but I ended up with this message when I tried to go to my forum:

Parse error: syntax error, unexpected ''' in /home/phantom4/public_html/forum/language/lang_english/lang_main.php on line 1034


Is there any explanation?

This is an ingenious idea, by the way!

Phantomess

Sapphire Luna
Registered User
Posts: 4
Joined: Wed Nov 08, 2006 3:37 pm

Re: [RC] Registration Auth Code (RAC)

Postby Sapphire Luna » Fri Jun 22, 2007 6:35 pm

I got a similar error too. I get this when clicking on Register. Please help.

Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/szfsoft/public_html/sapphireluna/forum/includes/usercp_register.php on line 153

User avatar
Marshalrusty
Project Manager
Project Manager
Posts: 29113
Joined: Mon Nov 22, 2004 10:45 pm
Location: New York City
Name: Yuriy Rusko
Contact:

Re: [RC] Registration Auth Code (RAC)

Postby Marshalrusty » Fri Jun 22, 2007 7:59 pm

Phantomess, please post lines 1030 to 1040 of your language/lang_english/lang_main.php file

Sapphire Luna, please post lines 140 to 160 of your includes/usercp_register.php file
Have comments/praise/complaints/suggestions? Please feel free to PM me.

Need private help? Hire me for all your phpBB and web development needs
Forumatic - Hassle-free phpBB Forum Hosting

wentwooddownhill
Registered User
Posts: 327
Joined: Sat Feb 17, 2007 9:15 pm
Contact:

Re: [RC] Registration Auth Code (RAC)

Postby wentwooddownhill » Fri Jun 22, 2007 9:57 pm

Long term report and still no bots or unwanted registrations. As for installing it. If you uopen the file in a text editor like wordpad etc it talks you through putting which code where etc. You dont just place the downloaded file into your forum directory
visit our mountainbike comunity on http://www.wentwooddownhill.co.uk

User avatar
patmay
Registered User
Posts: 46
Joined: Sun Sep 11, 2005 7:49 am
Location: Port Stephens, NSW, Australia
Contact:

Re: [RC] Registration Auth Code (RAC)

Postby patmay » Sat Jun 23, 2007 12:37 am

Just like to say thanks for the mod, I installed it a week ago and no longer have to spend 15 mins each day cleaning out the spam registrations, absolutely no spam registrations at all :D
As a novice was a little afraid of messing around with the forum script, if I can do it, anyone can!
Thanks again
Patricia
patmay

gbungart
Registered User
Posts: 22
Joined: Fri Mar 28, 2003 3:41 pm
Location: Orlando Florida
Contact:

Re: [RC] Registration Auth Code (RAC)

Postby gbungart » Sat Jun 23, 2007 5:27 pm

When I edited all 3 files and tested the results I do not see a desciptive line of text on the registration page to tell the user what to enter. I left it as the defaul for now just for testing purposes.

Image

Thanks for your help!

User avatar
Marshalrusty
Project Manager
Project Manager
Posts: 29113
Joined: Mon Nov 22, 2004 10:45 pm
Location: New York City
Name: Yuriy Rusko
Contact:

Re: [RC] Registration Auth Code (RAC)

Postby Marshalrusty » Sat Jun 23, 2007 6:52 pm

http://www.themeparks.com/forums/templa ... d_body.tpl

Firstly, remove the '#' that you have there, those are not necessary. It should just be:

Code: Select all

     </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 -->


The template is modified properly, however I was able to register without entering the confirmation code (which shouldn't happen). That means that you did not make the necessary edits to includes/usercp_register.php. Please make sure that you fully install the MOD.
Have comments/praise/complaints/suggestions? Please feel free to PM me.

Need private help? Hire me for all your phpBB and web development needs
Forumatic - Hassle-free phpBB Forum Hosting

adamnicely
Registered User
Posts: 2
Joined: Sat Jun 23, 2007 8:49 pm

Re: [RC] Registration Auth Code (RAC)

Postby adamnicely » Sat Jun 23, 2007 8:55 pm

Hi, first, thanks for the time and effort you've put into this mod and instructions. I can't wait to get it going...

I've made all of the edits to the 3 files and triple checked everything. I cannot get the RAC question or the text box for the answer to show up on my registration page... I'm running 2.0.22...

I've rolled back to my backup files for the time being, but here are the edited portions of the edited files if someone can help.

Thanks,

Adam



includes/usercp_register.php

first edit...

{
if ( $user_id != $userdata['user_id'] )
{
$error = TRUE;
$error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['Wrong_Profile'];
}
}
else if ( $mode == 'register' )
{
if ($HTTP_POST_VARS['RAC'] != '12')
{
message_die(GENERAL_ERROR, $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'];
}
}

second edit...

'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'],

'S_ALLOW_AVATAR_UPLOAD' => $board_config['allow_avatar_upload'],
'S_ALLOW_AVATAR_LOCAL' => $board_config['allow_avatar_local'],



language/lang_english/lang_main.php

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

// RAC Code MOD
$lang['rac_incorrect'] = 'The authorization code you have entered is incorrect. Please try again.';
$lang['rac_code'] = 'Authorization Code';
$lang['rac_location'] = 'In order to make sure you are not a robot...how many eggs are in a dozen?';

//
// That's all, Folks!
// -------------------------------------------------



templates/subSilver/profile_add_body.tpl

</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>

User avatar
Marshalrusty
Project Manager
Project Manager
Posts: 29113
Joined: Mon Nov 22, 2004 10:45 pm
Location: New York City
Name: Yuriy Rusko
Contact:

Re: [RC] Registration Auth Code (RAC)

Postby Marshalrusty » Sat Jun 23, 2007 9:14 pm

Are you using the subSilver template? The edits to profile_add_body.tpl need to be made to every template you have installed (or at least the template that users see during registration).
Have comments/praise/complaints/suggestions? Please feel free to PM me.

Need private help? Hire me for all your phpBB and web development needs
Forumatic - Hassle-free phpBB Forum Hosting

adamnicely
Registered User
Posts: 2
Joined: Sat Jun 23, 2007 8:49 pm

Re: [RC] Registration Auth Code (RAC)

Postby adamnicely » Sat Jun 23, 2007 9:26 pm

Thanks for the quick reply! I am using the default SubSilver. I installed using Fantastico in CPanel provided by by hosting company. Would that cause any problems? Does everything look right?

Thanks,

Adam


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

Who is online

Users browsing this forum: No registered users and 5 guests