diff --git a/acp/acp_mchat_info.php b/acp/acp_mchat_info.php index 0d05d94..dfd34b3 100644 --- a/acp/acp_mchat_info.php +++ b/acp/acp_mchat_info.php @@ -15,21 +15,21 @@ class acp_mchat_info { function module() { - return array( + return [ 'filename' => '\dmzx\mchat\acp\acp_mchat_module', 'title' => 'ACP_CAT_MCHAT', - 'modes' => array( - 'globalsettings' => array( + 'modes' => [ + 'globalsettings' => [ 'title' => 'ACP_MCHAT_GLOBALSETTINGS', 'auth' => 'ext_dmzx/mchat && acl_a_mchat', - 'cat' => array('ACP_CAT_MCHAT'), - ), - 'globalusersettings' => array( + 'cat' => ['ACP_CAT_MCHAT'], + ], + 'globalusersettings' => [ 'title' => 'ACP_MCHAT_GLOBALUSERSETTINGS', 'auth' => 'ext_dmzx/mchat && acl_a_mchat', - 'cat' => array('ACP_CAT_MCHAT'), - ), - ), - ); + 'cat' => ['ACP_CAT_MCHAT'], + ], + ], + ]; } } diff --git a/acp/acp_mchat_module.php b/acp/acp_mchat_module.php index 94d493f..f7ced7e 100644 --- a/acp/acp_mchat_module.php +++ b/acp/acp_mchat_module.php @@ -19,10 +19,11 @@ class acp_mchat_module public function main($id, $mode) { - global $phpbb_container, $user; + global $phpbb_container; // Add the ACP lang file - $user->add_lang_ext('dmzx/mchat', array('mchat_acp', 'mchat_ucp')); + $language = $phpbb_container->get('language'); + $language->add_lang(['mchat_acp', 'mchat_ucp'], 'dmzx/mchat'); // Set template $this->tpl_name = 'acp_mchat_' . strtolower($mode); diff --git a/adm/style/acp_mchat_globalsettings.html b/adm/style/acp_mchat_globalsettings.html index 882e15d..5655ec1 100644 --- a/adm/style/acp_mchat_globalsettings.html +++ b/adm/style/acp_mchat_globalsettings.html @@ -1,5 +1,11 @@ {% INCLUDE 'overall_header.html' %} + +
{{ MCHAT_USERS_TOTAL }} {{ MCHAT_ONLINE_EXPLAIN }}
{{ MCHAT_USERS_LIST }}
{% endif %}
diff --git a/styles/prosilver/template/event/overall_header_navigation_append.html b/styles/prosilver/template/event/overall_header_navigation_append.html
index c2a66ec..cb93c19 100644
--- a/styles/prosilver/template/event/overall_header_navigation_append.html
+++ b/styles/prosilver/template/event/overall_header_navigation_append.html
@@ -1,3 +1,3 @@
-{% if MCHAT_CUSTOM_PAGE and MCHAT_NAVBAR_LINK %}
+{% if U_MCHAT_CUSTOM_PAGE or MCHAT_PAGE %}
{% INCLUDE '@dmzx_mchat/mchat_navlink.html' %}
{% endif %}
diff --git a/styles/prosilver/template/event/overall_header_stylesheets_after.html b/styles/prosilver/template/event/overall_header_stylesheets_after.html
index 578df19..741739d 100644
--- a/styles/prosilver/template/event/overall_header_stylesheets_after.html
+++ b/styles/prosilver/template/event/overall_header_stylesheets_after.html
@@ -1,7 +1,14 @@
-{% if (MCHAT_CUSTOM_HEIGHT or MCHAT_INDEX_HEIGHT) and MCHAT_PAGE != 'archive' %}
-
+{% if MCHAT_PAGE and MCHAT_PAGE != 'archive' %}
+
{% endif %}
diff --git a/styles/prosilver/template/mchat_body.html b/styles/prosilver/template/mchat_body.html
index 3c896c1..3c2e1e4 100644
--- a/styles/prosilver/template/mchat_body.html
+++ b/styles/prosilver/template/mchat_body.html
@@ -7,7 +7,7 @@
{% EVENT dmzx_mchat_header_before %}
{% if MCHAT_PAGE == 'custom' %}
-