From e37d87260be57c1489ddb96e5aab5989058c64b5 Mon Sep 17 00:00:00 2001 From: Shish Date: Mon, 30 Jan 2023 21:23:50 +0000 Subject: [PATCH] [r34] hide some headings --- themes/rule34v2/page.class.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/themes/rule34v2/page.class.php b/themes/rule34v2/page.class.php index 7dbd6053..fa298306 100644 --- a/themes/rule34v2/page.class.php +++ b/themes/rule34v2/page.class.php @@ -20,6 +20,13 @@ class Page extends BasePage $head_block_html = ""; $sub_block_html = ""; + $main_headings = 0; + foreach ($this->blocks as $block) { + if ($block->section == "main" && !is_null($block->header) && $block->header != "Comments") { + $main_headings++; + } + } + foreach ($this->blocks as $block) { switch ($block->section) { case "left": @@ -32,6 +39,9 @@ class Page extends BasePage $head_block_html .= "".$block->get_html(false).""; break; case "main": + if ($main_headings == 1) { + $block->header = null; + } $main_block_html .= $block->get_html(false); break; case "subheading":