[ext/reverse_search_links] remove custom position options, for now

This commit is contained in:
Shish 2023-09-06 12:14:27 +01:00 committed by Shish
parent 03e24a4c92
commit 38af9eb0c4
2 changed files with 1 additions and 21 deletions

View file

@ -6,8 +6,6 @@ namespace Shimmie2;
abstract class ReverseSearchLinksConfig
{
public const PRIORITY = "ext_reverse_search_links_priority";
public const POSITION = "ext_reverse_search_links_position";
public const ENABLED_SERVICES = "ext_reverse_search_links_enabled_services";
}
@ -55,27 +53,12 @@ class ReverseSearchLinks extends Extension
return $output;
}
/**
* Generate the settings block
*/
public function onSetupBuilding(SetupBuildingEvent $event)
{
$sb = $event->panel->create_new_block("Reverse Search Links");
$sb->start_table();
$sb->add_int_option("ext_reverse_search_links_priority", "Priority:");
$sb->add_choice_option("ext_reverse_search_links_position", ["Main page" => "main", "In navigation bar" => "left"], "<br>Position: ");
$sb->add_multichoice_option("ext_reverse_search_links_enabled_services", $this->get_options(), "Enabled Services", true);
$sb->end_table();
}
/**
* Set default config values
*/
public function onInitExt(InitExtEvent $event)
{
global $config;
$config->set_default_int(ReverseSearchLinksConfig::PRIORITY, 20);
$config->set_default_string(ReverseSearchLinksConfig::POSITION, "main");
$config->set_default_array(
ReverseSearchLinksConfig::ENABLED_SERVICES,
['SauceNAO', 'TinEye', 'trace.moe', 'ascii2d', 'Yandex']

View file

@ -29,9 +29,6 @@ class ReverseSearchLinksTheme extends Themelet
}
}
$position = $config->get_string(ReverseSearchLinksConfig::POSITION) ?? "main";
$priority = $config->get_int(ReverseSearchLinksConfig::PRIORITY) ?? 20;
$page->add_block(new Block("Reverse Image Search", $html, $position, $priority));
$page->add_block(new Block("Reverse Image Search", $html, "main", 20));
}
}