Cleanup short_headers a bit. Still an issue with a blank line if no References:
This commit is contained in:
parent
de5efd61ce
commit
4224682879
|
@ -510,7 +510,7 @@ function show_header_short($head, $group, $local_poster = false)
|
||||||
|
|
||||||
echo '<div class="np_article_header">';
|
echo '<div class="np_article_header">';
|
||||||
echo '<b>';
|
echo '<b>';
|
||||||
|
|
||||||
echo '</b>';
|
echo '</b>';
|
||||||
if ($head->name != "") {
|
if ($head->name != "") {
|
||||||
$displayname = create_name_link($head->name, $head->from);
|
$displayname = create_name_link($head->name, $head->from);
|
||||||
|
@ -542,7 +542,7 @@ function show_header_short($head, $group, $local_poster = false)
|
||||||
echo 'window.getSelection().removeAllRanges();';
|
echo 'window.getSelection().removeAllRanges();';
|
||||||
echo '}';
|
echo '}';
|
||||||
echo '</script> ';
|
echo '</script> ';
|
||||||
|
|
||||||
echo '<b>Date: </b>' . $displaydate;
|
echo '<b>Date: </b>' . $displaydate;
|
||||||
|
|
||||||
echo ' <b>Newsgroups: </b>';
|
echo ' <b>Newsgroups: </b>';
|
||||||
|
@ -557,21 +557,22 @@ function show_header_short($head, $group, $local_poster = false)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
echo "<br />";
|
echo "<br />";
|
||||||
|
|
||||||
if (isset($head->followup) && ($article_show["Followup"]) && ($head->followup != "")) {
|
if (isset($head->followup) && ($article_show["Followup"]) && ($head->followup != "")) {
|
||||||
echo '<b>' . $text_header["followup"] . '</b>' . htmlspecialchars($head->followup) . "<br>\n";
|
echo '<b>' . $text_header["followup"] . '</b>' . htmlspecialchars($head->followup) . "<br>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($article_show["trigger_headers"]) {
|
if ($article_show["trigger_headers"]) {
|
||||||
echo '<input type="checkbox" class="np_header_button_checkbox" id="trigger_headers" title="Show headers" name="showheaders" value="showheaders"/>headers';
|
echo '<input type="checkbox" class="np_header_button_checkbox" id="trigger_headers" title="Show headers" name="showheaders" value="showheaders"/>headers';
|
||||||
echo '<div class="display_headers_on">' . display_full_headers($head->number, $group, $head->name, $head->from) . '</div>';
|
echo '<div class="display_headers_on">' . display_full_headers($head->number, $group, $head->name, $head->from) . '</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<p id="<?php echo $head->id; ?>"
|
<p id="<?php echo $head->id . 'copy'; ?>"
|
||||||
style="position: absolute; z-index: -9999;"><?php echo htmlspecialchars($head->id); ?></p>
|
style="position: absolute; z-index: -9999;"><?php echo htmlspecialchars($head->id); ?></p>
|
||||||
|
|
||||||
<a href="<?php echo $sitelink . '/' . $config_name . '/article-flat.php?id=' . $head->number . '&group=' . urlencode($group) . '#' . $head->number; ?>"
|
<a href="<?php echo $sitelink . '/' . $config_name . '/article-flat.php?id=' . $head->id; ?>"
|
||||||
onclick="CopyToClipboard('<?php echo $head->id; ?>');return false;"
|
onclick="CopyToClipboard('<?php echo $head->id . 'copy'; ?>');return false;"
|
||||||
style="text-decoration: none" title="Copy message-id to clipboard"><i>copy
|
style="text-decoration: none" title="Copy message-id to clipboard"><i>copy
|
||||||
mid</i></a>
|
mid</i></a>
|
||||||
|
|
||||||
|
@ -584,20 +585,20 @@ function show_header_short($head, $group, $local_poster = false)
|
||||||
link</i></a>
|
link</i></a>
|
||||||
<?php
|
<?php
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
|
echo '<div class=np_ob_posted_date>';
|
||||||
// Display References in short headers if enabled in overrides.inc.php
|
// 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]))) {
|
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"];
|
echo $text_header["references"];
|
||||||
for ($i = 0; $i <= count($head->references) - 1; $i++) {
|
for ($i = 0; $i <= count($head->references) - 1; $i++) {
|
||||||
$ref = $head->references[$i];
|
$ref = $head->references[$i];
|
||||||
echo ' ' . '<a href="' . $file_article . '?group=' . urlencode($group) . '&id=' . urlencode($ref) . '">' . ($i + 1) . '</a>';
|
echo ' ' . '<a href="' . $file_article . '?group=' . urlencode($group) . '&id=' . urlencode($ref) . '">' . ($i + 1) . '</a>';
|
||||||
}
|
}
|
||||||
echo "</div>";
|
// echo "</div>";
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((isset($attachment_show)) && ($attachment_show == true) && (isset($head->content_type[1]))) {
|
if ((isset($attachment_show)) && ($attachment_show == true) && (isset($head->content_type[1]))) {
|
||||||
echo '<div class=np_ob_posted_date>';
|
// echo '<div class=np_ob_posted_date>';
|
||||||
echo $text_header["attachments"];
|
echo $text_header["attachments"];
|
||||||
for ($i = 1; $i < count($head->content_type); $i++) {
|
for ($i = 1; $i < count($head->content_type); $i++) {
|
||||||
if (! strcmp($head->content_type[$i], "text/html")) {
|
if (! strcmp($head->content_type[$i], "text/html")) {
|
||||||
|
@ -609,8 +610,9 @@ function show_header_short($head, $group, $local_poster = false)
|
||||||
if ($i < count($head->content_type) - 1)
|
if ($i < count($head->content_type) - 1)
|
||||||
echo ', ';
|
echo ', ';
|
||||||
}
|
}
|
||||||
echo '</div>';
|
// echo '</div>';
|
||||||
}
|
}
|
||||||
|
echo ' </div>';
|
||||||
echo '</p>';
|
echo '</p>';
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue