HTML cleanup in thread view.

This commit is contained in:
Retro_Guy 2024-10-29 04:41:41 -07:00
parent 98feae2e3b
commit 634e0848b9
4 changed files with 40 additions and 19 deletions

View File

@ -513,6 +513,32 @@
margin: 100px; margin: 100px;
} }
/* thread.php view */
.thread_datebox {
display: flex;
justify-content: space-between;
}
.create_name_link {
color: var(--color-visited);
}
/* Attribution below Subject */
.thread_start_author_info {
float: left;
margin-top: 5;
margin-bottom: 0;
margin-right: 10;
margin-left: 10;
text-decoration: none;
color: var(--color-highlight);
text-align: left;
font-family: Arial, Helvetica, sans-serif;
font-size: 0.8em;
width: 50%;
}
div.ellipsis { div.ellipsis {
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
@ -1043,11 +1069,6 @@ table.np_results_table {
width: 50%; width: 50%;
} }
#datebox {
display: flex;
justify-content: space-between;
}
/* last posted_date */ /* last posted_date */
.np_last_posted_date { .np_last_posted_date {
margin-top: 10; margin-top: 10;

View File

@ -712,9 +712,9 @@ function thread_format_subject($c, $group, $highlightids = false)
} else { } else {
$started = $fromoutput[0]; $started = $fromoutput[0];
} }
$return .= '<div id="datebox">'; $return .= '<span class="thread_datebox">';
$return .= '<p class=np_posted_date_left>By: ' . create_name_link($started, $c->from) . ' on <i>' . date("D, j M Y", $newdate) . '</i></p>'; $return .= '<span class=thread_start_author_info>By: ' . create_name_link($started, $c->from) . ' on <i>' . date("D, j M Y", $newdate) . '</i></span>';
$return .= '</div>'; $return .= '</span>';
} }
return ($return); return ($return);
} }
@ -851,11 +851,11 @@ function thread_format_lastmessage($c, $group = '')
} }
if ($ovfound == 1) { if ($ovfound == 1) {
$url = 'article-flat.php?id=' . $found['number'] . '&group=' . urlencode($group) . '#' . $found['number']; $url = 'article-flat.php?id=' . $found['number'] . '&group=' . urlencode($group) . '#' . $found['number'];
$return = '<p class=np_posted_date_left><a href="' . $url . '">' . get_date_interval(date("D, j M Y H:i T", $c->date_thread)) . '</a>'; $return = '<span class=np_posted_date_left><a href="' . $url . '">' . get_date_interval(date("D, j M Y H:i T", $c->date_thread)) . '</a></span>';
} else { } else {
$return = '<p class=np_posted_date_left>' . get_date_interval(date("D, j M Y H:i T", $c->date_thread)) . '</p>'; $return = '<span class=np_posted_date_left>' . get_date_interval(date("D, j M Y H:i T", $c->date_thread)) . '</span>';
} }
$return .= '<p class=np_posted_date_left>By: ' . create_name_link($poster_name, $name_from) . '</p>'; $return .= '<span class=np_posted_date_left>By: ' . create_name_link($poster_name, $name_from) . '</span>';
return ($return); return ($return);
} }

View File

