From c10f6c918fb57364f725a92a828367df6a68137b Mon Sep 17 00:00:00 2001 From: Retro_Guy Date: Thu, 17 Oct 2024 06:43:06 -0700 Subject: [PATCH] Add option to display References in short headers. --- Rocksolid_Light/rocksolid/lib/message.inc.php | 15 ++++++++++++++- Rocksolid_Light/rslight/overrides.inc.php.dist | 4 ++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/Rocksolid_Light/rocksolid/lib/message.inc.php b/Rocksolid_Light/rocksolid/lib/message.inc.php index e3f39e5..4edf8ae 100644 --- a/Rocksolid_Light/rocksolid/lib/message.inc.php +++ b/Rocksolid_Light/rocksolid/lib/message.inc.php @@ -282,7 +282,7 @@ function message_read($id, $bodynum = 0, $group = "") // also doesnt't contain that article... thread_cache_removearticle($group, $id); // This is most likely a bot calling an old article, not a bug - // file_put_contents($debug_log, "\n" . logging_prefix() . " " . $config_name . " Unable to retrieve: " . $group . ":" . $id . " from local server. Removing...", FILE_APPEND); + // file_put_contents($debug_log, "\n" . logging_prefix() . " " . $config_name . " Unable to retrieve: " . $group . ":" . $id . " from local server. Removing...", FILE_APPEND); return false; } else { } @@ -518,6 +518,8 @@ function show_header_short($head, $group, $local_poster = false) { global $article_show, $text_header, $file_article, $file_thread, $attachment_show; global $file_attachment, $anonym_address, $CONFIG, $config_name, $sitelink; + global $OVERRIDES; + if (isset($_COOKIE['tzo'])) { $offset = $_COOKIE['tzo']; } else { @@ -606,6 +608,17 @@ function show_header_short($head, $group, $local_poster = false) echo '- ' . $displaydate; echo ''; + // Display References in short headers if enabled in overrides.inc.php + if ((isset($OVERRIDES['short_header_references'])) && ($OVERRIDES['short_header_references'] == true) && (isset($head->references[0]))) { + echo '
'; + echo $text_header["references"]; + for ($i = 0; $i <= count($head->references) - 1; $i++) { + $ref = $head->references[$i]; + echo ' ' . '' . ($i + 1) . ''; + } + echo "
"; + } + if ((isset($attachment_show)) && ($attachment_show == true) && (isset($head->content_type[1]))) { echo '
'; echo $text_header["attachments"]; diff --git a/Rocksolid_Light/rslight/overrides.inc.php.dist b/Rocksolid_Light/rslight/overrides.inc.php.dist index d68019b..8c562a0 100644 --- a/Rocksolid_Light/rslight/overrides.inc.php.dist +++ b/Rocksolid_Light/rslight/overrides.inc.php.dist @@ -16,6 +16,10 @@ return [ // Display short view of headers (only subject, name, date) 'short_headers' => true, + // Enable display of References when using short headers + // Default is false + 'short_header_references' => false, + // Log posts? 'enable_post_log' => false,