From d4ff8f0b686d48067ac2fee9ea6c0da850c49a89 Mon Sep 17 00:00:00 2001 From: sweetas Date: Wed, 11 Jul 2007 13:50:49 +0000 Subject: [PATCH] added ability to switch off include of core javascript file and cleaned up head output --- e107_themes/templates/header_default.php | 33 ++++++++++-------------- 1 file changed, 13 insertions(+), 20 deletions(-) diff --git a/e107_themes/templates/header_default.php b/e107_themes/templates/header_default.php index 8650e2bca..22383ad2b 100644 --- a/e107_themes/templates/header_default.php +++ b/e107_themes/templates/header_default.php @@ -6,9 +6,9 @@ | Released under the terms and conditions of the GNU General Public License (http://gnu.org). | | $Source: /cvs_backup/e107_0.8/e107_themes/templates/header_default.php,v $ -| $Revision: 1.8 $ -| $Date: 2007-07-03 03:24:35 $ -| $Author: e107coders $ +| $Revision: 1.9 $ +| $Date: 2007-07-11 13:50:49 $ +| $Author: sweetas $ +-----------------------------------------------------------------------------------------------+ */ @@ -82,12 +82,11 @@ echo (defined("STANDARDS_MODE") ? "" : " -".SITENAME.(defined("e_PAGETITLE") ? ": ".e_PAGETITLE : (defined("PAGE_NAME") ? ": ".PAGE_NAME : ""))."\n"; +".SITENAME.(defined("e_PAGETITLE") ? ": ".e_PAGETITLE : (defined("PAGE_NAME") ? ": ".PAGE_NAME : ""))."\n\n"; // // D: Send JS // -echo "\n"; // Wysiwyg JS support on or off. if (varset($pref['wysiwyg'],FALSE) && check_class($pref['post_html']) && varset($e_wysiwyg) != "") { @@ -99,13 +98,14 @@ if (varset($pref['wysiwyg'],FALSE) && check_class($pref['post_html']) && varset( if (isset($theme_js_php) && $theme_js_php) { echo "\n"; + if (!isset($no_core_js) || !$no_core_js) { + echo "\n"; + } if (file_exists(THEME.'theme.js')) { echo "\n"; } if (filesize(e_FILE.'user.js')) { echo "\n"; } } if (isset($eplug_js) && $eplug_js) { - echo "\n\n"; if(is_array($eplug_js)) { foreach($eplug_js as $kjs) @@ -121,7 +121,7 @@ if (isset($eplug_js) && $eplug_js) { } if((isset($pref['enable_png_image_fix']) && $pref['enable_png_image_fix'] == true) || (isset($sleight) && $sleight == true)) { - echo "\n"; + echo "\n\n"; } if (function_exists('headerjs')){echo headerjs(); } @@ -129,10 +129,8 @@ if (function_exists('headerjs')){echo headerjs(); } // // E: Send CSS // -echo "\n"; if (isset($eplug_css) && $eplug_css) { - echo "\n\n"; if(is_array($eplug_css)) { foreach($eplug_css as $kcss) @@ -147,7 +145,6 @@ if (isset($eplug_css) && $eplug_css) { } -echo "\n"; if(defined("PREVIEWTHEME")) { echo "\n"; } else { @@ -198,14 +195,13 @@ if(function_exists('core_head')){ echo core_head(); } // // F: Send Meta Tags and Icon links // -echo "\n"; // Multi-Language meta-tags with merge and override option. -echo " +echo "\n \n"; -echo (defined("CORE_LC")) ? "\n" : ""; +echo (defined("CORE_LC")) ? "\n\n" : ""; // --- Load plugin Meta files and eplug_ before others -------- if (is_array($pref['e_meta_list'])) @@ -214,7 +210,6 @@ foreach($pref['e_meta_list'] as $val) { if(is_readable(e_PLUGIN.$val."/e_meta.php")) { - echo "\n"; require_once(e_PLUGIN.$val."/e_meta.php"); } } @@ -240,9 +235,8 @@ function render_meta($type) } } -echo "\n\n"; -echo (defined("META_DESCRIPTION")) ? "\n" : render_meta('description'); -echo (defined("META_KEYWORDS")) ? "\n" : render_meta('keywords'); +echo (defined("META_DESCRIPTION")) ? "\n\n" : render_meta('description'); +echo (defined("META_KEYWORDS")) ? "\n\n" : render_meta('keywords'); echo render_meta('copyright'); echo render_meta('author'); echo render_meta('tag'); @@ -262,7 +256,6 @@ if (file_exists(THEME."favicon.ico")) { if(function_exists('theme_head')){ - echo "\n\n"; echo theme_head(); } @@ -270,7 +263,7 @@ if(function_exists('theme_head')){ // // H: Generate JS for image preloads // -echo "\n\n"; + if ($pref['image_preload']) { $ejs_listpics = ''; $handle=opendir(THEME.'images');