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
https://forums.phpfreaks.com/topic/41869-newbie-with-small-admin-problem/
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

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.