diff --git a/index.php b/index.php index ef16ae1e..42b9d6a6 100644 --- a/index.php +++ b/index.php @@ -334,7 +334,7 @@ if($load_it) $success = false; $tmp_content = getCustomPage($page, $success); - if($success) { + if($success && $hooks->trigger(HOOK_BEFORE_PAGE_CUSTOM)) { $content .= $tmp_content; if(hasFlag(FLAG_CONTENT_PAGES) || superAdmin()) { $pageInfo = getCustomPageInfo($page); @@ -342,6 +342,8 @@ if($load_it) 'page' => array('id' => $pageInfo !== null ? $pageInfo['id'] : 0, 'hidden' => $pageInfo !== null ? $pageInfo['hidden'] : '0') )) . $content; } + + $hooks->trigger(HOOK_AFTER_PAGE_CUSTOM); } else { $file = TEMPLATES . "$template_name/pages/$page.php"; if(!@file_exists($file) || preg_match('/[^A-z0-9_\-]/', $page)) { diff --git a/system/hooks.php b/system/hooks.php index ce8fa740..e054f3aa 100644 --- a/system/hooks.php +++ b/system/hooks.php @@ -13,7 +13,9 @@ $i = 0; define('HOOK_INIT', ++$i); define('HOOK_STARTUP', ++$i); define('HOOK_BEFORE_PAGE', ++$i); +define('HOOK_BEFORE_PAGE_CUSTOM', ++$i); define('HOOK_AFTER_PAGE', ++$i); +define('HOOK_AFTER_PAGE_CUSTOM', ++$i); define('HOOK_FINISH', ++$i); define('HOOK_TIBIACOM_ARTICLE', ++$i); define('HOOK_TIBIACOM_BORDER_3', ++$i);