security_question

All new MODs released in our MOD Database will be announced in here. All support for released MODs needs to take place in here. No new MODs will be accepted into the MOD Database for phpBB2
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
unkie-tee
Registered User
Posts: 6
Joined: Thu May 08, 2008 9:51 am

Re: security_question

Post by unkie-tee »

Yeap my current theme is subSilver?

The link is http://www.limbs4life.com/phpBB2/

I thankyou for your help.

Unkie-Tee
unkie-tee
Registered User
Posts: 6
Joined: Thu May 08, 2008 9:51 am

Re: security_question

Post by unkie-tee »

Yeap my current theme is subSilver?

The link is http://www.limbs4life.com/phpBB2/

I thankyou for your help.

Unkie-Tee
James N
Registered User
Posts: 1737
Joined: Sat May 20, 2006 12:57 pm
Contact:

Re: security_question

Post by James N »

You have either not edited the files, or not uploaded the ones you have edited. Its not giving any or the error messages I expect when registering
unkie-tee
Registered User
Posts: 6
Joined: Thu May 08, 2008 9:51 am

Re: security_question

Post by unkie-tee »

Should I try again from scratch? Do I need to delete anything to do it again?
James N
Registered User
Posts: 1737
Joined: Sat May 20, 2006 12:57 pm
Contact:

Re: security_question

Post by James N »

Have you any other MODs on your forum? It needs upgrading, and how you do it depends on what (if any) MODs you have
unkie-tee
Registered User
Posts: 6
Joined: Thu May 08, 2008 9:51 am

Re: security_question

Post by unkie-tee »

No other MODs, this is the first MOD I have tried to install
James N
Registered User
Posts: 1737
Joined: Sat May 20, 2006 12:57 pm
Contact:

Re: security_question

Post by James N »

OK Then the easiest way to update is as follows

If you have no MODs installed
  • 1. Download the “Changed Files Only” from the download page at phpBB.com, and unzip it to a directory at your hard drive
    2. Inside of this zip you'll see several more zip files. Unzip the one that refers to the version you're updating
    3. Upload all those files, while overwriting all old ones. You should also upload the /install and /contrib directory which can be found in the main zip file (phpBB-2.0.xx-files.zip)
    4. Run /install/update_to_latest.php trough your browser, using http://www.domain.com/phpBB/install/upd ... latest.php, for example
    5. Delete the /contrib and /install directories from your server
Knowledge Base - Re-install / Update phpBB2

If you have any specific questions after reading the article, feel free to ask :)

Then once you have updated, you can install my MOD again as it will have been overwritten by the update. However, the database entries will NOT have been altered and you will not have to do them again.
unkie-tee
Registered User
Posts: 6
Joined: Thu May 08, 2008 9:51 am

Re: security_question

Post by unkie-tee »

Thanks James, a bit of work to do then I will let you know the results.

Unkie-Tee.
gogod
Registered User
Posts: 1
Joined: Wed May 14, 2008 11:11 pm

Re: security_question

Post by gogod »

Hello,

This is my first time installing a MOD, but I have looked at ever How To Guide I can. I'm pretty sure I've installed it right, and it shows up on my ACP. My problem is, it doesn't show up when I go to do a test registration. The only thing that shows up are the basic username, email, password, and confirm password. I know it's supposed to show up right underneath confirm password, but nothing is there.

When I try to just do the registration though, an error message comes up saying that I've put in the wrong answer for the security question.

I've edited the code on the 6 things I had to edit by way of doing it from the file manager itself. I ran the SQ install, and then deleted my install/contrib files. The last two rows in my phpbb_config say that the default security question is there, as well as the answer. My default theme is also subSilver.

Did I do something wrong along the way?
User avatar
RMcGirr83
Former Team Member
Posts: 22016
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr

Re: security_question

Post by RMcGirr83 »

your issue is more than likely with the edits to the template file (profile_add_body.tpl).
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
craig9176
Registered User
Posts: 4
Joined: Tue May 13, 2008 9:15 am

Re: security_question

Post by craig9176 »

i am trying to install the sequirty question. i did the update to 2.0.23 . i did one mod to the subsilver.i am running vista. when i download the mod and unzip the files. the files in the config file are mpeg files. the file in the install file is a .php file. the first file in th security file is also a mpeg file. is this correct?

