X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Ffunctions.php;h=c1293681cef302da6f78545014bd5c7152985f6e;hp=9f1476473d9ec63beab14b86b9a8c836eb495495;hb=9b8d0c1de007c1149af813c07773c3536c71ddd5;hpb=72ac9f672704438aabc4f4bada7f5c3b40499f1a diff --git a/inc/functions.php b/inc/functions.php index 9f1476473d..c1293681ce 100644 --- a/inc/functions.php +++ b/inc/functions.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 * @@ -3786,37 +3787,23 @@ function isSpider () { if (empty($userAgent)) return true; // Is it a spider? - return ((strpos($userAgent, 'spider') !== false) || (strpos($userAgent, 'slurp') !== false) || (strpos($userAgent, 'bot') !== false)); + return ((strpos($userAgent, 'spider') !== false) || (strpos($userAgent, 'slurp') !== false) || (strpos($userAgent, 'bot') !== false) || (strpos($userAgent, 'archiver') !== false)); } // 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'] .= ''; + runFilterChain('post_page_header'); } // Adds page header and footer to output array element