host = $host; $host->add_hook($host::HOOK_ARTICLE_FILTER, $this); $host->add_hook($host::HOOK_PREFS_TAB, $this); require_once __DIR__ . "/filter_base.php"; $filters = glob(__DIR__ . "/filters/*.php"); foreach ($filters as $file) { require_once $file; $filter_name = preg_replace("/\..*$/", "", basename($file)); $filter = new $filter_name(); if (is_subclass_of($filter, "Af_ComicFilter")) { array_push($this->filters, $filter); } } } function hook_prefs_tab($args) { if ($args != "prefPrefs") return; print "
" . __("The following comics are currently supported:") . "
"; $comics = array(); foreach ($this->filters as $f) { foreach ($f->supported() as $comic) { array_push($comics, $comic); } } asort($comics); print "