From 6373ad1237c82a561fec8264457e3a3a845f7e87 Mon Sep 17 00:00:00 2001 From: stevetruckstuff Date: Fri, 24 Feb 2006 22:31:40 +0000 Subject: [PATCH 1/1] Incoproated template config file. Templates can now include their own javascript files. If a template pack does not incorporate a specific template, the default template will be used instead. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@10825 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/page_header.php | 17 ++- include/load_prefs.php | 3 + src/left_main.php | 266 +++------------------------------ src/style.php | 10 +- templates/default/template.php | 46 ++++++ 5 files changed, 94 insertions(+), 248 deletions(-) create mode 100644 templates/default/template.php diff --git a/functions/page_header.php b/functions/page_header.php index bfdc5872..70d289aa 100644 --- a/functions/page_header.php +++ b/functions/page_header.php @@ -195,7 +195,11 @@ function displayPageHeader($color, $mailbox, $sHeaderJs='', $sBodyTagJs = '') { } if( $javascript_on || strpos($sHeaderJs, 'new_js_autodetect_results.value') ) { - $sJsBlock = '' ."\n"; + $js_includes = $oTemplate->getJavascriptIncludes(); + $sJsBlock = ''; + foreach ($js_includes as $js_file) { + $sJsBlock .= '' ."\n"; + } if ($sHeaderJs) { $sJsBlock .= "\n