From 79e09c4f8bdc80c0eeb53b8854e4fb6b320cbfea Mon Sep 17 00:00:00 2001 From: Retro_Guy Date: Tue, 2 Apr 2024 12:28:26 -0700 Subject: [PATCH] Allow to disable x-face in overrides.inc.php. --- Rocksolid_Light/rocksolid/lib/message.inc.php | 4 ++-- Rocksolid_Light/rslight/overrides.inc.php.dist | 3 +++ Rocksolid_Light/spoolnews/user.php | 8 +++++--- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/Rocksolid_Light/rocksolid/lib/message.inc.php b/Rocksolid_Light/rocksolid/lib/message.inc.php index 3858b25..a78153e 100644 --- a/Rocksolid_Light/rocksolid/lib/message.inc.php +++ b/Rocksolid_Light/rocksolid/lib/message.inc.php @@ -750,7 +750,7 @@ function nl2p($string, $line_breaks = true, $xml = true) */ function message_show($group, $id, $attachment = 0, $article_data = false, $maxlen = false) { - global $file_article, $file_article_full; + global $file_article, $file_article_full, $OVERRIDES; global $text_header, $text_article, $article_showthread, $file_attachment, $attachment_show; global $block_xnoarchive, $article_graphicquotes; global $CONFIG; @@ -771,7 +771,7 @@ function message_show($group, $id, $attachment = 0, $article_data = false, $maxl } else if (($head->content_type[$attachment] == "text/plain") && ($attachment == 0)) { show_header($head, $group, $local_poster); // X-Face - if ($face = display_full_headers($head->number, $group, $head->name, $head->from, true)) { + if (($face = display_full_headers($head->number, $group, $head->name, $head->from, true)) && ($OVERRIDES['disable_xface'] != true)) { $pngfile = '../tmp/face-' . hash('ripemd160', $face); if (file_exists($pngfile)) { echo ''; diff --git a/Rocksolid_Light/rslight/overrides.inc.php.dist b/Rocksolid_Light/rslight/overrides.inc.php.dist index 784fd13..0ea33cc 100644 --- a/Rocksolid_Light/rslight/overrides.inc.php.dist +++ b/Rocksolid_Light/rslight/overrides.inc.php.dist @@ -39,6 +39,9 @@ return [ // Users who may have duplicate aliases in aliases.conf 'duplicate_aliases' => array("admins user name here"), + // Disable display of X-Face + 'disable_xface' => false, + // Just leave this here to avoid comma errors 'comma' => true ]; diff --git a/Rocksolid_Light/spoolnews/user.php b/Rocksolid_Light/spoolnews/user.php index 9c5d524..671c09d 100644 --- a/Rocksolid_Light/spoolnews/user.php +++ b/Rocksolid_Light/spoolnews/user.php @@ -388,9 +388,11 @@ if (isset($_POST['command']) && $_POST['command'] == 'Configuration') { echo ''; echo ''; // X-Face - echo '

X-Face:

'; - echo ''; + if ($OVERRIDES['disable_xface'] != true) { + echo '

X-Face:

'; + echo ''; + } echo ''; // Theme if (isset($user_config['theme']) && trim($user_config['theme']) != '') {