@ -814,7 +814,7 @@ function groups_show($gruppen)
break; break;
} }
} }
$groupdisplay .= '<font class="np_last_posted_date">'; $groupdisplay .= '<span class="np_last_posted_date">';
$groupdisplay .= 'by: '; $groupdisplay .= 'by: ';
if ($block) { if ($block) {
@ -822,7 +822,7 @@ function groups_show($gruppen)
} else { } else {
$groupdisplay .= create_name_link($lastarticleinfo['name'], $name_from); $groupdisplay .= create_name_link($lastarticleinfo['name'], $name_from);
} }
$groupdisplay .= '</font>'; $groupdisplay .= '</span>';
$groupdisplay .= '</td></tr></table>'; $groupdisplay .= '</td></tr></table>';
} else { } else {
unset($lastarticleinfo); unset($lastarticleinfo);
@ -1760,7 +1760,7 @@ function create_name_link($name, $data = null, $truncate = true)
$data = urlencode(base64_encode($data)); $data = urlencode(base64_encode($data));
} }
if ((strpos($name, '...@') !== false && (isset($CONFIG['hide_email']) && $CONFIG['hide_email'] == true)) && ! $data) { if ((strpos($name, '...@') !== false && (isset($CONFIG['hide_email']) && $CONFIG['hide_email'] == true)) && ! $data) {
$return = '<span class="visited">' . substr(htmlspecialchars($name), 0, $trimlength) . '</span>'; $return = '<span class="create_name_link">' . substr(htmlspecialchars($name), 0, $trimlength) . '</span>';
} else { } else {
if (isset($_COOKIE['mail_name'])) { if (isset($_COOKIE['mail_name'])) {
$return = '<a href="search.php?command=search&searchpoint=Poster&terms=' . urlencode($name) . '&data=' . $data . '" title="Search or Block by user"><span class="visited">' . substr(htmlspecialchars($name), 0, $trimlength) . '</span></a>'; $return = '<a href="search.php?command=search&searchpoint=Poster&terms=' . urlencode($name) . '&data=' . $data . '" title="Search or Block by user"><span class="visited">' . substr(htmlspecialchars($name), 0, $trimlength) . '</span></a>';

View File

@ -74,8 +74,8 @@ if ((! function_exists("npreg_group_has_read_access") || npreg_group_has_read_ac
} }
$_SESSION['return_page'] = $_SERVER['REQUEST_URI'] . $_SERVER['REQUEST_STRING']; $_SESSION['return_page'] = $_SERVER['REQUEST_URI'] . $_SERVER['REQUEST_STRING'];
echo '<a name="top"></a>'; // echo '<a name="top"></a>';
echo '<h1 class="np_thread_headline">'; echo '<h1 id="top" class="np_thread_headline">';
echo '<a href="' . $file_index . '" target=' . $frame['menu'] . '>' . basename(getcwd()) . '</a> / '; echo '<a href="' . $file_index . '" target=' . $frame['menu'] . '>' . basename(getcwd()) . '</a> / ';
echo htmlspecialchars(group_display_name($group)) . '</h1>'; echo htmlspecialchars(group_display_name($group)) . '</h1>';
@ -85,7 +85,7 @@ if ((! function_exists("npreg_group_has_read_access") || npreg_group_has_read_ac
if (isset($overboard) && ($overboard == true)) { if (isset($overboard) && ($overboard == true)) {
echo '<td>'; echo '<td>';
echo '<form action="overboard.php">'; echo '<form action="overboard.php">';
echo '<input type="hidden" name="thisgroup" value="' . urlencode($group) . '"/>'; echo '<input type="hidden" name="thisgroup" value="' . urlencode($group) . '">';
echo '<button class="np_button_link" type="submit">' . $text_thread["button_latest"] . '</button>'; echo '<button class="np_button_link" type="submit">' . $text_thread["button_latest"] . '</button>';
echo '</form>'; echo '</form>';
echo '</td>'; echo '</td>';
@ -94,7 +94,7 @@ if ((! function_exists("npreg_group_has_read_access") || npreg_group_has_read_ac
// New Thread button // New Thread button
echo '<td>'; echo '<td>';
echo '<form action="' . $file_post . '">'; echo '<form action="' . $file_post . '">';
echo '<input type="hidden" name="group" value="' . urlencode($group) . '"/>'; echo '<input type="hidden" name="group" value="' . urlencode($group) . '">';
echo '<button class="np_button_link" type="submit">' . $text_thread["button_write"] . '</button>'; echo '<button class="np_button_link" type="submit">' . $text_thread["button_write"] . '</button>';
echo '</form>'; echo '</form>';
echo '</td>'; echo '</td>';
@ -103,7 +103,7 @@ if ((! function_exists("npreg_group_has_read_access") || npreg_group_has_read_ac
echo '<td>'; echo '<td>';
echo '<form target="' . $frame['content'] . '" action="search.php">'; echo '<form target="' . $frame['content'] . '" action="search.php">';
echo '<button class="np_button_link" type="submit">' . $text_thread["button_search"] . '</button>'; echo '<button class="np_button_link" type="submit">' . $text_thread["button_search"] . '</button>';
echo '<input type="hidden" name="group" value="' . urlencode($group) . '"/>'; echo '<input type="hidden" name="group" value="' . urlencode($group) . '">';
echo '</form>'; echo '</form>';
echo '</td>'; echo '</td>';
// Newsgroups button (hidden) // Newsgroups button (hidden)