From e5ff52f2990515bfe8692f0f8c5bb43116692a46 Mon Sep 17 00:00:00 2001 From: Retro_Guy Date: Mon, 15 Apr 2024 03:47:44 -0700 Subject: [PATCH] Add ability to disable adding attachments by section in overrides.inc.php. --- Rocksolid_Light/rocksolid/post.php | 22 +++++++++---------- .../rslight/overrides.inc.php.dist | 5 +++++ 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/Rocksolid_Light/rocksolid/post.php b/Rocksolid_Light/rocksolid/post.php index dd9e461..f1a1e03 100644 --- a/Rocksolid_Light/rocksolid/post.php +++ b/Rocksolid_Light/rocksolid/post.php @@ -95,7 +95,7 @@ global $synchro_user, $synchro_pass; $thisgroup = _rawurldecode($_REQUEST['group']); // Is this a reply to an article containing Followup-To? -if(isset($_REQUEST['fgroups'])) { +if (isset($_REQUEST['fgroups'])) { $thisgroup = $_REQUEST['fgroups']; } @@ -382,8 +382,8 @@ if ($show == 1) { echo 'value="' . htmlspecialchars($subject) . '" '; echo 'size="40" maxlength="' . $thread_maxSubject . '">'; echo ''; - - if($has_followup) { + + if ($has_followup) { echo ''; echo ''; echo ''; @@ -395,7 +395,7 @@ if ($show == 1) { echo ''; echo ''; } - + echo '' . $text_post["name"] . ''; echo ''; if (! isset($name) && $CONFIG['anonuser']) @@ -493,15 +493,13 @@ function quoten() { onclick="quoten(); this.style.visibility= 'hidden';">   - -  - - - - '; + echo ''; + } if ($post_captcha) { echo ''; echo captcha::form($text_post["captchainfo1"], $text_post["captchainfo2"]); diff --git a/Rocksolid_Light/rslight/overrides.inc.php.dist b/Rocksolid_Light/rslight/overrides.inc.php.dist index 0ea33cc..769bd28 100644 --- a/Rocksolid_Light/rslight/overrides.inc.php.dist +++ b/Rocksolid_Light/rslight/overrides.inc.php.dist @@ -42,6 +42,11 @@ return [ // Disable display of X-Face 'disable_xface' => false, + // Disable posting attachments by section + // List section names to disable: + // array("sectionONE", "sectionTWO", "sectionETC"), + 'disable_attach' => array("section"), + // Just leave this here to avoid comma errors 'comma' => true ];