From 2d7eeae5152ce166497a9f394c57ea6e21dc6fcf Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Tue, 28 Feb 2023 20:52:35 +0100 Subject: [PATCH] Add ext.php for enable check and bp icon --- ext.php | 63 +++++++++++++++++++++++++++ styles/prosilver/theme/images/bp.png | Bin 0 -> 680 bytes 2 files changed, 63 insertions(+) create mode 100644 ext.php create mode 100644 styles/prosilver/theme/images/bp.png diff --git a/ext.php b/ext.php new file mode 100644 index 00000000..bd514c64 --- /dev/null +++ b/ext.php @@ -0,0 +1,63 @@ +container->get('user'); + $lang->add_lang_ext('board3/portal', 'b3p_enable_error'); + } + else + { + $lang = $this->container->get('language'); + $lang->add_lang('b3p_enable_error', 'board3/portal'); + } + $error_message = [$lang->lang('ERROR_B3P_EXTENSION_NOT_ENABLEABLE', $lang->lang('BOARD3_PORTAL'))]; + + if ((phpbb_version_compare(PHPBB_VERSION, $phpbb_min_ver, '<') || phpbb_version_compare(PHPBB_VERSION, $phpbb_below_ver, '>='))) + { + $error_message[] = $lang->lang('ERROR_B3P_MSG_PHPBB_WRONG_VERSION', $phpbb_min_ver, $phpbb_below_ver); + } + + if ((phpbb_version_compare(PHP_VERSION, $php_min_ver, '<') || phpbb_version_compare(PHP_VERSION, $php_below_ver, '>='))) + { + $error_message[] = $lang->lang('ERROR_B3P_MSG_PHP_WRONG_VERSION', $php_min_ver, $php_below_ver); + } + + if (phpbb_version_compare(PHPBB_VERSION, '3.3.0-dev', '<') && count($error_message) > 1) + { + $error_message = implode('
', $error_message); + trigger_error($error_message . $this->get_adm_back_link(), E_USER_WARNING); + } + + return (count($error_message) > 1) ? $error_message : true; + } + + private function get_adm_back_link() + { + return adm_back_link(append_sid('index.' . $this->container->getParameter('core.php_ext'), 'i=acp_extensions&mode=main')); + } +} diff --git a/styles/prosilver/theme/images/bp.png b/styles/prosilver/theme/images/bp.png new file mode 100644 index 0000000000000000000000000000000000000000..e1f948ad95a9a7bd882d213563efe1e8f986e4d3 GIT binary patch literal 680 zcmV;Z0$2TsP)blR0k_Q51#0`{vDfyvBB%7=j!UmJkUcL<1EP1szaR z!aty+prS@dREUZn0SyQWQcyrDilC5Hi6bk!<9LE6p5;A?gr!A@BOTr5>YS^ibKxH$ z_SyY1t4mqR&YnD;I{aG!jd7py;KeP%?ykMv`%W6Sv1vdW2PAPo9Czsl9S*u3b~oF! z7TWYWd${EldGb2YRBJGHah0j*4lm!Hqu>ovDI9XOQK6g_vZa(_C1uoyLP^Nv0PV1~ z@h*Dw>bXW|B4C;3QXbv$I7|{YQ_aWLHkaz7lrtF$C4nkvW6;Wyt0w8h^&75FU7=MB z>>&FCjQJjCGFir@La9B-+WZbtVDK!sBKR4hSPS