Browse Source

allow quick-reply.js to work

pull/40/head
Michael Save 12 years ago
parent
commit
60aab92f47
  1. 7
      inc/config.php
  2. 8
      post.php

7
inc/config.php

@ -209,7 +209,8 @@
'embed', 'embed',
'recaptcha_challenge_field', 'recaptcha_challenge_field',
'recaptcha_response_field', 'recaptcha_response_field',
'spoiler' 'spoiler',
'quick-reply'
); );
// Custom flood filters. Detect flood attacks and reject new posts if there's a positive match. // Custom flood filters. Detect flood attacks and reject new posts if there's a positive match.
@ -334,6 +335,10 @@
// When true, a blank password will be used for files (not usable for deletion). // When true, a blank password will be used for files (not usable for deletion).
$config['field_disable_password'] = false; $config['field_disable_password'] = false;
// Allows quick-reply.js to work (https://github.com/savetheinternet/Tinyboard-Tools/blob/master/js/forced-anon.js).
// This will make your imageboard more vulnerable to flood attacks.
$config['quick_reply'] = false;
/* /*
* ==================== * ====================
* Image settings * Image settings

8
post.php

@ -161,7 +161,11 @@
if(isset($_POST['thread'])) { if(isset($_POST['thread'])) {
$OP = false; $OP = false;
$post['thread'] = round($_POST['thread']); $post['thread'] = round($_POST['thread']);
} else $OP = true; } elseif($config['quick_reply'] && isset($_POST['quick-reply'])) {
$OP = false;
$post['thread'] = round($_POST['quick-reply']);
} else
$OP = true;
if(!(($OP && $_POST['post'] == $config['button_newtopic']) || if(!(($OP && $_POST['post'] == $config['button_newtopic']) ||
(!$OP && $_POST['post'] == $config['button_reply']))) (!$OP && $_POST['post'] == $config['button_reply'])))
@ -194,7 +198,7 @@
} }
} }
if(checkSpam(Array($board['uri'], isset($post['thread']) ? $post['thread'] : null))) if(checkSpam(Array($board['uri'], isset($post['thread']) && !($config['quick_reply'] && isset($_POST['quick-reply'])) ? $post['thread'] : null)))
error($config['error']['spam']); error($config['error']['spam']);
if($config['robot_enable'] && $config['robot_mute']) { if($config['robot_enable'] && $config['robot_mute']) {

Loading…
Cancel
Save