Add link to latest message in group list page.

This commit is contained in:
Retro_Guy 2024-11-02 09:00:50 -07:00
parent 0ed2c0c2c2
commit 7e86b03b68
3 changed files with 189 additions and 92 deletions

View File

@ -135,6 +135,7 @@
background: var(--color-dark); background: var(--color-dark);
border-radius: 5px; border-radius: 5px;
} }
/* Header buttons */ /* Header buttons */
.np_header_button_link { .np_header_button_link {
padding-left: 5px; padding-left: 5px;
@ -245,7 +246,7 @@
} }
.header_links_text { .header_links_text {
text-align:right text-align: right
} }
.header_message_id_search { .header_message_id_search {
@ -511,7 +512,8 @@ input[id^=trigger_headers]:checked+.display_headers_on {
} }
.display_headers_on { .display_headers_on {
display: none; /* NEW */ display: none;
/* NEW */
background: var(--color-dark); background: var(--color-dark);
padding: 3px; padding: 3px;
color: var(--color-text); color: var(--color-text);
@ -609,6 +611,7 @@ textarea.configuration {
/* Grouplist */ /* Grouplist */
/* grouplist.php */
.grouplist_table { .grouplist_table {
text-align: center; text-align: center;
margin-left: auto; margin-left: auto;
@ -693,6 +696,61 @@ textarea.configuration {
padding-right: 10px; padding-right: 10px;
} }
/* newsportal.php groups_show() */
.grouplist_thread_head {
color: var(--color-visited);
background: var(--color-light);
margin: 0px;
}
.grouplist_thread_head_latest {
color: var(--color-visited);
background: var(--color-light);
margin: 0px;
width: 45px;
font-weight: bold;
}
.grouplist_thread_head_subject {
color: var(--color-visited);
background: var(--color-light);
margin: 0px;
text-align: center;
font-weight: bold;
}
.grouplist_thread_head_messages {
color: var(--color-visited);
background: var(--color-light);
margin: 0px;
width: 8%;
font-weight: bold;
}
.grouplist_thread_head_lastarticle {
color: var(--color-visited);
background: var(--color-light);
margin: 0px;
width: 20%;
font-weight: bold;
}
.grouplist_thread_start_author_info {
float: left;
box-sizing: border-box;
padding: 1px;
margin-bottom: 0;
text-decoration: none;
color: var(--color-highlight);
text-align: left;
font-family: Arial, Helvetica, sans-serif;
font-size: 1.0em;
}
.grouplist_td_thread_start_author_info {
margin: 0px;
}
/* Mobile Styles */ /* Mobile Styles */
@media only screen and (max-device-width: 480px) { @media only screen and (max-device-width: 480px) {
body { body {
@ -701,79 +759,96 @@ textarea.configuration {
font-family: Arial, Helvetica, sans-serif; font-family: Arial, Helvetica, sans-serif;
font-size: calc(1em + 2vw); font-size: calc(1em + 2vw);
} }
.header { .header {
margin: 5px; margin: 5px;
height: 10%; height: 10%;
} }
.menu { .menu {
margin: 0px; margin: 0px;
width: 0%; width: 0%;
height: 0% height: 0%
} }
.content { .content {
margin: 10px; margin: 10px;
width: 100%; width: 100%;
height: 89%; height: 89%;
} }
.title { .title {
font-size: 0em; font-size: 0em;
} }
.title_small { .title_small {
font-size: 1.2em; font-size: 1.2em;
} }
.header_menu { .header_menu {
font-size: 0.7em; font-size: 0.7em;
} }
.np_header_button_link { .np_header_button_link {
font-size: 1em; font-size: 1em;
} }
.np_header_bar_large { .np_header_bar_large {
display: none; display: none;
} }
.np_title { .np_title {
font-size: 1em; font-size: 1em;
} }
textarea.postbody { textarea.postbody {
height: calc(1em * 1.5 * 10); height: calc(1em * 1.5 * 10);
width: 100%; width: 100%;
} }
input.post { input.post {
width: 90%; width: 90%;
} }
} }
/* Tablet Styles */ /* Tablet Styles */
@media only screen and (min-device-width: 481px) and (max-device-width: @media only screen and (min-device-width: 481px) and (max-device-width: 820px) {
820px) {
body { body {
color: var(--color-text); color: var(--color-text);
background: var(--color-light); background: var(--color-light);
font-family: Arial, Helvetica, sans-serif; font-family: Arial, Helvetica, sans-serif;
font-size: calc(1em + 1vw); font-size: calc(1em + 1vw);
} }
.header { .header {
margin: 5px; margin: 5px;
height: 10%; height: 10%;
} }
.menu { .menu {
margin: 0px; margin: 0px;
width: 0%; width: 0%;
height: 0% height: 0%
} }
.content { .content {
margin: 10px; margin: 10px;
width: 100%; width: 100%;
height: 89%; height: 89%;
} }
.title { .title {
font-size: 1.2em; font-size: 1.2em;
} }
.header_menu { .header_menu {
font-size: 0.8em; font-size: 0.8em;
} }
.np_header_button_link { .np_header_button_link {
font-size: 1.5em; font-size: 1.5em;
} }
.np_header_bar_large { .np_header_bar_large {
display: none; display: none;
} }
@ -789,24 +864,30 @@ textarea.configuration {
font-family: Arial, Helvetica, sans-serif; font-family: Arial, Helvetica, sans-serif;
font-size: calc(1em + 1vw); font-size: calc(1em + 1vw);
} }
.header { .header {
margin: 0px; margin: 0px;
height: 8%; height: 8%;
} }
.menu { .menu {
width: 20%; width: 20%;
height: 92% height: 92%
} }
.content { .content {
width: 80%; width: 80%;
height: 92%; height: 92%;
} }
.title { .title {
font-size: 1.5em; font-size: 1.5em;
} }
.header_menu { .header_menu {
font-size: 0.8em; font-size: 0.8em;
} }
.np_button_hidden { .np_button_hidden {
padding-left: 0px; padding-left: 0px;
padding-right: 0px; padding-right: 0px;
@ -814,6 +895,7 @@ textarea.configuration {
color: transparent; color: transparent;
font-size: 0em; font-size: 0em;
} }
.np_header_bar_small { .np_header_bar_small {
display: none; display: none;
} }
@ -895,7 +977,8 @@ table.np_thread_table {
} }
/* Head of the table */ /* Head of the table */
tr.np_thread_head, td.np_thread_head { tr.np_thread_head,
td.np_thread_head {
color: var(--color-visited); color: var(--color-visited);
background: var(--color-light); background: var(--color-light);
margin: 0px; margin: 0px;
@ -930,7 +1013,8 @@ td.np_thread_head_author {
} }
/* Even line numbers in the thread */ /* Even line numbers in the thread */
tr.np_thread_line1, td.np_thread_line1 { tr.np_thread_line1,
td.np_thread_line1 {
padding-left: 3px; padding-left: 3px;
padding-top: 3px; padding-top: 3px;
padding-right: 0px; padding-right: 0px;
@ -945,13 +1029,14 @@ tr.np_thread_line1, td.np_thread_line1 {
} }
/* Odd line numbers in the thread */ /* Odd line numbers in the thread */
tr.np_thread_line2, td.np_thread_line2 { tr.np_thread_line2,
td.np_thread_line2 {
padding-left: 3px; padding-left: 3px;
padding-top: 3px; padding-top: 3px;
padding-right: 0px; padding-right: 0px;
padding-bottom: 3px; padding-bottom: 3px;
background: var(--color-light); background: var(--color-light);
/* border-top: 1px solid var(--color-row-border); */ /* border-top: 1px solid var(--color-row-border); */
border-bottom: 1px solid var(--color-row-border); border-bottom: 1px solid var(--color-row-border);
border-right: 1px solid var(--color-row-border); border-right: 1px solid var(--color-row-border);
margin: 0px; margin: 0px;
@ -961,7 +1046,8 @@ tr.np_thread_line2, td.np_thread_line2 {
} }
/* Text inside a Line */ /* Text inside a Line */
span.np_thread_line_text, td.np_thread_line_text { span.np_thread_line_text,
td.np_thread_line_text {
font-size: 1em; font-size: 1em;
font-weight: bold; font-weight: bold;
font-family: Arial, Helvetica, sans-serif; font-family: Arial, Helvetica, sans-serif;
@ -1035,49 +1121,56 @@ h1.np_post_headline {
.np_post_header_subject { .np_post_header_subject {
color: var(--color-text); color: var(--color-text);
font-family: Arial, Helvetica, sans-serif; font-family: Arial, Helvetica, sans-serif;
font-size: 0.6em;; font-size: 0.6em;
;
text-align: right; text-align: right;
} }
.np_post_header_newsgroups { .np_post_header_newsgroups {
color: var(--color-text); color: var(--color-text);
font-family: Arial, Helvetica, sans-serif; font-family: Arial, Helvetica, sans-serif;
font-size: 0.6em;; font-size: 0.6em;
;
text-align: right; text-align: right;
} }
.np_post_header_followupto { .np_post_header_followupto {
color: var(--color-text); color: var(--color-text);
font-family: Arial, Helvetica, sans-serif; font-family: Arial, Helvetica, sans-serif;
font-size: 0.6em;; font-size: 0.6em;
;
text-align: right; text-align: right;
} }
.np_post_header_name { .np_post_header_name {
color: var(--color-text); color: var(--color-text);
font-family: Arial, Helvetica, sans-serif; font-family: Arial, Helvetica, sans-serif;
font-size: 0.6em;; font-size: 0.6em;
;
text-align: right; text-align: right;
} }
.np_post_header_password { .np_post_header_password {
color: var(--color-text); color: var(--color-text);
font-family: Arial, Helvetica, sans-serif; font-family: Arial, Helvetica, sans-serif;
font-size: 0.6em;; font-size: 0.6em;
;
text-align: right; text-align: right;
} }
.np_post_header_from { .np_post_header_from {
color: var(--color-text); color: var(--color-text);
font-family: Arial, Helvetica, sans-serif; font-family: Arial, Helvetica, sans-serif;
font-size: 0.6em;; font-size: 0.6em;
;
text-align: right; text-align: right;
} }
.np_post_header_or { .np_post_header_or {
color: var(--color-text); color: var(--color-text);
font-family: Arial, Helvetica, sans-serif; font-family: Arial, Helvetica, sans-serif;
font-size: 0.7em;; font-size: 0.7em;
;
text-align: right; text-align: right;
} }
@ -1089,7 +1182,8 @@ h1.np_post_headline {
.np_post_body_notification { .np_post_body_notification {
color: var(--color-text); color: var(--color-text);
font-family: Arial, Helvetica, sans-serif; font-family: Arial, Helvetica, sans-serif;
font-size: 0.5em;; font-size: 0.5em;
;
text-align: right; text-align: right;
} }
@ -1205,7 +1299,7 @@ table.np_results_table {
margin-bottom: 0; margin-bottom: 0;
text-decoration: none; text-decoration: none;
color: var(--color-highlight); color: var(--color-highlight);
/* text-align: left; */ /* text-align: left; */
font-family: Arial, Helvetica, sans-serif; font-family: Arial, Helvetica, sans-serif;
font-size: 0.8em; font-size: 0.8em;
} }
@ -1371,6 +1465,7 @@ table.np_results_table {
.np_ob_tail { .np_ob_tail {
font-size: 0.7em; font-size: 0.7em;
} }
/* =========== navigation buttons on top of every page =========== */ /* =========== navigation buttons on top of every page =========== */
.np_buttonbar { .np_buttonbar {
background: var(--color-dark); background: var(--color-dark);

View File

@ -713,7 +713,7 @@ function thread_format_subject($c, $group, $highlightids = false)
$started = $fromoutput[0]; $started = $fromoutput[0];
} }
$return .= '<span class="thread_datebox">'; $return .= '<span class="thread_datebox">';
$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 .= '<span class="thread_start_author_info">By: ' . create_name_link($started, $c->from) . ' on <i>' . date("D, j M Y", $newdate) . '</i></span>';
$return .= '</span>'; $return .= '</span>';
} }
return ($return); return ($return);
@ -855,7 +855,7 @@ function thread_format_lastmessage($c, $group = '')
} else { } else {
$return = '<span class=np_posted_date_left>' . get_date_interval(date("D, j M Y H:i T", $c->date_thread)) . '</span>'; $return = '<span class=np_posted_date_left>' . get_date_interval(date("D, j M Y H:i T", $c->date_thread)) . '</span>';
} }
$return .= '<span class=np_posted_date_left><br>By: ' . create_name_link($poster_name, $name_from) . '</span>'; $return .= '<br><span class=np_posted_date_left>By: ' . create_name_link($poster_name, $name_from) . '</span>';
return ($return); return ($return);
} }

View File

@ -592,8 +592,10 @@ function groups_show($gruppen)
} }
$c = count($gruppen); $c = count($gruppen);
$acttype = "keins"; $acttype = "keins";
echo '<table class="np_groups_table" cellspacing="0"><tr class="np_thread_head"><td width="45px" class="np_thread_head">'; echo '<table class="np_groups_table"><tr class="np_thread_head"><td class="grouplist_thread_head_latest">Latest</td>';
echo 'Latest</td><td style="text-align: center;">Newsgroup</td><td width="8%" class="np_thread_head">Messages</td><td width="20%" class="np_thread_head" >Last Message</td></tr>'; echo '<td class="grouplist_thread_head_subject">Newsgroup</td>';
echo '<td class="grouplist_thread_head_messages">Messages</td>';
echo '<td class="grouplist_thread_head_lastarticle" >Last Message</td></tr>';
$subs = array(); $subs = array();
$nonsubs = array(); $nonsubs = array();
$user = null; $user = null;
@ -781,7 +783,7 @@ function groups_show($gruppen)
$groupdisplay .= '</small>'; $groupdisplay .= '</small>';
/* Display latest article info */ /* Display latest article info */
$groupdisplay .= '</td><td class="' . $lineclass . '"><div class="np_last_posted_date">'; $groupdisplay .= '</td><td class="' . $lineclass . '"><div class="grouplist_td_thread_start_author_info">';
if ($found == 1) { if ($found == 1) {
$fromline = address_decode(headerDecode($lastarticleinfo['name']), "nowhere"); $fromline = address_decode(headerDecode($lastarticleinfo['name']), "nowhere");
@ -803,9 +805,6 @@ function groups_show($gruppen)
} }
$lastarticleinfo['name'] = $poster_name; $lastarticleinfo['name'] = $poster_name;
$groupdisplay .= get_date_interval(date("D, j M Y H:i T", $lastarticleinfo['date']));
$groupdisplay .= '<table><tr><td>';
$block = false; $block = false;
foreach ($blocked_user_config as $key => $value) { foreach ($blocked_user_config as $key => $value) {
$blockme = '/' . addslashes($key) . '/'; $blockme = '/' . addslashes($key) . '/';
@ -814,16 +813,20 @@ function groups_show($gruppen)
break; break;
} }
} }
$groupdisplay .= '<span class="np_last_posted_date">';
$groupdisplay .= 'by: ';
$groupdisplay .= '<span class="grouplist_thread_start_author_info">';
if ($block) { if ($block) {
$url = 'article-flat.php?id=' . $lastarticleinfo['number'] . '&group=' . urlencode($g->name) . '#' . $lastarticleinfo['number'];
$groupdisplay .= get_date_interval(date("D, j M Y H:i T", $lastarticleinfo['date']));
$groupdisplay .= '<br>by: ';
$groupdisplay .= "(blocked user)"; $groupdisplay .= "(blocked user)";
} else { } else {
$url = 'article-flat.php?id=' . $lastarticleinfo['number'] . '&group=' . urlencode($g->name) . '#' . $lastarticleinfo['number'];
$groupdisplay .= '<a href="' . $url . '">' . get_date_interval(date("D, j M Y H:i T", $lastarticleinfo['date'])) . '</a>';
$groupdisplay .= '<br>by: ';
$groupdisplay .= create_name_link($lastarticleinfo['name'], $name_from); $groupdisplay .= create_name_link($lastarticleinfo['name'], $name_from);
} }
$groupdisplay .= '</span>'; $groupdisplay .= '</span>';
$groupdisplay .= '</td></tr></table>';
} else { } else {
unset($lastarticleinfo); unset($lastarticleinfo);
} }
@ -1331,7 +1334,6 @@ function verify_logged_in($name)
// return false; // return false;
// } // }
// For checking session expire stuff // For checking session expire stuff
if (!isset($_SESSION['start_stamp'])) { if (!isset($_SESSION['start_stamp'])) {
$_SESSION['start_stamp'] = time(); $_SESSION['start_stamp'] = time();