mirror of
https://github.com/vichan-devel/vichan.git
synced 2025-02-17 11:28:41 +01:00
commit
9841102494
@ -307,11 +307,15 @@
|
|||||||
'simple_spam'
|
'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 (
|
$config['simple_spam'] = array (
|
||||||
'question' => 'What is 2 + 3?',
|
'question' => 'What\'s 2+3?',
|
||||||
'answer' => '5'
|
'answer' => '5'
|
||||||
);
|
);
|
||||||
|
*/
|
||||||
|
|
||||||
// Enable reCaptcha to make spam even harder. Rarely necessary.
|
// Enable reCaptcha to make spam even harder. Rarely necessary.
|
||||||
$config['recaptcha'] = false;
|
$config['recaptcha'] = false;
|
||||||
|
2
post.php
2
post.php
@ -559,7 +559,7 @@ if (isset($_POST['delete'])) {
|
|||||||
|
|
||||||
if (!$dropped_post) {
|
if (!$dropped_post) {
|
||||||
if (isset($config['simple_spam']) && $config['simple_spam'] && $post['op']) {
|
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']);
|
error($config['error']['simple_spam']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -217,7 +217,7 @@
|
|||||||
</tr>{% endif %}
|
</tr>{% endif %}
|
||||||
{% if config.simple_spam and not id %}<tr>
|
{% if config.simple_spam and not id %}<tr>
|
||||||
<th>
|
<th>
|
||||||
{{ config.simple_spam.prompt }}
|
{{ config.simple_spam.question }}
|
||||||
{{ antibot.html() }}
|
{{ antibot.html() }}
|
||||||
</th>
|
</th>
|
||||||
<td>
|
<td>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user