i tryed to install the the mod. i put the install file in where the config.php file is.

i tryed a few things but could not get it to work. i always get the same thing. when i run the mod( www.mydomane.com/phpBB2/install/SQ_update.php .) remove the install folder/and the config file.

any help would be helpful sine i am a total newbie to this

craig9176
craig9176
Registered User
Posts: 4
Joined: Tue May 13, 2008 9:15 am

Re: security_question

Post by craig9176 »

i got the install file to work once. i cleaned out al the old files that were left in the pbpb2 file. i when i ran the install file again the page came up saying that two files were installed in the config file. i tryed to register but the security question wasn't there. i went into the admin page on the web site and there was also nothing there. i tryed to find anyting in the pages with a ftp program.

thanks for any help

craig9176
James N
Registered User
Posts: 1737
Joined: Sat May 20, 2006 12:57 pm
Contact:

Re: security_question

Post by James N »

craig9176 wrote:i got the install file to work once. i cleaned out al the old files that were left in the pbpb2 file. i when i ran the install file again the page came up saying that two files were installed in the config file. i tryed to register but the security question wasn't there. i went into the admin page on the web site and there was also nothing there. i tryed to find anyting in the pages with a ftp program.

thanks for any help

craig9176
http://www.phpbb.com/community/viewtopi ... 1#p3083201
User avatar
Ornette
Registered User
Posts: 56
Joined: Thu Mar 06, 2008 3:53 pm

Re: security_question

Post by Ornette »

Hey,
I just installed this mod, and its working great! I've not had any spam bot registrations since I put it on, and user experience has shown it has not been an obstacle to registering. So, well done.

I had some difficulty adding a question, the admin panel kept truncating the question when I went to re-edit. I narrowed it down to me using a " in the field, it seems admin_board.php dont like quote marks in its fields, lol. I used a ' instead

It might be nice if this mod could have support for a pool of questions, like Textual Confirmation (screenshot here), and definitely have its own ACP entry. But other than that, this mod is pretty good as is.

I did do a couple of edits to the mod, mostly to fix compatibility with AcidTech style, however the next thing I knew I ended up improving on a couple of other things too. So much so, I have decided to upload it as... v1.2.0! I hope you don't mind.

Code: Select all

##############################################################
## MOD Title: Security Question Mod 
## MOD Author: James N < n/a > (James Newcombe) http://www.photosbyjames.net
## MOD Author: CoC < n/a > (Chris) http://www.skyblueuntrust.com
## MOD Description: Add a security question and hide profile fields during registration
## 
## MOD Version: 1.2.0
## Installation Level: easy
## Installation Time: 10 minutes
##
## Files To Edit: 6
## includes/usercp_register.php
## language/lang_english/lang_main.php
## language/lang_english/lang_admin.php
## templates/subSilver/admin/board_config_body.tpl
## admin/admin_board.php
## templates/subSilver/profile_add_body.tpl
##
## Included Files:   
##
## 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:
##    Idea from MyVipCode Thanks!
##
##############################################################
## MOD History:
##
## 2007-01-19 - Version 0.0.1
## 2007-01-26 - Version 1.0.0 - Tidied the Registration page, submitted to MOD db
## 2007-07-08 - Version 1.0.1 - Made Question and Answer CasE insensitive
## 2007-12-13 - Version 1.1.0 - Changed some 'find' instructions to hopefully make it 
##                more easymod friendly for non subSilver styles. Change the wrong 
##                answer redirect so that it now goes to the registration page 
##                instead of the index. Added database update file. Corrected HTML 
##                tag error
## 2008-05-28 - Version 1.2.0 - unofficial update by Ornette
##                Further tidied registration page, 'legend' & 'legend-explain' 
##                rearranged & separated, added additional template block-var as 
##                pointer to the security question. 
##                Hide-profile-fields logic improved - 'Profile Information' header 
##                is retained, with a polite explaination message displayed instead.
##                Further altered 'find' instructions allowing compatibility for both 
##                subSilver & the FreestyleXL family of themes - i.e. AcidTech 
##                (see line 252)
##                Also - fixed a missing </span> tag ;)
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################

