From 7ca484972f9acbddb3f97e441c3ab49257754d81 Mon Sep 17 00:00:00 2001 From: Shish Date: Mon, 2 Dec 2019 00:43:03 +0000 Subject: [PATCH] remove Tag Categories page, because it is bad --- ext/tag_list/main.php | 40 +--------------------------------------- 1 file changed, 1 insertion(+), 39 deletions(-) diff --git a/ext/tag_list/main.php b/ext/tag_list/main.php index f1facfe8..67e91c61 100644 --- a/ext/tag_list/main.php +++ b/ext/tag_list/main.php @@ -43,10 +43,6 @@ class TagList extends Extension $this->theme->set_heading("Tag List by Popularity"); $this->theme->set_tag_list($this->build_tag_popularity()); break; - case 'categories': - $this->theme->set_heading("Popular Categories"); - $this->theme->set_tag_list($this->build_tag_list()); - break; } $this->theme->display_page($page); } elseif ($event->page_matches("api/internal/tag_list/complete")) { @@ -106,7 +102,6 @@ class TagList extends Extension $event->add_nav_link("tags_map", new Link('tags/map'), "Map"); $event->add_nav_link("tags_alphabetic", new Link('tags/alphabetic'), "Alphabetic"); $event->add_nav_link("tags_popularity", new Link('tags/popularity'), "Popularity"); - $event->add_nav_link("tags_categories", new Link('tags/categories'), "Categories"); } } @@ -264,9 +259,8 @@ class TagList extends Extension $h_map = "Map"; $h_alphabetic = "Alphabetic"; $h_popularity = "Popularity"; - $h_cats = "Categories"; $h_all = "Show All"; - return "$h_index
 
$h_map
$h_alphabetic
$h_popularity
$h_cats
 
$h_all"; + return "$h_index
 
$h_map
$h_alphabetic
$h_popularity
 
$h_all"; } private function build_tag_map(): string @@ -424,38 +418,6 @@ class TagList extends Extension return $html; } - private function build_tag_list(): string - { - global $database; - - //$tags_min = $this->get_tags_min(); - $tag_data = $database->get_all("SELECT tag,count FROM tags ORDER BY count DESC, tag ASC LIMIT 9"); - - $html = ""; - $n = 0; - foreach ($tag_data as $row) { - if ($n%3==0) { - $html .= ""; - } - $h_tag = html_escape($row['tag']); - $link = $this->tag_link($row['tag']); - $image = Image::by_random([$row['tag']], 100); - if (is_null($image)) { - continue; - } // one of the popular tags has no images - $thumb = $image->get_thumb_link(); - $tsize = get_thumbnail_size($image->width, $image->height); - $html .= "\n"; - if ($n%3==2) { - $html .= ""; - } - $n++; - } - $html .= "

$h_tag
"; - - return $html; - } - private function add_related_block(Page $page, Image $image): void { global $database, $config;