Image to Post - danbooru theme

This commit is contained in:
Matthew Barbour 2020-10-26 10:27:04 -05:00
parent f869eaefcd
commit c18c7347bf
2 changed files with 4 additions and 4 deletions

View file

@ -26,14 +26,14 @@ class CustomIndexTheme extends IndexTheme
$page->add_block(new Block("Search", $nav, "left", 0)); $page->add_block(new Block("Search", $nav, "left", 0));
if (count($images) > 0) { if (count($images) > 0) {
if ($query) { if ($query) {
$page->add_block(new Block("Images", $this->build_table($images, "search=$query"), "main", 10)); $page->add_block(new Block("Posts", $this->build_table($images, "search=$query"), "main", 10));
$this->display_paginator($page, "post/list/$query", null, $this->page_number, $this->total_pages); $this->display_paginator($page, "post/list/$query", null, $this->page_number, $this->total_pages);
} else { } else {
$page->add_block(new Block("Images", $this->build_table($images, null), "main", 10)); $page->add_block(new Block("Posts", $this->build_table($images, null), "main", 10));
$this->display_paginator($page, "post/list", null, $this->page_number, $this->total_pages); $this->display_paginator($page, "post/list", null, $this->page_number, $this->total_pages);
} }
} else { } else {
$page->add_block(new Block("No Images Found", "No images were found to match the search criteria")); $page->add_block(new Block("No Posts Found", "No images were found to match the search criteria"));
} }
} }

View file

@ -74,7 +74,7 @@ class Page extends BasePage
$sub_block_html .= $block->body; // $this->block_to_html($block, true); $sub_block_html .= $block->body; // $this->block_to_html($block, true);
break; break;
case "main": case "main":
if ($block->header == "Images") { if ($block->header == "Posts") {
$block->header = " "; $block->header = " ";
} }
$main_block_html .= $block->get_html(false); $main_block_html .= $block->get_html(false);