SpamNoticer: render out post on ban page with extra checkboxes to allow flagging different parts of it for spamnoticer

This commit is contained in:
towards-a-new-leftypol 2023-08-08 02:44:32 -04:00
parent 0dce0f1d8a
commit a45f3f34a3
5 changed files with 14 additions and 7 deletions

View File

@ -105,7 +105,7 @@ $config['thread_subject_in_title'] = true;
// this functionality is permanently disabled.
$config['spam']['enabled'] = false;
$config['spam_noticer']['enabled'] = true;
$config['spam_noticer']['base_url'] = 'http://192.168.4.147:8888';
$config['spam_noticer']['base_url'] = 'http://192.168.4.6:8888';
/*
* Basic captcha. See also: captchaconfig.php

View File

@ -1,11 +1,12 @@
/* Show the table when "Ban" checkbox is checked */
input[type="checkbox"]#checkbox-ban:checked ~ .ban-form {
/* display: table; */
#checkbox-ban:checked ~ .ban-form,
#checkbox-ban-content:checked ~ .postcontainer {
filter: grayscale(0%);
}
/* Hide the table by default */
.ban-form {
.ban-form,
.postcontainer {
filter: grayscale(100%);
}

View File

@ -28,6 +28,8 @@
{% if post.modifiers['warning message'] %}
{{ config.mod.warning_message|sprintf(post.modifiers['warning message']) }}
{% endif %}
<input class="ban_form--content_file_chkbox" type="checkbox" name="text_is_spam" id="text_is_spam" checked>
<label class="ban_form--content_file_chkbox_lbl" for="text_is_spam">Text is also spam</label>
</div>
</div>
</div>

View File

@ -21,13 +21,13 @@
{% endif %}
{% if spamnoticer %}
<input class="ban-form-action--input" type="checkbox" id="checkbox-ban" checked>
<input class="ban-form-action--input" type="checkbox" name="checkbox-ban" id="checkbox-ban" checked>
<label class="ban-form-action--label" for="checkbox-ban">Ban</label>
<input class="ban-form-action--input" type="checkbox" id="checkbox-delete" checked>
<input class="ban-form-action--input" type="checkbox" name="checkbox-delete" id="checkbox-delete" checked>
<label class="ban-form-action--label" for="checkbox-delete">Delete</label>
<input class="ban-form-action--input" type="checkbox" id="checkbox-ban-content">
<input class="ban-form-action--input" type="checkbox" name="checkbox-ban-content" id="checkbox-ban-content">
<label class="ban-form-action--label" for="checkbox-ban-content">Ban Content</label>
{% endif %}

View File

@ -28,6 +28,10 @@
{% endif %}
{% endif %}
)
{% if spamnoticer %}
<input class="ban_form--content_file_chkbox" type="checkbox" name="file_is_spam_{{ file.file }}" id="file_is_spam_{{ file.file }}" checked>
<label class="ban_form--content_file_chkbox_lbl" for="file_is_spam_{{ file.file }}">File is spam</label>
{% endif %}
{% include "post/image_identification.html" %}
{% include "post/file_controls.html" %}</span></p>
{% include "post/image.html" with {'post':file} %}