templates/de/html/guest/guest_top10_row_earner.tpl -text
templates/de/html/guest/guest_top10_row_login.tpl -text
templates/de/html/guest/guest_top10_row_refs.tpl -text
-templates/de/html/header.tpl -text
templates/de/html/impressum.tpl -text
templates/de/html/index.tpl -text
templates/de/html/index_forward.tpl -text
registerFilter('init', 'UPDATE_LOGIN_DATA');
registerFilter('init', 'ACTIVATE_EXCHANGE');
+ // Page headers - pre-filter (normally, you want to register here)
+ registerFilter('pre_page_header', 'LOAD_PAGE_HEADER');
+
+ // Page headers - post-filter (normally, you don't want to register here)
+ // ------------------- LAST FILTER FOR THIS CHAIN! ------------------------
+ registerFilter('post_page_header', 'FINISH_PAGE_HEADER');
+ // ------------------- LAST FILTER FOR THIS CHAIN! ------------------------
+
// Login failures handler
registerFilter('post_youhere_line', 'CALL_HANDLER_LOGIN_FAILTURES');
return $data;
}
+// Filter for loading page header, this should be ran first!
+function FILTER_LOAD_PAGE_HEADER () {
+ // Determine the page title
+ $content['header_title'] = determinePageTitle();
+
+ // Output page header code
+ $GLOBALS['page_header'] = loadTemplate('page_header', true, $content);
+
+ // Include meta data in 'guest' module
+ if (getModule() == 'index') {
+ // Load meta data template
+ $GLOBALS['page_header'] .= loadTemplate('metadata', true);
+
+ // Add meta description to header
+ if ((isInstalled()) && (isAdminRegistered()) && (SQL_IS_LINK_UP())) {
+ // Add meta description not in admin and login module and when the script is installed
+ generateMetaDescriptionCode();
+ } // END - if
+ } // END - if
+}
+
+// Filter for adding style sheet, closing page header
+function FILTER_FINISH_PAGE_HEADER () {
+ // Include stylesheet
+ loadIncludeOnce('inc/stylesheet.php');
+
+ // Closing HEAD tag
+ $GLOBALS['page_header'] .= '</head>';
+}
+
// [EOF]
?>
+
// Prepares the header for HTML output
function loadHtmlHeader () {
- // Determine the page title
- $content['header_title'] = determinePageTitle();
+ // Run two filters:
+ // 1.) pre_page_header (mainly loads the page_header template and includes
+ // meta description)
+ runFilterChain('pre_page_header');
- // Output page header code
- $GLOBALS['page_header'] = loadTemplate('page_header', true, $content);
-
- // Include meta data in 'guest' module
- if (getModule() == 'index') {
- // Load meta data template
- $GLOBALS['page_header'] .= loadTemplate('metadata', true);
-
- // Add meta description to header
- if ((isInstalled()) && (isAdminRegistered()) && (SQL_IS_LINK_UP())) {
- // Add meta description not in admin and login module and when the script is installed
- generateMetaDescriptionCode();
- } // END - if
- } // END - if
+ // Here can be something be added, but normally one of the two filters
+ // around this line should do the job for you.
+ // 2.) post_page_header (mainly to load stylesheet, extra JavaScripts and
+ // to close the head-tag)
// Include more header data here
- $GLOBALS['page_header'] .= loadTemplate('header', true);
-
- // Include stylesheet
- loadIncludeOnce('inc/stylesheet.php');
-
- // Closing HEAD tag
- $GLOBALS['page_header'] .= '</head>';
+ runFilterChain('post_page_header');
}
// Adds page header and footer to output array element