added hover titles to landing page

main
fuzzykitten 2025-04-03 03:29:07 -04:00
parent 6e7dff191a
commit 65c44719ad
2 changed files with 11 additions and 6 deletions

View File

@ -150,7 +150,9 @@ function show_post_form($db, $msg, $sub, $settings, $org_id, $css, $quote, $ip)
. "<table class='newpost'>"
. "<input type='hidden' name='css' value='$css'>";
if ( (!$org_id) && $sub == 'main') {
if ( (!$org_id) &&
($sub == 'main') &&
($settings['enable_sub_creation'] == TRUE) ) {
$html_string .= "<tr><td><input type='text' name='sub' value='$sub' "
. "placeholder='name of sub'>";
}
@ -233,7 +235,6 @@ function show_post_form($db, $msg, $sub, $settings, $org_id, $css, $quote, $ip)
if ($settings['enable_timestamps']) {
$html_string .= "<input type='checkbox' value='timestamp' name='timestamp'"
. "id='timestamp'><span class=\"label timestamp\">timestamp</span>";
//. "id='timestamp'><label for='timestamp'>timestamp</label>";
}
$html_string .= "<input type='submit' value='Post this'><br></td>";
@ -454,10 +455,12 @@ function show_subs_count($db, $css, $settings)
}
// Show the existing subs to a user, without the count
function show_subs_no_count($db, $css)
function show_subs_no_count($db, $css, $settings)
{
$title = $settings['hover_title_overboard'];
$html_string = "<h1><a href=/s/overboard/$css>overboard</a>";
$html_string = "<h1><a href=/s/overboard/$css"
. " title=\"$title\">overboard</a>";
$statement = $db->prepare("SELECT DISTINCT sub
FROM threads
@ -469,7 +472,9 @@ function show_subs_no_count($db, $css)
while ($row = $result->fetchArray(SQLITE3_NUM)) {
$sub = "{$row[0]}";
if ( ($sub != '') ) {
$html_string .= " | <a href=/s/$sub/$css>$sub</a>";
$title = get_first_post_text($db, $sub, $settings);
$html_string .= " | <a href=/s/$sub/$css title=\"$title\">$sub</a>";
// $html_string .= " | <a href=/s/$sub/$css>$sub</a>";
}
}

View File

@ -554,7 +554,7 @@ switch($mode) {
}
show_landing_page($css);
show_subs_no_count($db, $css);
show_subs_no_count($db, $css, $settings);
lay_trap($settings);
print_footer_landing($db, $settings);
quit($db, "");