set_default_bool(SpeedHaxConfig::NO_AUTO_DB_UPGRADE, false); $config->set_default_bool(SpeedHaxConfig::CACHE_EVENT_LISTENERS, false); $config->set_default_bool(SpeedHaxConfig::CACHE_TAG_LISTS, false); $config->set_default_bool(SpeedHaxConfig::PURGE_COOKIE, false); $config->set_default_bool(SpeedHaxConfig::RECENT_COMMENTS, false); $config->set_default_int(SpeedHaxConfig::BIG_SEARCH, 0); $config->set_default_bool(SpeedHaxConfig::LIMIT_COMPLEX, false); $config->set_default_bool(SpeedHaxConfig::FAST_PAGE_LIMIT, false); $config->set_default_bool(SpeedHaxConfig::CACHE_FIRST_FEW, false); $config->set_default_bool(SpeedHaxConfig::RSS_LIMIT, false); } public function onSetupBuilding(SetupBuildingEvent $event): void { $sb = $event->panel->create_new_block("Speed Hax"); $sb->start_table(); $sb->add_bool_option(SpeedHaxConfig::NO_AUTO_DB_UPGRADE, "Don't auto-upgrade database: ", false); $sb->add_bool_option(SpeedHaxConfig::CACHE_EVENT_LISTENERS, "
Cache event listeners: ", false); $sb->add_bool_option(SpeedHaxConfig::CACHE_TAG_LISTS, "
Cache tag lists: ", false); $sb->add_bool_option(SpeedHaxConfig::PURGE_COOKIE, "
Purge cookie on logout: ", false); $sb->add_bool_option(SpeedHaxConfig::RECENT_COMMENTS, "
List only recent comments: ", false); $sb->add_int_option(SpeedHaxConfig::BIG_SEARCH, "
Anonymous search tag limit: ", false); $sb->add_bool_option(SpeedHaxConfig::LIMIT_COMPLEX, "
Limit complex searches: ", false); $sb->add_bool_option(SpeedHaxConfig::FAST_PAGE_LIMIT, "
Fast page limit: ", false); $sb->add_bool_option(SpeedHaxConfig::CACHE_FIRST_FEW, "
Extra caching on first pages: ", false); $sb->add_bool_option(SpeedHaxConfig::RSS_LIMIT, "
Limit images RSS: ", false); $sb->end_table(); } }