Browse Source

Add option to force a subject when posting threads

main
discomrade 2 years ago
parent
commit
6fb529e745
  1. 3
      inc/config.php
  2. 6
      post.php

3
inc/config.php

@ -489,6 +489,8 @@
$config['force_body_op'] = true;
// Require an image for threads?
$config['force_image_op'] = true;
// Require a subject for threads?
$config['force_subject_op'] = false;
// Strip superfluous new lines at the end of a post.
$config['strip_superfluous_returns'] = true;
@ -1232,6 +1234,7 @@
$config['error']['tooshort_body_op'] = _('OP must be at least %d characters long.');
$config['error']['no_body'] = _('The body was too short or empty.');
$config['error']['noimage'] = _('You must upload an image.');
$config['error']['nosubject'] = _('You must add a subject.');
$config['error']['toomanyimages'] = _('You have attempted to upload too many images!');
$config['error']['nomove'] = _('The server failed to handle your upload.');
$config['error']['fileext'] = _('Unsupported image format.');

6
post.php

@ -641,7 +641,11 @@ if (isset($_POST['delete'])) {
error($config['error']['no_body']);
}
}
if ($post['op'] && $config['force_subject_op'] && $post['subject'] == '') {
error($config['error']['nosubject']);
}
if (!$post['op']) {
// Check if thread is locked
// but allow mods to post

Loading…
Cancel
Save