diff --git a/acp/portal_module.php b/acp/portal_module.php index b1f46d5b..6564a924 100644 --- a/acp/portal_module.php +++ b/acp/portal_module.php @@ -692,6 +692,7 @@ class portal_module 'ICON_MOVE_LEFT_DISABLED' => '' . $this->user->lang['MOVE_LEFT'] . '', 'ICON_MOVE_RIGHT' => '' . $this->user->lang['MOVE_RIGHT'] . '', 'ICON_MOVE_RIGHT_DISABLED' => '' . $this->user->lang['MOVE_RIGHT'] . '', + 'B3P_U_ACTION' => $this->modules_manager->get_module_link('modules', $module_id), )); } diff --git a/adm/style/portal/acp_portal_modules.html b/adm/style/portal/acp_portal_modules.html index d0278ae7..ec92b97f 100644 --- a/adm/style/portal/acp_portal_modules.html +++ b/adm/style/portal/acp_portal_modules.html @@ -45,7 +45,7 @@

{L_ACP_PORTAL_MODULES}

{L_ACP_PORTAL_MODULES_EXP}

-
+
{L_ACP_PORTAL_MODULES} diff --git a/controller/helper.php b/controller/helper.php index ce7d892f..ea7a1e33 100644 --- a/controller/helper.php +++ b/controller/helper.php @@ -226,7 +226,7 @@ class helper if (is_array($template_module)) { $this->template->assign_block_vars('modules_' . $this->portal_columns->number_to_string($row['module_column']), array( - 'TEMPLATE_FILE' => 'portal/modules/' . $template_module['template'], + 'TEMPLATE_FILE' => $this->parse_template_file($template_module['template']), 'IMAGE_SRC' => $this->path_helper->get_web_root_path() . ltrim($this->root_path . 'styles/' . $this->user->style['style_path'] . '/theme/images/portal/' . $template_module['image_src'], './'), 'TITLE' => $template_module['title'], 'CODE' => $template_module['code'], @@ -238,7 +238,7 @@ class helper else { $this->template->assign_block_vars('modules_' . $this->portal_columns->number_to_string($row['module_column']), array( - 'TEMPLATE_FILE' => 'portal/modules/' . $template_module, + 'TEMPLATE_FILE' => $this->parse_template_file($template_module), 'IMAGE_SRC' => $this->path_helper->get_web_root_path() . ltrim($this->root_path . 'styles/' . $this->user->style['style_path'] . '/theme/images/portal/' . $row['module_image_src'], './'), 'IMAGE_WIDTH' => $row['module_image_width'], 'IMAGE_HEIGHT' => $row['module_image_height'], @@ -264,4 +264,21 @@ class helper // Obtain portal config obtain_portal_config(); } + + /** + * Parse template file by prefixing default modules with the portal path + * + * @param string $template_file HTML template + * + * @return string Parsed template file + */ + protected function parse_template_file($template_file) + { + if (strpos($template_file, '@') === false) + { + $template_file = 'portal/modules/' . $template_file; + } + + return $template_file; + } }