From dbde96b7ac61e2be5b760473167577f7045e9758 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Sun, 12 Sep 2010 18:46:17 +0000 Subject: [PATCH] Moved acp template to adm/style/portal/ --- root/adm/style/{ => portal}/acp_portal_config.html | 0 root/adm/style/{ => portal}/acp_portal_links.html | 0 .../adm/style/{ => portal}/acp_portal_modules.html | 0 root/includes/acp/acp_portal.php | 14 ++++++++++---- root/portal/modules/portal_main_menu.php | 5 +++++ 5 files changed, 15 insertions(+), 4 deletions(-) rename root/adm/style/{ => portal}/acp_portal_config.html (100%) rename root/adm/style/{ => portal}/acp_portal_links.html (100%) rename root/adm/style/{ => portal}/acp_portal_modules.html (100%) diff --git a/root/adm/style/acp_portal_config.html b/root/adm/style/portal/acp_portal_config.html similarity index 100% rename from root/adm/style/acp_portal_config.html rename to root/adm/style/portal/acp_portal_config.html diff --git a/root/adm/style/acp_portal_links.html b/root/adm/style/portal/acp_portal_links.html similarity index 100% rename from root/adm/style/acp_portal_links.html rename to root/adm/style/portal/acp_portal_links.html diff --git a/root/adm/style/acp_portal_modules.html b/root/adm/style/portal/acp_portal_modules.html similarity index 100% rename from root/adm/style/acp_portal_modules.html rename to root/adm/style/portal/acp_portal_modules.html diff --git a/root/includes/acp/acp_portal.php b/root/includes/acp/acp_portal.php index 9336674e..f0c3afd7 100644 --- a/root/includes/acp/acp_portal.php +++ b/root/includes/acp/acp_portal.php @@ -39,8 +39,6 @@ class acp_portal $form_key = 'acp_portal'; add_form_key($form_key); - - // @todo: add a way to show custom HTML files, instead of the standard board3 portal one, on the settings page of the modules /** * Validation types are: @@ -172,7 +170,15 @@ class acp_portal trigger_error($user->lang['CONFIG_UPDATED'] . adm_back_link(($module_id) ? append_sid("{$phpbb_root_path}/adm/index.$phpEx", 'i=portal&mode=modules') : $this->u_action)); } - $this->tpl_name = 'acp_portal_config'; + // show custom HTML files on the settings page of the modules instead of the standard board3 portal one, if chosen by module + if(!isset($c_class->custom_acp_tpl)) + { + $this->tpl_name = 'portal/acp_portal_config'; + } + else + { + $this->tpl_name = 'portal/' . $c_class->custom_acp_tpl; + } $this->page_title = $display_vars['title']; $template->assign_vars(array( @@ -470,7 +476,7 @@ class acp_portal $db->sql_freeresult($result); } - $this->tpl_name = 'acp_portal_modules'; + $this->tpl_name = 'portal/acp_portal_modules'; $this->page_title = 'ACP_PORTAL_MODULES'; break; default: diff --git a/root/portal/modules/portal_main_menu.php b/root/portal/modules/portal_main_menu.php index 6b9be633..bd6c7f57 100644 --- a/root/portal/modules/portal_main_menu.php +++ b/root/portal/modules/portal_main_menu.php @@ -45,6 +45,11 @@ class portal_main_menu_module * file must be in "language/{$user->lang}/mods/portal/" */ var $language = 'portal_main_menu_module'; + + /** + * custom acp template + * file must be in "adm/style/portal/" + */ function get_template_side($module_id) {