@ -308,9 +308,16 @@
'json_response',
'user_flag',
'no_country',
'tag'
'tag',
'simple_spam'
);
// Enable simple anti-spam measure.
$config['simple_spam'] = array (
'question' => 'What is 2 + 2?',
'answer' => '4'
// Enable reCaptcha to make spam even harder. Rarely necessary.
$config['recaptcha'] = false;
@ -478,6 +478,12 @@ function handle_post(){
}
if ($config['simple_spam'] && $post['op']) {
if(!isset($_POST['simple_spam']) || $config['simple_spam']['answer'] != $_POST['simple_spam'])){
$config['error']['spam'];
if(isset($config['securimage']) && $config['securimage']){
if(!isset($_POST['captcha'])){
@ -203,6 +203,16 @@
{{ antibot.html() }}
</td>
</tr>{% endif %}
{% if config.simple_anti_spam and not id %}<tr>
<th>
{{ config.simple_anti_spam.prompt }}
</th>
<td>
<input type="text" name="simple_anti_spam_answer" value="" size="12" maxlength="18" autocomplete="off">
</table>
{{ antibot.html(true) }}
<input type="hidden" name="hash" value="{{ antibot.hash() }}">