Jump to content

Newbie with small admin problem


interpim

Recommended Posts

Hey all, I installed a quick modification to help prevent spam on my phpbb boards...

 

Well, it works fine, but I would like to be able to change the settings of it from the admin page.

 

Basically I have modded the profile_add_body.tpl file and added the following code above the visual confirmation...

 

<tr>
    <td class="row1"><span class="gen">What Realm of DAoC does Fenris Belong? (lower case) *</span></td>
    <td class="row2">
        <input type="text" class="post" style="width: 200px" name="math_question" size="45" maxlength="45" value="" />
    </td>
</tr>

 

in the includes/usercp_register.php file i changed the code around line 260 or so from the original to this

 

else if ( $mode == 'register' )
{
	if ( empty($username) || empty($new_password) || empty($password_confirm) || empty($email) )
	{
		$error = TRUE;
		$error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['Fields_empty'];
	}
	if (!isset($_POST['math_question']) || $_POST['math_question'] != 'midgard')
	{$error = TRUE;
	$error_msg .= (isset($error_msg) ? '<br />' : '') . "Incorrect answer to simple question...";
	}
}

 

My question is... where do i load the answer 'midgard' (of course will change to a variable) and the question to be changed or edited from teh admin panel?

 

Any help on this is appreciated.

I am running version phpBB 2.0.18

Link to comment
Share on other sites

yes... i figured that much, my question is, does anyone know what files I should input this code?  I know how to query a db and write/read from a flat file... the problem is, this code is a bit over my head and I need to know where to go to make changes etc. in phpbb

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.