From 803b16853ebe141c0c7ac19a75cacd0b9411e457 Mon Sep 17 00:00:00 2001 From: 8chan Admin Date: Fri, 25 Oct 2013 01:42:45 +0000 Subject: [PATCH] Make it so you can have different stylesheets per board --- inc/functions.php | 8 -------- templates/index.html | 8 ++++++++ templates/main.js | 4 ++-- templates/thread.html | 8 ++++++++ 4 files changed, 18 insertions(+), 10 deletions(-) diff --git a/inc/functions.php b/inc/functions.php index f6a217a5..022becb5 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -1413,16 +1413,8 @@ function buildIndex() { function buildJavascript() { global $config; - $stylesheets = array(); - foreach ($config['stylesheets'] as $name => $uri) { - $stylesheets[] = array( - 'name' => addslashes($name), - 'uri' => addslashes((!empty($uri) ? $config['uri_stylesheets'] : '') . $uri)); - } - $script = Element('main.js', array( 'config' => $config, - 'stylesheets' => $stylesheets )); // Check if we have translation for the javascripts; if yes, we add it to additional javascripts diff --git a/templates/index.html b/templates/index.html index 0458ed5a..b6fef53e 100644 --- a/templates/index.html +++ b/templates/index.html @@ -59,6 +59,14 @@

Powered by Tinyboard {{ config.version }} | Tinyboard Copyright © 2010-2013 Tinyboard Development Group

{% for footer in config.footer %}

{{ footer }}

{% endfor %} + + diff --git a/templates/main.js b/templates/main.js index 5a4c68fc..cb426424 100644 --- a/templates/main.js +++ b/templates/main.js @@ -26,11 +26,11 @@ var saved = {}; var selectedstyle = '{% endraw %}{{ config.default_stylesheet.0|addslashes }}{% raw %}'; -var styles = { +/*var styles = { {% endraw %} {% for stylesheet in stylesheets %}{% raw %}'{% endraw %}{{ stylesheet.name|addslashes }}{% raw %}' : '{% endraw %}{{ stylesheet.uri|addslashes }}{% raw %}', {% endraw %}{% endfor %}{% raw %} -}; +};*/ var board_name = false; function changeStyle(styleName, link) { diff --git a/templates/thread.html b/templates/thread.html index e8c43ef7..3ed961ff 100644 --- a/templates/thread.html +++ b/templates/thread.html @@ -42,6 +42,14 @@

Powered by Tinyboard {{ config.version }} | Tinyboard Copyright © 2010-2013 Tinyboard Development Group

{% for footer in config.footer %}

{{ footer }}

{% endfor %} + +