WebsiteBaker 2.13.8 is now available!
R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WBhttps://forum.websitebaker.org/index.php/topic,32355.0.html
<?php$css[] = "css/bootstrap.min.css";$css[] = "css/font-awesome.css";$css[] = "css/custom.css";$css[] = "css/fancybox/jquery.fancybox-1.3.4.css";$css[] = 'https://fonts.googleapis.com/css?family=Roboto+Condensed:400,300,700';?>
<?php minify_css(); ?>
<?php$js[] = "https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js";$js[] = "js/bootstrap.min.js";$js[] = "js/skrollr.min.js";$js[] = "fancybox/jquery.fancybox-1.3.4.pack.js";?>
<?php minify_js(); ?>
Hi, a local test was not successful. The minified.css contains Windows pathes.Could be a problem with LibraryAdmin.
Note that ?force (or CTRL-F5) will only work when you are a logged-in user!
miniform frontend.css and OFA frontend.js will loaded extra. They are to late for your script?
$css[] = "css/bootstrap.min.css";
is this considered to be TEMPLATE_URL/ css/bootstrap.min.css ??
<?php$css[] = "css/bootstrap.min.css"; // Relative to TEMPLATE_DIR$css[] = "/modules/mymodule/plugin/mymodule.css"; // if the file exists it is used, else WB_PATH is added $css[] = "//somewebsite.com/somecss.css"; // External file, HTTPS is assumed$css[] = "http://somewebsite.com/somecss.css"; // External file, HTTP$css[] = "https://somewebsite.com/somecss.css"; // External file, HTTPS
if(isset($_SESSION['USER_ID'])AND ($_SESSION['USER_ID'] == '1') ) { //Detect CTRL-F5 or ?force parameter only when logged in user
$css[] = "http://fonts.googleapis.com/css?family=Italianno&subset=latin,latin-ext"; $css[] = "css/bootstrap.min.css"; $css[] = ".."; minify_css();
Sometimes minify.css/js file has and sometimes doesnt have timestamp is this normal ?
Also if you have registered users in non-admin groups they will trigger reminify every refresh..
.....it displays blank .css file.
And do you know why I cant use it inside another function ?
By the way is there a reasone why you use echo '<script src="... instead return '<script src=".. ?
Also, I noticed that it compresses all possible modules and snippets and not just the ones in use like register_frontend_m odfiles('css/js');
So for the backend I guess I would need to load backend.css/js and backend_body.css/js for all "page" modules (snippets dont have backend css/js scripts) and "tool" modules.. Am I missing something ?
[E_WARNING] \modules\minified\include.php:[100] from \modules\minified\include.php:[38] _need_minify "filemtime(): stat failed for F:\Wb-Portable-2.10.x.php71\root/templates/fe_template/F:\Wb-Portable-2.10.x.php71\root/modules/wysiwyg/frontend.css"
function _minify_filename($relative_file, $get_content = true) { if(substr($relative_file,0,2) == "//") $relative_file = 'https:'.$relative_file; if(substr($relative_file,0,5) == "http:" || substr($relative_file,0,6) == "https:") { if($get_content) return file_get_contents($relative_file); return null; } // ADDED if(preg_match('/^[A-Z]:/i', $relative_file)) { if($get_content) return file_get_contents($relative_file); return null; }
I altered the code, and now it is working
if(preg_match('/^[A-Z]:/i', $relative_file)) { return $relative_file;}