#
#-----[ SQL ]-------------------------------------------------
#
INSERT INTO phpbb_config (config_name, config_value) VALUES ('securityquestion','How many days in a year?');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('securityanswer','365');

#
#-----[ OPEN ]------------------------------------------
#  
includes/usercp_register.php

#
#-----[ FIND ]------------------------------------------
#
      rawurlencode($website);
   }

# 
#-----[ AFTER, ADD ]------------------------------------------
#

// Start: Security Question Mod
     if ( ($mode == 'register') && (strtoupper($HTTP_POST_VARS['answer']) != strtoupper($board_config['securityanswer'])) )
     {
     message_die(GENERAL_MESSAGE, $lang['securityquestion_invalid'] . '<meta http-equiv="refresh" content="3;url=' . append_sid("profile.$phpEx?mode=register&agreed=true.") . '">');message_die(GENERAL_MESSAGE, $message);
     }
// End: Security Question Mod

#
#-----[ FIND ]------------------------------------------
#
      $template->assign_block_vars('switch_confirm', array());
   }

# 
#-----[ AFTER, ADD ]------------------------------------------
#

// Start: Security Question Mod
    if ($mode == 'register')
    {
    $template->assign_block_vars('switch_securityquestion', array());
    }
// End: Security Question Mod

#
#-----[ FIND ]------------------------------------------
#
      'S_ALLOW_AVATAR_UPLOAD' => $board_config['allow_avatar_upload'],

# 
#-----[ BEFORE, ADD ]------------------------------------------
#   
// Start: Security Question Mod
        'L_SECURITYQUESTION' => $lang['securityquestion'], 
        'L_SECURITYQUESTION_QUESTION' =>$board_config['securityquestion'],
        'L_SECURITYQUESTION_EXPLAIN' => $lang['securityquestion_explain'],
        'L_SECURITYQUESTION_HIDE_PROFILE_INFO_NOTICE' => $lang['securityquestion_hide_profile_info_notice'],
// End: Security Question Mod

# 
#-----[ OPEN ]------------------------------------------
#
language/lang_english/lang_main.php

#
#-----[ FIND ]------------------------------------------
#

?>

# 
#-----[ BEFORE, ADD ]------------------------------------------
#
// Start: Security Question Mod
$lang['securityquestion_invalid'] = 'Sorry, but your answer is NOT correct.<br/>Please try again.';
$lang['securityquestion'] = 'Security question';
$lang['securityquestion_explain'] = 'To help prevent spam, please answer the following question:';
$lang['securityquestion_hide_profile_info_notice'] = "Profile information is not editable during registration. After you have registered, you may add details by selecting the 'Profile' option from the main menu.";
// End: Security Question Mod

# 
#-----[ OPEN ]------------------------------------------
#

templates/subSilver/admin/board_config_body.tpl

#
#-----[ FIND ]------------------------------------------
#
   <tr>
      <td class="row1">{L_VISUAL_CONFIRM}<br /><span class="gensmall">{L_VISUAL_CONFIRM_EXPLAIN}</span></td>
      <td class="row2"><input type="radio" name="enable_confirm" value="1" {CONFIRM_ENABLE} />{L_YES}&nbsp; &nbsp;<input type="radio" name="enable_confirm" value="0" {CONFIRM_DISABLE} />{L_NO}</td>
   </tr>
   
# 
#-----[ AFTER, ADD ]------------------------------------------
#  
   <tr>
      <td class="row1">{L_SECURITYQUESTION} <br /><span class="gensmall">{L_SECURITYQUESTION_EXPLAIN}</span></td>
      <td class="row2"><input class="post" type="text" size="40" maxlength="255" name="securityquestion" value="{SECURITY_QUESTION}" /></td>
   </tr>
   <tr>
      <td class="row1">{L_SECURITYANSWER} <br /><span class="gensmall">{L_SECURITYANSWER_EXPLAIN}</span></td>
      <td class="row2"><input class="post" type="text" size="20" maxlength="32" name="securityanswer" value="{SECURITY_ANSWER}" /></td>
   </tr> 
      
# 
#-----[ OPEN ]------------------------------------------
#
language/lang_english/lang_admin.php

#
#-----[ FIND ]------------------------------------------
#

