summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Save <savetheinternet@tinyboard.org>2012-03-14 00:08:03 +1100
committerMichael Save <savetheinternet@tinyboard.org>2012-03-14 00:08:03 +1100
commit1c46f2ba40267a5d78f6ade1e899440b946d7c96 (patch)
tree3353d5bd9907d5956c2d8358fa527522ba7380f6
parent20616a23f42cc8a35d1587d111001602f465c30d (diff)
config[additional_javascript]: custom javascript files to include
-rw-r--r--inc/config.php6
-rw-r--r--templates/index.html2
-rw-r--r--templates/thread.html3
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 @@
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
{% if config.meta_keywords %}<meta name="keywords" content="{{ config.meta_keywords }}" />{% endif %}
<link rel="stylesheet" type="text/css" id="stylesheet" href="{{ config.uri_stylesheets }}{{ config.default_stylesheet.1 }}" />
- {% if not nojavascript %}<script type="text/javascript" src="{{ config.url_javascript }}"></script>{% endif %}
+ {% if not nojavascript %}<script type="text/javascript" src="{{ config.url_javascript }}"></script>{% for javascript in config.additional_javascript %}<script type="text/javascript" src="{{ javascript }}"></script>{% endfor %}{% endif %}
{% if config.recaptcha %}<style type="text/css">{% raw %}
.recaptcha_image_cell {
background: none !important;
diff --git a/templates/thread.html b/templates/thread.html
index 9195ada8..07688c1a 100644
--- a/templates/thread.html
+++ b/templates/thread.html
@@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
{% if config.meta_keywords %}<meta name="keywords" content="{{ config.meta_keywords }}" />{% endif %}
<link rel="stylesheet" type="text/css" id="stylesheet" href="{{ config.uri_stylesheets }}{{ config.default_stylesheet.1 }}" />
- {% if not nojavascript %}<script type="text/javascript" src="{{ config.url_javascript }}"></script>{% endif %}
+ {% if not nojavascript %}<script type="text/javascript" src="{{ config.url_javascript }}"></script>{% for javascript in config.additional_javascript %}<script type="text/javascript" src="{{ javascript }}"></script>{% endfor %}{% endif %}
{% if config.recaptcha %}<style type="text/css">{% raw %}
.recaptcha_image_cell {
background: none !important;
@@ -24,6 +24,7 @@
display: block;
}
{% endraw %}</style>{% endif %}
+
</head>
<body>
{{ boardlist.top }}