############################################################## ## MOD Title: Registration Auth Code (RAC) ## MOD Author: JLA FORUMS - http://www.jlaforums.com ## MOD Description: This MOD is based on the "VIP Code MOD" by Martin Aignesberger. and an update of verion 0.0.2 by Marshalrusty < marshalrusty@phpbb.com > ## (Yuriy Rusko) http://www.phpbb.com/community/viewtopic.php?f=1&t=427852 A number of improvements have been made to the aforementioned MODs 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 ## 5) Configuration of Question Title, Question, Answer and Error message via the Admin Control Panel (ACP) ## ## This MOD will require users to enter an auth code or answer a question during registration, which is defined by the administrator in the ACP. ## Alternatively, the administrator may wish to ask a question, which the code would be the answer to ## Here are two examples of possible setups: ## ## http://www.jlaforums.com/images/JLARAC1.jpg ## http://www.jlaforums.com/images/JLARAC2.jpg ## ## MOD Version: 0.0.4 ## Installation Level: Easy ## Installation Time: ~10 Minutes ## (4) INSERT statements on phpbb_config ## Files To Edit: includes/usercp_register.php ## language/lang_english/lang_main.php ## templates/subSilver/profile_add_body.tpl ## language/lang_english/lang_admin.php ## templates/subSilver/admin/board_config_body.tpl ## admin/admin_board.php ## ## Included Files: N/A ## ## License: http://opensource.org/licenses/gpl-license.php GNU General Public License v2 ############################################################## ## For security purposes, please check: http://www.phpbb.com/mods/ ## for the latest version of this MOD. Although MODs are checked ## before being allowed in the MODs Database there is no guarantee ## that there are no security problems within the MOD. No support ## will be given for MODs not found within the MODs Database which ## can be found at http://www.phpbb.com/mods/ ############################################################## ## Author Notes: ## ## ## Support for this MOD can be obtained here: ## http://www.www.jlaforums.com/ ## ## Before installing this MOD, please visit the URI above to make sure that you are installing the latest version. ## ## ############################################################## ## MOD History: ## 2011-10-06 = Version 0.0.4 - JLA Fixed ACP Answer Explain that specified answer must be entered lowercase ## 2011-09-30 - Version 0.0.3 - JLA Update Version ## 2007-07-22 - Version 0.0.2 ## - More user friendly error ## 2007-01-01 - Version 0.0.1 ############################################################## ## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD ############################################################## # #-----[ DIY ]------------------------------------------ # This MOD requires that you choose an auth code that users will have to enter during registration. This code should be a string of numbers, letters and/or symbols. Valid examples would be: 'y5i4b3m', '1739575', 'eyrmoskd', '!@#$%^&', '1a!2b@', etc. Remember that you will have to display this code somewhere for users to find and be able to explain where it is located on the registration page. Instead of using a random string, you can use "The first two words in the description of the first forum on the index page" or "The first two words in this board's description (under the title in the header)" or something similar. Here is an example: http://www.jlaforums.com/images/description.gif If you wish to make it even simpler, you may change the Registration Question in the Admin Control Panel to a question, such as "How many fingers do people have?" or "What color is the sky?" and set the Registration Question Answer to whatever the answer is. See here for examples: http://www.jlaforums.com/images/JLARAC1.jpg http://www.jlaforums.com/images/JLARAC2.jpg If after some time you notice an increase in the number of spam registrations, bots may have been adapted to the system. Simple change the auth code and/or its location to throw them off again. You will need to first execute the four (4) INSERT statments on the phpbb_config table for your forum MYSQL database. # #-----[ SQL ]--------------------------------- # INSERT INTO phpbb_config (config_name, config_value) VALUES('registration_question_title', ''); INSERT INTO phpbb_config (config_name, config_value) VALUES('registration_question', ''); INSERT INTO phpbb_config (config_name, config_value) VALUES('registration_question_answer', ''); INSERT INTO phpbb_config (config_name, config_value) VALUES('registration_question_fail', ''); # #-----[ OPEN ]------------------------------------------ # includes/usercp_register.php # #-----[ FIND ]------------------------------------------ # else if ( $mode == 'register' ) { # #-----[ AFTER, ADD ]------------------------------------------ # Hint: # If you want the code/answer to be case sensitive, just remove the (strtolower from the code below # Example: if ($HTTP_POST_VARS['RAC'] != $board_config['registration_question_answer']) # // JLA RAC MOD Begin if (strtolower($HTTP_POST_VARS['RAC']) != $board_config['registration_question_answer']) { $error = TRUE; $error_msg .= ( ( isset($error_msg) ) ? '
' : '' ) . $lang['rac_incorrect']; } // JLA RAC MOD End # #-----[ FIND ]------------------------------------------ # 'L_CONFIRM_CODE_EXPLAIN' => $lang['Confirm_code_explain'], # #-----[ AFTER, ADD ]------------------------------------------ # // JLA RAC MOD Begin 'L_RAC_CODE' => $lang['rac_code'], 'L_RAC_LOCATION' => $lang['rac_location'], // JLA RAC MOD End # #-----[ OPEN ]------------------------------------------ # language/lang_english/lang_main.php # #-----[ FIND ]------------------------------------------ # // // That's all, Folks! // ------------------------------------------------- # #-----[ BEFORE, ADD ]------------------------------------------ # // JLA RAC MOD Begin $lang['rac_incorrect'] = $board_config['registration_question_fail']; $lang['rac_code'] = $board_config['registration_question_title']; $lang['rac_location'] = $board_config['registration_question']; // JLA RAC MOD End # #-----[ OPEN ]------------------------------------------ # language/lang_english/lang_admin.php # #-----[ FIND ]------------------------------------------ # // Visual Confirmation # #-----[ BEFORE, ADD ]------------------------------------------ # //JLA RAC MOD START $lang['Registration_Question_Title'] = 'What do you want to call the type of registration question?'; $lang['Registration_Question_Title_Explain'] = 'Chose what you want to call your registration - example "Confirmation Code Verification" or "Registration Verification Question"'; $lang['Registration_Question'] = 'Specify the registration question:'; $lang['Registration_Question_Explain'] = 'Enter the actual registration question you want to ask users here.'; $lang['Registration_Question_Answer'] = 'Specify the registration question answer:'; $lang['Registration_Question_Answer_Explain'] = 'Enter the answer to your registration question in lower case characters. This MOD is set for answers to be case insensitive.'; $lang['Registration_Question_Fail'] = 'Specify the error message on registration question answer failure:'; $lang['Registration_Question_Fail_Explain'] = 'Enter the acutal error message you want users to see if they fail the registration requestion'; //JLA RAC MOD END # #-----[ OPEN ]------------------------------------------ # templates/subSilver/profile_add_body.tpl # #-----[ FIND ]------------------------------------------ # {L_CONFIRM_PASSWORD}: *
{L_PASSWORD_CONFIRM_IF_CHANGED} # #-----[ AFTER, ADD ]------------------------------------------ # {L_RAC_CODE}: *
{L_RAC_LOCATION} # #-----[ OPEN ]------------------------------------------ # admin/admin_board.php # #-----[ FIND ]------------------------------------------ # "L_VISUAL_CONFIRM" => $lang['Visual_confirm'], # #-----[ BEFORE, ADD ]------------------------------------------ # //JLA RAC MOD "L_REGISTRATION_QUESTION_TITLE" => $lang['Registration_Question_Title'], "L_REGISTRATION_QUESTION_TITLE_EXPLAIN" => $lang['Registration_Question_Title_Explain'], "L_REGISTRATION_QUESTION" => $lang['Registration_Question'], "L_REGISTRATION_QUESTION_EXPLAIN" => $lang['Registration_Question_Explain'], "L_REGISTRATION_QUESTION_ANSWER" => $lang['Registration_Question_Answer'], "L_REGISTRATION_QUESTION_ANSWER_EXPLAIN" => $lang['Registration_Question_Answer_Explain'], "L_REGISTRATION_QUESTION_FAIL" => $lang['Registration_Question_Fail'], "L_REGISTRATION_QUESTION_FAIL_EXPLAIN" => $lang['Registration_Question_Fail_Explain'], //END JLA RAC MOD # #-----[ FIND ]------------------------------------------ # "SITE_DESCRIPTION" => $new['site_desc'], # #-----[ AFTER, ADD ]------------------------------------------ # //JLA RAC MOD BEGIN "REGISTRATION_QUESTION_TITLE" => $new['registration_question_title'], "REGISTRATION_QUESTION" => $new['registration_question'], "REGISTRATION_QUESTION_ANSWER" => $new['registration_question_answer'], "REGISTRATION_QUESTION_FAIL" => $new['registration_question_fail'], //JLA RAC MOD END # #-----[ OPEN ]------------------------------------------ # templates/subSilver/admin/board_config_body.tpl # #-----[ FIND ]------------------------------------------ # {L_VISUAL_CONFIRM}
{L_VISUAL_CONFIRM_EXPLAIN} {L_YES}   {L_NO} # #-----[ AFTER, ADD ]------------------------------------------ # {L_REGISTRATION_QUESTION_TITLE}
{L_REGISTRATION_QUESTION_TITLE_EXPLAIN} {L_REGISTRATION_QUESTION}
{L_REGISTRATION_QUESTION_EXPLAIN} {L_REGISTRATION_QUESTION_ANSWER}
{L_REGISTRATION_QUESTION_ANSWER_EXPLAIN} {L_REGISTRATION_QUESTION_FAIL}
{L_REGISTRATION_QUESTION_FAIL_EXPLAIN} # #-----[ SAVE/CLOSE ALL FILES ]------------------------------------------ # # #-----[ DIY ]------------------------------------------ # Enter your Admin Control Panel under "General Configuration and enter the following: 1. The Registration Question Title 2. The Reqistration Question 3. The Registration Question Answer 4. The Registration Question Error Message When done, click submit at the bottom to save the new settings to your board configuraton. # #--------- EoM ------------------------------- #