get_string('theme', 'default'); $header_html = $this->get_all_html_headers(); $data_href = get_base_href(); return <<{$this->title} $header_html EOD; } public function body_html(): string { global $config, $user; $left_block_html = ""; $right_block_html = ""; $main_block_html = ""; $head_block_html = ""; $sub_block_html = ""; $main_headings = 0; foreach ($this->blocks as $block) { if ($block->section == "main" && !empty($block->header) && $block->header != "Comments") { $main_headings++; } } foreach ($this->blocks as $block) { switch ($block->section) { case "left": $left_block_html .= $block->get_html(true); break; case "right": $right_block_html .= $block->get_html(true); break; case "head": $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": $sub_block_html .= $block->body; // $block->get_html(true); break; default: print "

error: {$block->header} using an unknown section ({$block->section})"; break; } } $query = !empty(CustomIndexTheme::$_search_query) ? html_escape(Tag::implode(CustomIndexTheme::$_search_query)) : ""; assert(!is_null($query)); # used in header.inc, do not remove :P $flash_html = $this->flash ? "".nl2br(html_escape(implode("\n", $this->flash)))."" : ""; $generated = autodate(date('c')); $footer_html = $this->footer_html(); $header_inc = file_get_contents("themes/rule34v2/header.inc"); return << $header_inc $head_block_html $sub_block_html

$flash_html $main_block_html
EOD; } }