From ab834813b00d6929733050ad6b8dde6f1541a968 Mon Sep 17 00:00:00 2001 From: fuzzykitten Date: Sun, 15 Jun 2025 03:59:01 -0400 Subject: [PATCH] added config option (show menu), fixed bug in show_post_history --- etc/config.php | 4 +++- opt/show.php | 10 ++++++++-- srv/index.php | 2 +- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/etc/config.php b/etc/config.php index 23737ff..fb60e68 100644 --- a/etc/config.php +++ b/etc/config.php @@ -34,6 +34,7 @@ $settings = array( "enable_sub_main" => TRUE, // enable users to create subs by posting in main "enable_sub_navigation" => TRUE, // enable users to create subs by posting in main "enable_b32_bot" => TRUE, // enable a bot looking for b32 links and translating them to hostnames + "enable_menu" => TRUE, // show a menu on overboard and subs "enable_logging" => TRUE, // set to FALSE to disable all logs of endboard. This will provide stricter privacy, however, it will also // disable the features: max_post_*, bot_block, portal, max_requests_* and fail2ban. "enable_sage" => TRUE, // show the option to not bump a thread @@ -131,7 +132,8 @@ function show_landing_page($css){ echo "|Flowers|" . "Flowers with mono font|" . "Trip|Flicker" - . "|Unstyled"; + . "|Unstyled" + . "|Simple"; echo "

Mobile site."; echo "


This board uses no javascript, cookies, webbugs or" . " any other invasive stuff.

"; diff --git a/opt/show.php b/opt/show.php index 29c184b..ec89acc 100644 --- a/opt/show.php +++ b/opt/show.php @@ -360,7 +360,7 @@ function show_post_form($db, $msg, $sub, $settings, $org_id, $css, $quote, $ip) } // Shows all versions of a specific post -function show_post_history($db, $sub, $post_id, $settings) +function show_post_history($db, $sub, $post_id, $settings, $css) { $html_string = '
'; @@ -392,7 +392,8 @@ function show_post_history($db, $sub, $post_id, $settings) $post_id = "{$row[0]}"; $org_id = "{$row[1]}"; $post_text = "{$row[3]}"; - $post_text = break_text(bbcode_to_html($post_text, $settings, $sub)); + $post_text = break_text(bbcode_to_html($post_text, $settings, + $sub, $css)); $id_text = make_id_text($post_id); $timestamp = "{$row[4]}"; $name = "{$row[5]}"; @@ -686,6 +687,11 @@ function show_subs_count($db, $css, $settings) function show_subs_navigation($db, $css, $settings) { + + if ( $settings['enable_menu'] ) { + return; + } + $out = ''; if ( (!empty($settings['no_overboard'])) ) { diff --git a/srv/index.php b/srv/index.php index 7c798bf..41492d0 100644 --- a/srv/index.php +++ b/srv/index.php @@ -440,7 +440,7 @@ switch($mode) { if (empty($_POST['edit_text'])) { print_top_header($db, "Edit post $sub/$post_id"); show_edit_form($db, $sub, $post_id, $visitor_ip, $css, $settings); - show_post_history($db, $sub, $post_id, $settings); + show_post_history($db, $sub, $post_id, $settings, $css); } else { make_edit($db, $sub, $_POST['post_id'], $visitor_ip, $settings); answer_redirect($sub, $css, '', $settings);