diff --git a/ext/rule34/info.php b/ext/rule34/info.php
deleted file mode 100644
index e2c9a4f6..00000000
--- a/ext/rule34/info.php
+++ /dev/null
@@ -1,21 +0,0 @@
-notify("shm_image_bans", $event->image->hash);
- }
-
- public function onImageInfoSet(ImageInfoSetEvent $event): void
- {
- global $cache;
- $cache->delete("thumb-block:{$event->image->id}");
- }
-
- public function onAdminBuilding(AdminBuildingEvent $event): void
- {
- global $page;
- $html = make_form(make_link("admin/cache_purge"), "POST");
- $html .= "";
- $html .= "
";
- $html .= "\n";
- $page->add_block(new Block("Cache Purger", $html));
- }
-
- public function onCliGen(CliGenEvent $event): void
- {
- $event->app->register('wipe-thumb-cache')
- ->addArgument('tags', InputArgument::REQUIRED)
- ->setDescription('Delete cached thumbnails for images matching the given tags')
- ->setCode(function (InputInterface $input, OutputInterface $output): int {
- global $cache;
- $tags = Tag::explode($input->getArgument('tags'));
- foreach (Search::find_images_iterable(0, null, $tags) as $image) {
- $output->writeln((string)$image->id);
- $cache->delete("thumb-block:{$image->id}");
- }
- return Command::SUCCESS;
- });
- }
-
- public function onSourceSet(SourceSetEvent $event): void
- {
- // Maybe check for 404?
- if (empty($event->source)) {
- return;
- }
- if (!preg_match("/^(https?:\/\/)?[a-zA-Z0-9\.\-]+(\/.*)?$/", $event->source)) {
- throw new SCoreException("Invalid source URL");
- }
- }
-
- public function onRobotsBuilding(RobotsBuildingEvent $event): void
- {
- // robots should only check the canonical site, not mirrors
- if ($_SERVER['HTTP_HOST'] != "rule34.paheal.net") {
- $event->add_disallow("");
- }
- }
-
- public function onPageRequest(PageRequestEvent $event): void
- {
- global $database, $page, $user;
-
- # Database might not be connected at this point...
- #$database->set_timeout(null); // deleting users can take a while
-
- $page->add_html_header("");
- $page->add_html_header("");
-
- if ($event->page_matches("tnc_agreed")) {
- setcookie("ui-tnc-agreed", "true", 0, "/");
- $page->set_mode(PageMode::REDIRECT);
- $page->set_redirect(referer_or("/"));
- }
-
- if ($event->page_matches("admin/cache_purge")) {
- if (!$user->can(Permissions::MANAGE_ADMINTOOLS)) {
- $this->theme->display_permission_denied();
- } else {
- if ($user->check_auth_token()) {
- $all = $_POST["hash"];
- $matches = [];
- if (preg_match_all("/([a-fA-F0-9]{32})/", $all, $matches)) {
- $matches = $matches[0];
- foreach ($matches as $hash) {
- $page->flash("Cleaning {$hash}");
- if (strlen($hash) != 32) {
- continue;
- }
- log_info("admin", "Cleaning {$hash}");
- @unlink(warehouse_path(Image::IMAGE_DIR, $hash));
- @unlink(warehouse_path(Image::THUMBNAIL_DIR, $hash));
- $database->notify("shm_image_bans", $hash);
- }
- }
- }
-
- $page->set_mode(PageMode::REDIRECT);
- $page->set_redirect(make_link("admin"));
- }
- }
- }
-}
diff --git a/ext/rule34/script.js b/ext/rule34/script.js
deleted file mode 100644
index 6c41f30e..00000000
--- a/ext/rule34/script.js
+++ /dev/null
@@ -1,39 +0,0 @@
-let tnc_div = document.createElement('div');
-tnc_div.innerHTML = `
-
-
-`;
-
-
-document.addEventListener('DOMContentLoaded', () => {
- if(shm_cookie_get("ui-tnc-agreed") !== "true" && window.location.href.indexOf("/wiki/") == -1) {
- document.body.classList.add('censored');
- document.body.appendChild(tnc_div);
- }
-});
-
-function tnc_agree() {
- shm_cookie_set("ui-tnc-agreed", "true");
- document.body.classList.remove('censored');
- tnc_div.remove();
-}
-
-function image_hash_ban(id) {
- var reason = prompt("WHY?", "DNP");
- if(reason) {
- $.post(
- "/image_hash_ban/add",
- {
- "image_id": id,
- "reason": reason,
- },
- function() {
- $("#thumb_" + id).parent().parent().hide();
- }
- );
- }
-}
diff --git a/ext/rule34/style.css b/ext/rule34/style.css
deleted file mode 100644
index 13aca22b..00000000
--- a/ext/rule34/style.css
+++ /dev/null
@@ -1,35 +0,0 @@
-BODY.censored #header,
-BODY.censored NAV,
-BODY.censored ARTICLE,
-BODY.censored FOOTER {
- filter: blur(10px);
-}
-.tnc_bg {
- position: fixed;
- top: 0;
- left: 0;
- right: 0;
- bottom: 0;
- background: #ACE4A3;
- opacity: 0.75;
- z-index: 999999999999999999999;
-}
-.tnc {
- position: fixed;
- top: 20%;
- left: 20%;
- right: 20%;
- text-align: center;
- font-size: 2rem;
- background: #ACE4A3;
- border: 1px solid #7EB977;
- z-index: 9999999999999999999999;
-}
-@media (max-width: 1024px) {
- .tnc {
- top: 5%;
- left: 5%;
- right: 5%;
- font-size: 3vw;
- }
-}
diff --git a/themes/rule34v2/.gitignore b/themes/rule34v2/.gitignore
deleted file mode 100644
index 13c95f72..00000000
--- a/themes/rule34v2/.gitignore
+++ /dev/null
@@ -1,8 +0,0 @@
-*.png
-*.jpg
-*.gif
-*.mp3
-*.html
-ad*
-ads*
-random*
diff --git a/themes/rule34v2/flags/china-flag.png b/themes/rule34v2/flags/china-flag.png
deleted file mode 100644
index b54e1c73..00000000
Binary files a/themes/rule34v2/flags/china-flag.png and /dev/null differ
diff --git a/themes/rule34v2/flags/dutch-flag.png b/themes/rule34v2/flags/dutch-flag.png
deleted file mode 100644
index 99d69fde..00000000
Binary files a/themes/rule34v2/flags/dutch-flag.png and /dev/null differ
diff --git a/themes/rule34v2/flags/english-flag.png b/themes/rule34v2/flags/english-flag.png
deleted file mode 100644
index c171928b..00000000
Binary files a/themes/rule34v2/flags/english-flag.png and /dev/null differ
diff --git a/themes/rule34v2/flags/finnish-flag.png b/themes/rule34v2/flags/finnish-flag.png
deleted file mode 100644
index eddfdba4..00000000
Binary files a/themes/rule34v2/flags/finnish-flag.png and /dev/null differ
diff --git a/themes/rule34v2/flags/german-flag.png b/themes/rule34v2/flags/german-flag.png
deleted file mode 100644
index 1b9d04f6..00000000
Binary files a/themes/rule34v2/flags/german-flag.png and /dev/null differ
diff --git a/themes/rule34v2/flags/italian-flag.png b/themes/rule34v2/flags/italian-flag.png
deleted file mode 100644
index c687ea2b..00000000
Binary files a/themes/rule34v2/flags/italian-flag.png and /dev/null differ
diff --git a/themes/rule34v2/flags/norway-flag.png b/themes/rule34v2/flags/norway-flag.png
deleted file mode 100644
index 0e9bb5a8..00000000
Binary files a/themes/rule34v2/flags/norway-flag.png and /dev/null differ
diff --git a/themes/rule34v2/flags/port-flag.png b/themes/rule34v2/flags/port-flag.png
deleted file mode 100644
index b883e280..00000000
Binary files a/themes/rule34v2/flags/port-flag.png and /dev/null differ
diff --git a/themes/rule34v2/flags/russian-flag.png b/themes/rule34v2/flags/russian-flag.png
deleted file mode 100644
index 95333f6f..00000000
Binary files a/themes/rule34v2/flags/russian-flag.png and /dev/null differ
diff --git a/themes/rule34v2/flags/spain-flag.png b/themes/rule34v2/flags/spain-flag.png
deleted file mode 100644
index 4c2921f0..00000000
Binary files a/themes/rule34v2/flags/spain-flag.png and /dev/null differ
diff --git a/themes/rule34v2/flags/swedish-flag.png b/themes/rule34v2/flags/swedish-flag.png
deleted file mode 100644
index b0e4a760..00000000
Binary files a/themes/rule34v2/flags/swedish-flag.png and /dev/null differ
diff --git a/themes/rule34v2/header.inc b/themes/rule34v2/header.inc
deleted file mode 100644
index 1c85fd24..00000000
--- a/themes/rule34v2/header.inc
+++ /dev/null
@@ -1,100 +0,0 @@
-
-
-
-
- |
-
-
-
-
-
-
-
-
-
-
- |
-
-
diff --git a/themes/rule34v2/index.theme.php b/themes/rule34v2/index.theme.php
deleted file mode 100644
index 02602f56..00000000
--- a/themes/rule34v2/index.theme.php
+++ /dev/null
@@ -1,50 +0,0 @@
-can("delete_image") ? "can-del" : "";
- $h_query = html_escape($query);
-
- $table = "";
- foreach ($images as $image) {
- $table .= $this->build_thumb_html($image);
- }
- $table .= "
";
- return $table;
- }
-
- // Override to add a custom error message
- public function display_page(Page $page, $images): void
- {
- $this->display_page_header($page, $images);
-
- $nav = $this->build_navigation($this->page_number, $this->total_pages, $this->search_terms);
- if (!empty($this->search_terms)) {
- static::$_search_query = $this->search_terms;
- }
- $page->add_block(new Block("Navigation", $nav, "left", 0));
-
- if (count($images) > 0) {
- $this->display_page_images($page, $images);
- } else {
- $this->display_error(
- 404,
- "No Posts Found",
- "No images were found to match the search criteria. Try looking up a character/series/artist by another name if they go by more than one. Remember to use underscores in place of spaces and not to use commas. If you came to this page by following a link, try using the search box directly instead. See the FAQ for more information."
- );
- }
- }
-}
diff --git a/themes/rule34v2/menuh.css b/themes/rule34v2/menuh.css
deleted file mode 100644
index 1fb96d80..00000000
--- a/themes/rule34v2/menuh.css
+++ /dev/null
@@ -1,121 +0,0 @@
-/* Begin CSS Drop Down Menu */
-
-a:link.menu { color:#FF0000; text-decoration: none; }
-
-a:visited.menu { color: #FF0000; text-decoration: none; }
-
-a:hover.menu { color: #FF0000; text-decoration: none; }
-
-a:active.menu { color: #FF0000; text-decoration: none; }
-
-#menuh-container
- {
- font-size: 1rem;
- float: left;
- top:0;
- left: 5%;
- width: 100%;
- margin: 0;
- }
-
-#menuh
- {
- font-size: small;
- font-family: arial, helvetica, sans-serif;
- width:100%;
- margin-top: 0;
- }
-
-#menuh a.sub_option
- {
- border: 1px solid #555;
- /*background-image:url(topban.jpg);*/
- }
-
-#menuh a
- {
- text-align: center;
- background: #ACE4A3;
- display:block;
- white-space:nowrap;
- margin: 0;
- padding: 0.2em;
- }
-
-#menuh a, #menuh a:visited /* menu at rest */
- {
- color: #000099;
- text-decoration:none;
- }
-
-#menuh a:hover /* menu at mouse-over */
- {
- color: #000000;
- }
-
-#menuh a.top_parent, #menuh a.top_parent:hover /* attaches down-arrow to all top-parents */
- {
- /*background-image: url(navdown_white.gif);*/
- background-position: right center;
- background-repeat: no-repeat;
- }
-
-#menuh a.parent, #menuh a.parent:hover /* attaches side-arrow to all parents */
- {
- /*background-image: url(nav_white.gif);*/
- background-position: right center;
- border: 1px solid #555;
- background-repeat: no-repeat;
- }
-
-#menuh ul
- {
- list-style:none;
- margin:0;
- padding:0;
- float:left;
- width:10em; /* width of all menu boxes */
- }
-
-#menuh li
- {
- position:relative;
- min-height: 1px; /* Sophie Dennis contribution for IE7 */
- vertical-align: bottom; /* Sophie Dennis contribution for IE7 */
- }
-
-#menuh ul ul
- {
- position:absolute;
- z-index:500;
- top:auto;
- display:none;
- padding: 1em;
- margin:-1em 0 0 -1em;
- }
-
-#menuh ul ul ul
- {
- top:0;
- left:100%;
- }
-
-div#menuh li:hover
- {
- cursor:pointer;
- z-index:100;
- }
-
-div#menuh li:hover ul ul,
-div#menuh li li:hover ul ul,
-div#menuh li li li:hover ul ul,
-div#menuh li li li li:hover ul ul
-{display:none;}
-
-div#menuh li:hover ul,
-div#menuh li li:hover ul,
-div#menuh li li li:hover ul,
-div#menuh li li li li:hover ul
-{display:block;}
-
-/* End CSS Drop Down Menu */
diff --git a/themes/rule34v2/page.class.php b/themes/rule34v2/page.class.php
deleted file mode 100644
index e11cd76c..00000000
--- a/themes/rule34v2/page.class.php
+++ /dev/null
@@ -1,136 +0,0 @@
-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)) : "";
- // @phpstan-ignore-next-line - yes this is deliberately asserting a constant
- 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_ex("themes/rule34v2/header.inc");
- assert($header_inc !== false);
- $header_inc = str_replace('$QUERY', $query, $header_inc);
- return <<