diff --git a/ext.php b/ext.php new file mode 100644 index 0000000..45ff500 --- /dev/null +++ b/ext.php @@ -0,0 +1,63 @@ +check_phpbb_version() && $this->check_php_version(); + + if (!$enableable) + { + $language = $this->container->get('language'); + $language->add_lang('install_holidayflare', 'phpbbmodders/holidayflare'); + + return $language->lang('HOLIDAYFLARE_NOT_ENABLEABLE'); + } + + return $enableable; + } + + /** + * Require phpBB 3.3.19 + * + * @return bool + */ + public function check_phpbb_version() + { + return phpbb_version_compare(PHPBB_VERSION, '3.3.19', '>='); + } + + /** + * Require PHP 7.4 + * + * @return bool + */ + public function check_php_version() + { + return PHP_VERSION_ID >= 70400; + } +} diff --git a/language/en/install_holidayflare.php b/language/en/install_holidayflare.php new file mode 100644 index 0000000..8417ccb --- /dev/null +++ b/language/en/install_holidayflare.php @@ -0,0 +1,45 @@ + 'Holiday Flare could not be enabled. The minimum requirements of phpBB 3.3.19 and/or PHP 7.4.0 were not satisfied.', +]);