Add option to display References in short headers.

This commit is contained in:
Retro_Guy 2024-10-17 06:43:06 -07:00
parent 8d35e5adfa
commit c10f6c918f
2 changed files with 18 additions and 1 deletions

View File

@ -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 '</div>';
// 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 '<div class=np_ob_posted_date>';
echo $text_header["references"];
for ($i = 0; $i <= count($head->references) - 1; $i++) {
$ref = $head->references[$i];
echo ' ' . '<a href="' . $file_article . '?group=' . urlencode($group) . '&id=' . urlencode($ref) . '">' . ($i + 1) . '</a>';
}
echo "</div>";
}
if ((isset($attachment_show)) && ($attachment_show == true) && (isset($head->content_type[1]))) {
echo '<div class=np_ob_posted_date>';
echo $text_header["attachments"];

View File

@ -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,