From 1c46f2ba40267a5d78f6ade1e899440b946d7c96 Mon Sep 17 00:00:00 2001 From: Michael Save Date: Wed, 14 Mar 2012 00:08:03 +1100 Subject: [PATCH] config[additional_javascript]: custom javascript files to include --- inc/config.php | 6 +++++- templates/index.html | 2 +- templates/thread.html | 3 ++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/inc/config.php b/inc/config.php index 1a0fde6a..31dac432 100644 --- a/inc/config.php +++ b/inc/config.php @@ -41,7 +41,8 @@ 'allowed_ext_files' => Array(), 'file_icons' => Array(), 'footer' => Array(), - 'stylesheets' => Array() + 'stylesheets' => Array(), + 'additional_javascript' => Array() ); /* End ignore */ @@ -523,6 +524,9 @@ // Automatically remove unnecessary whitespace when compiling HTML files from templates. $config['minify_html'] = false; + // Additional Javascript files to include on board index and thread pages. + // $config['additional_javascript'][] = 'something.js'; + /* * ==================== * Video embedding diff --git a/templates/index.html b/templates/index.html index 8a9e32fa..19798292 100644 --- a/templates/index.html +++ b/templates/index.html @@ -8,7 +8,7 @@ {% if config.meta_keywords %}{% endif %} - {% if not nojavascript %}{% endif %} + {% if not nojavascript %}{% for javascript in config.additional_javascript %}{% endfor %}{% endif %} {% if config.recaptcha %}{% endif %} + {{ boardlist.top }}