aboutsummaryrefslogtreecommitdiffstats
path: root/view/php/theme_init.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-02-19 16:50:41 -0800
committerzotlabs <mike@macgirvin.com>2017-02-19 16:50:41 -0800
commit573846707ceade4d00a4dfe3184d9f8004a3112b (patch)
tree501d9508c22be518894cb18dfec13416412073cb /view/php/theme_init.php
parent02e487f30687a1602bd257e2acf2b9954aab6e98 (diff)
downloadvolse-hubzilla-573846707ceade4d00a4dfe3184d9f8004a3112b.tar.gz
volse-hubzilla-573846707ceade4d00a4dfe3184d9f8004a3112b.tar.bz2
volse-hubzilla-573846707ceade4d00a4dfe3184d9f8004a3112b.zip
fix several places where head_add_(css|js) functions have been used incorrectly. It appears that mistakes were made going back a long time and propagated. Here's the way it should work:
- if there is no preceding / character, we look for the file within all the appropriate theme directories. - otherwise the file should have a preceding /, which means use this path relative to the hubzilla basedir - files beginning with // are considered to be schemeless URLs. Therefore 'foo.css' means find the best theme-able representation of foo.css. '/library/foo.css' means only use the version of foo.css that is in /library.
Diffstat (limited to 'view/php/theme_init.php')
-rw-r--r--view/php/theme_init.php58
1 files changed, 26 insertions, 32 deletions
diff --git a/view/php/theme_init.php b/view/php/theme_init.php
index 85da4d782..869b97473 100644
--- a/view/php/theme_init.php
+++ b/view/php/theme_init.php
@@ -2,51 +2,45 @@
require_once('include/plugin.php');
-head_add_css('library/tiptip/tipTip.css');
-head_add_css('library/jgrowl/jquery.jgrowl.css');
-head_add_css('library/jRange/jquery.range.css');
+head_add_css('/library/tiptip/tipTip.css');
+head_add_css('/library/jgrowl/jquery.jgrowl.css');
+head_add_css('/library/jRange/jquery.range.css');
-head_add_css('view/css/conversation.css');
-head_add_css('view/css/widgets.css');
-head_add_css('view/css/colorbox.css');
-head_add_css('library/justifiedGallery/justifiedGallery.min.css');
-head_add_css('library/Text_Highlighter/sample.css');
+head_add_css('/view/css/conversation.css');
+head_add_css('/view/css/widgets.css');
+head_add_css('/view/css/colorbox.css');
+head_add_css('/library/justifiedGallery/justifiedGallery.min.css');
+head_add_css('/library/Text_Highlighter/sample.css');
head_add_js('jquery.js');
-//head_add_js('jquery.migrate-3.0.0.js');
-head_add_js('library/justifiedGallery/jquery.justifiedGallery.min.js');
-head_add_js('library/sprintf.js/dist/sprintf.min.js');
+head_add_js('/library/justifiedGallery/jquery.justifiedGallery.min.js');
+head_add_js('/library/sprintf.js/dist/sprintf.min.js');
-//head_add_js('jquery-compat.js');
head_add_js('spin.js');
head_add_js('jquery.spin.js');
head_add_js('jquery.textinputs.js');
head_add_js('autocomplete.js');
-head_add_js('library/jquery-textcomplete/jquery.textcomplete.js');
-//head_add_js('library/colorbox/jquery.colorbox.js');
-head_add_js('library/jquery.timeago.js');
-head_add_js('library/readmore.js/readmore.js');
-head_add_js('library/sticky-kit/sticky-kit.js');
-//head_add_js('library/jquery_ac/friendica.complete.js');
-//head_add_js('library/tiptip/jquery.tipTip.minified.js');
-head_add_js('library/jgrowl/jquery.jgrowl_minimized.js');
-//head_add_js('library/tinymce/jscripts/tiny_mce/tiny_mce.js');
-head_add_js('library/cryptojs/components/core-min.js');
-head_add_js('library/cryptojs/rollups/aes.js');
-head_add_js('library/cryptojs/rollups/rabbit.js');
-head_add_js('library/cryptojs/rollups/tripledes.js');
-//head_add_js('library/stylish_select/jquery.stylish-select.js');
+head_add_js('/library/jquery-textcomplete/jquery.textcomplete.js');
+
+head_add_js('/library/jquery.timeago.js');
+head_add_js('/library/readmore.js/readmore.js');
+head_add_js('/library/sticky-kit/sticky-kit.js');
+head_add_js('/library/jgrowl/jquery.jgrowl_minimized.js');
+head_add_js('/library/cryptojs/components/core-min.js');
+head_add_js('/library/cryptojs/rollups/aes.js');
+head_add_js('/library/cryptojs/rollups/rabbit.js');
+head_add_js('/library/cryptojs/rollups/tripledes.js');
+
head_add_js('acl.js');
head_add_js('webtoolkit.base64.js');
head_add_js('main.js');
head_add_js('crypto.js');
-head_add_js('library/jRange/jquery.range.js');
-//head_add_js('docready.js');
-head_add_js('library/colorbox/jquery.colorbox-min.js');
+head_add_js('/library/jRange/jquery.range.js');
+head_add_js('/library/colorbox/jquery.colorbox-min.js');
-head_add_js('library/jquery.AreYouSure/jquery.are-you-sure.js');
-head_add_js('library/tableofcontents/jquery.toc.js');
-head_add_js('library/imagesloaded/imagesloaded.pkgd.min.js');
+head_add_js('/library/jquery.AreYouSure/jquery.are-you-sure.js');
+head_add_js('/library/tableofcontents/jquery.toc.js');
+head_add_js('/library/imagesloaded/imagesloaded.pkgd.min.js');
/**
* Those who require this feature will know what to do with it.
* Those who don't, won't.