diff --git a/e107_core/templates/footer_default.php b/e107_core/templates/footer_default.php index 164d43d49..eae40d7ce 100644 --- a/e107_core/templates/footer_default.php +++ b/e107_core/templates/footer_default.php @@ -282,6 +282,11 @@ if (function_exists('theme_foot')) // F any included JS footer scripts // DEPRECATED - use e107::getJs()->footerFile('{e_PLUGIN}myplug/js/my.js', $zone = 2) // +if(!empty($pref['jscsscachestatus'])) +{ + e107::getJs()->renderCached('js'); + e107::getJs()->renderJs('header_inline', 5); +} global $footer_js; if (isset($footer_js) && is_array($footer_js)) { diff --git a/e107_core/templates/header_default.php b/e107_core/templates/header_default.php index 088a12498..80b4c3020 100644 --- a/e107_core/templates/header_default.php +++ b/e107_core/templates/header_default.php @@ -564,8 +564,11 @@ e107Event.trigger('loaded', null, document); }); ",'prototype',5); -e107::getJs()->renderCached('js'); -e107::getJs()->renderJs('header_inline', 5); +if(empty($pref['jscsscachestatus'])) // render in header when cache disabled, otherwise render in footer. (see footer_default.php) +{ + e107::getJs()->renderCached('js'); + e107::getJs()->renderJs('header_inline', 5); +} diff --git a/e107_handlers/js_manager.php b/e107_handlers/js_manager.php index 6e74876b3..f51b9deb1 100644 --- a/e107_handlers/js_manager.php +++ b/e107_handlers/js_manager.php @@ -802,7 +802,7 @@ class e_jsmanager return null; } - $text = ''; + $text = "\n\n\n"; foreach($this->_e_link as $v) { @@ -1590,7 +1590,7 @@ class e_jsmanager } - echo "\n\n\n"; + echo "\n\n\n"; if($type == 'js') {