?>
      
# 
#-----[ BEFORE, ADD ]------------------------------------------
#  
// Start: Security Question Mod
$lang['security_question'] = 'Security Question';
$lang['security_question_explain'] = 'Anti Spam Security Question';
$lang['security_answer'] = 'Security Answer';
$lang['security_answer_explain'] = 'Anti Spam Security Answer';
// End: Security Question Mod
   
# 
#-----[ OPEN ]------------------------------------------
#
admin/admin_board.php

#
#-----[ FIND ]------------------------------------------
#  
    "L_FLOOD_INTERVAL_EXPLAIN" => $lang['Flood_Interval_explain'],

# 
#-----[ AFTER, ADD ]------------------------------------------
#
// Start: Security Question Mod
    "L_SECURITYQUESTION" => $lang['security_question'],
    "L_SECURITYQUESTION_EXPLAIN" => $lang['security_question_explain'],
    "L_SECURITYANSWER" => $lang['security_answer'],
    "L_SECURITYANSWER_EXPLAIN" => $lang['security_answer_explain'],
// End: Security Question Mod

#
#-----[ FIND ]------------------------------------------
#
   "FLOOD_INTERVAL" => $new['flood_interval'],

# 
#-----[ AFTER, ADD ]------------------------------------------
#  
// Start: Security Question Mod
    "SECURITY_QUESTION" => $new['securityquestion'],
    "SECURITY_ANSWER" => $new['securityanswer'],
// End: Security Question Mod

# 
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/profile_add_body.tpl

#
#-----[ FIND ]------------------------------------------
#
   <!-- END switch_confirm -->

# 
#-----[ AFTER, ADD ]------------------------------------------
#
   <!-- BEGIN switch_securityquestion -->
   <tr> 
      <td class="row1"><span class="gen">{L_SECURITYQUESTION}: * </span><br />
      <span class="gensmall">{L_SECURITYQUESTION_EXPLAIN}<span><br />
      <span class="gen"><i>{L_SECURITYQUESTION_QUESTION}</i></span></td>
      <td class="row2"> 
         <input type="text" class="post" style="width: 200px" name="answer" size="25" maxlength="32" value="" /></td>
   </tr>
   <!-- END switch_securityquestion -->

#
#-----[ FIND ]------------------------------------------
#
    {L_PROFILE_INFO}</th>
	</tr>

#
#-----[ AFTER, ADD ]------------------------------------------
#
    <!-- BEGIN switch_user_logged_out -->
   	<tr> 
	  <td class="row2" colspan="2" align="center"><br /><span class="gensmall">{L_SECURITYQUESTION_HIDE_PROFILE_INFO_NOTICE}</span><br /><br /><br /></td>
	</tr>
    <!-- END switch_user_logged_out -->
    <!-- BEGIN switch_user_logged_in -->


#
#-----[ FIND ]------------------------------------------
# edited - FreestyleXL compatibility:
        <textarea name="signature"
	  </td>
	</tr>
#
#-----[ AFTER, ADD ]------------------------------------------
# 

    <!-- END switch_user_logged_in -->



#
#-----[ DIY INSTRUCTIONS ]------------------------------------------
#

Once you have made certain that the MOD is performing as it should, you MUST change the Question and Answer from the default one.


#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
I think you will agree it is now a little better Image

Cheers! 8-)
DJ Ornsman - Back To 93
Tuesday 9-11pm GMT on Stress Factor

http://www.stressfactor.co.uk
Kramozzam
Registered User
Posts: 4
Joined: Wed Dec 06, 2006 11:10 pm

Re: security_question (BIG OOPS)

Post by Kramozzam »

Hi,

I installed the MOD using EasyMod and when I go check the registration page this is what I get:

Parse error: parse error, unexpected $ in /home/icdgrp/public_html/board/includes/template.php(127) : eval()'d code on line 360

I used EasyMod because i am pretty stupid when it comes to PHP. I have also installed "Stop Spambot Registration" and "Delete User MOD" with no problems. In a word- HELP! PLEASE! How do i uninstall this last MOD (security questions) and then get it working right??


NOTE- I also note I am only using 2.0.21 God, I feel stupid!
Post Reply

Return to “[2.0.x] MOD Database Releases”