config[additional_javascript]: custom javascript files to include

This commit is contained in:
Michael Save 2012-03-14 00:08:03 +11:00
parent 20616a23f4
commit 1c46f2ba40
3 changed files with 8 additions and 3 deletions

View File

@ -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

View File

@ -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;

View File

@ -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 }}