X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Ffilters.php;h=36d843b78d8582cbcfc4df3b2fa89d3c17cc79dd;hb=af5059252c53c8802929611bf322ca4597b70146;hp=4b16afc996283990a5da94df0b5039fe9b172e6a;hpb=86993ed7d3b2dbab9d2725c7782b3e7ab693cd3f;p=mailer.git diff --git a/inc/filters.php b/inc/filters.php index 4b16afc996..36d843b78d 100644 --- a/inc/filters.php +++ b/inc/filters.php @@ -18,6 +18,7 @@ * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * + * Copyright (c) 2009, 2010 by Mailer Developer Team * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -450,7 +451,7 @@ function FILTER_COMPILE_EXPRESSION_CODE ($code) { preg_match_all('/\{%(([a-zA-Z0-9-_,]+)(=([^\}]+)){0,1})*%\}/', $code, $matches); //* DEBUG: */ print('
'.print_r($matches, true).'
'); - // Default is from OUTPUT_HTML + // Default is from outputHtml() $outputMode = getOutputMode(); // Some entries found? @@ -932,5 +933,52 @@ function FILTER_DO_LOGIN_ADMIN ($data) { 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'] .= ''; +} + +// Cleans up the DNS cache if sql_patches is at least 0.7.0 +function FILTER_CLEANUP_DNS_CACHE () { + // Is the latest version installed? + if (isExtensionInstalledAndNewer('sql_patches', '0.7.0')) { + // Load class file + loadIncludeOnce('inc/classes/resolver.class.php'); + + // Instance the resolver + $resolver = new HostnameResolver(); + + // Purge entries + $resolver->purgeEntries(); + + // Cute, isn't it? ;-) + } // END - if +} + // [EOF] ?>