mirror of
https://github.com/vichan-devel/vichan.git
synced 2024-11-23 23:20:57 +01:00
commit
9841102494
@ -307,11 +307,15 @@
|
||||
'simple_spam'
|
||||
);
|
||||
|
||||
// Enable simple anti-spam measure.
|
||||
// Enable simple anti-spam measure. Requires the end-user to answer a question before making a post.
|
||||
//Works very well against uncustomized spam.
|
||||
//Answers are case-insensitive.
|
||||
/*
|
||||
$config['simple_spam'] = array (
|
||||
'question' => 'What is 2 + 3?',
|
||||
'question' => 'What\'s 2+3?',
|
||||
'answer' => '5'
|
||||
);
|
||||
*/
|
||||
|
||||
// Enable reCaptcha to make spam even harder. Rarely necessary.
|
||||
$config['recaptcha'] = false;
|
||||
|
2
post.php
2
post.php
@ -559,7 +559,7 @@ if (isset($_POST['delete'])) {
|
||||
|
||||
if (!$dropped_post) {
|
||||
if (isset($config['simple_spam']) && $config['simple_spam'] && $post['op']) {
|
||||
if (!isset($_POST['simple_spam']) || $config['simple_spam']['answer'] != $_POST['simple_spam']) {
|
||||
if (!isset($_POST['simple_spam']) || strtolower($config['simple_spam']['answer']) != strtolower($_POST['simple_spam'])) {
|
||||
error($config['error']['simple_spam']);
|
||||
}
|
||||
}
|
||||
|
@ -217,7 +217,7 @@
|
||||
</tr>{% endif %}
|
||||
{% if config.simple_spam and not id %}<tr>
|
||||
<th>
|
||||
{{ config.simple_spam.prompt }}
|
||||
{{ config.simple_spam.question }}
|
||||
{{ antibot.html() }}
|
||||
</th>
|
||||
<td>
|
||||
|
Loading…
Reference in New Issue
Block a user