diff --git a/inc/config.php b/inc/config.php index bfb7a6ac..151d4972 100644 --- a/inc/config.php +++ b/inc/config.php @@ -321,6 +321,16 @@ // Optional spoiler images $config['spoiler_images'] = false; + + // With the following, you can disable certain superfluous fields or enable "forced anonymous". + + // When true, all names will be set to $config['anonymous']. + $config['field_disable_name'] = false; + // When true, no email will be able to be set. + $config['field_disable_email'] = false; + // When true, a blank password will be used for files (not usable for deletion). + $config['field_disable_password'] = false; + /* * ==================== * Image settings diff --git a/post.php b/post.php index 3993ef5a..5dcc9424 100644 --- a/post.php +++ b/post.php @@ -131,6 +131,16 @@ header('Location: ' . $root . $board['dir'] . $config['file_index'], true, $config['redirect_http']); } elseif(isset($_POST['post'])) { + + if($config['field_disable_name']) + $_POST['name'] = $config['anonymous']; // "forced anonymous" + + if($config['field_disable_email']) + $_POST['email'] = ''; + + if($config['field_disable_password']) + $_POST['password'] = ''; + if( !isset($_POST['name']) || !isset($_POST['email']) || !isset($_POST['subject']) || diff --git a/templates/post_form.html b/templates/post_form.html index 7ef133ed..e13b049b 100644 --- a/templates/post_form.html +++ b/templates/post_form.html @@ -4,22 +4,22 @@ {% if mod %}{% endif %}
{% trans %}Name{% endtrans %} | - |
---|---|
{% trans %}Email{% endtrans %} | - |
{% trans %}Subject{% endtrans %} @@ -86,7 +86,7 @@ | |
{% trans %}Password{% endtrans %} | @@ -94,7 +94,7 @@ {% trans %}(For file deletion.){% endtrans %} -