Allow to disable x-face in overrides.inc.php.

This commit is contained in:
Retro_Guy 2024-04-02 12:28:26 -07:00
parent d67c35ee42
commit 79e09c4f8b
3 changed files with 10 additions and 5 deletions

View File

@ -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 '<img align="right" src="' . $pngfile . '">';

View File

@ -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
];

View File

@ -388,9 +388,11 @@ if (isset($_POST['command']) && $_POST['command'] == 'Configuration') {
echo '</textarea></td>';
echo '</tr>';
// X-Face
echo '<td class="np_result_line1" style="word-wrap:break-word";><h3>X-Face:</h3></td>';
echo '</tr><tr><td class="np_result_line1" style="word-wrap:break-word";><textarea class="configuration" id="xface" name="xface" rows="4" cols="80">' . $user_config['xface'];
echo '</textarea></td>';
if ($OVERRIDES['disable_xface'] != true) {
echo '<td class="np_result_line1" style="word-wrap:break-word";><h3>X-Face:</h3></td>';
echo '</tr><tr><td class="np_result_line1" style="word-wrap:break-word";><textarea class="configuration" id="xface" name="xface" rows="4" cols="80">' . $user_config['xface'];
echo '</textarea></td>';
}
echo '</tr>';
// Theme
if (isset($user_config['theme']) && trim($user_config['theme']) != '') {