This is a common oversight with any changes made to the template files, not just this MOD.phpaaa wrote:THANK ... i missed the step "PURGED the cache
This is a common oversight with any changes made to the template files, not just this MOD.phpaaa wrote:THANK ... i missed the step "PURGED the cache
OPENscousser wrote:I would like to open my forum to guest users (therefore having not registered) and would like the antibot question to appear each time someone tries to post a message (instead or eventually with the captcha).
What code should I add and where ? on which file ?
Thanks for your help !
sc
Code: Select all
$solved_captcha
Code: Select all
= $solved_abq
Code: Select all
$solved_captcha = true;
}
}
Code: Select all
// BEGIN ABD question addon
if ($config['enable_abquestion'] && !$user->data['is_registered'] && in_array($mode, array('quote', 'post', 'reply')))
{
$user->add_lang('ucp');
$ab_question = strtolower(utf8_normalize_nfc(request_var('ab_question', '', true)));
if ($ab_question == '')
{
$error[] = $user->lang['AB_NO_ANSWER'];
}
elseif ($ab_question != strtolower($config['abanswer']) && $ab_question != strtolower($config['abanswer2']))
{
$error[] = $user->lang['AB_QUESTION_ERROR'];
}
else
{
$solved_abq = true;
}
}
// END ABD question addon
Code: Select all
'L_POST_CONFIRM_EXPLAIN' => sprintf($user->lang['POST_CONFIRM_EXPLAIN'], '<a href="mailto:' . htmlspecialchars($config['board_contact']) . '">', '</a>'),
));
}
Code: Select all
// BEGIN ABD question addon
if ($config['enable_abquestion'] && !$user->data['is_registered'] && $solved_abq === false && ($mode == 'post' || $mode == 'reply' || $mode == 'quote'))
{
$ab_question = '';
$template->assign_vars(array(
'S_AB_QUESTION' => true,
'L_AB_QUESTION' => $config['abquestion'],
'L_AB_QUESTION_EXPLAIN' => $user->lang['AB_QUESTION_EXPLAIN'],
'AB_QUESTION' => $ab_question,
));
}
// END ABD question addon
Code: Select all
'confirm_code' => request_var('confirm_code', ''))
);
}
Code: Select all
// Add the ab question to the hidden fields, else an error is displayed on next submit/preview
if ($solved_abq !== false)
{
$s_hidden_fields .= build_hidden_fields(array(
'ab_question' => strtolower(utf8_normalize_nfc(request_var('ab_question', '', true))),
));
}
Code: Select all
<dd><input type="text" name="confirm_code" id="confirm_code" size="8" maxlength="8" tabindex="3" class="inputbox narrow" title="{L_CONFIRM_CODE}" /></dd>
</dl>
<!-- ENDIF -->
Code: Select all
<!-- IF S_AB_QUESTION -->
<dl>
<dt><label for="ab_question">{L_AB_QUESTION}:</label><br /><span>{L_AB_QUESTION_EXPLAIN}</span></dt>
<dd><input type="hidden" name="ab_question" value="{AB_QUESTION}" /></dd>
<dd><input type="text" name="ab_question" id="ab_question" size="25" maxlength="255" tabindex="3" class="inputbox narrow" /></dd>
</dl>
<!-- ENDIF -->
Should bescousser wrote: $solved_captcha = $solved_abq
Code: Select all
$solved_captcha = $solved_abq = false;
Oh, but I did install the mod into the style I'm using. I can see the anti-bot question during registration, no problems there, the problem starts when I hit submit to complete the registration. Even if I have entered the anti-bot question correctly, I get the message "No Anti-Bot Question Answer Entered."RMcGirr83 wrote:You need to install the mod into whichever style you are using. If you did and still don't see the question in the registration, then ensure you also refreshed the template/purged the cache.
Double check the edits to includes/ucp/ucp_register.php.HitByLife wrote:Oh, but I did install the mod into the style I'm using. I can see the anti-bot question during registration, no problems there, the problem starts when I hit submit to complete the registration. Even if I have entered the anti-bot question correctly, I get the message "No Anti-Bot Question Answer Entered."