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 // <-- this line is not needed, only for colored code herefunction _get_frontend($type= 'css') { global $database,$css,$js; $path = _clean_filename(WB_PATH); $query = "SELECT DISTINCT `directory` FROM ".TABLE_PREFIX."addons where function='snippet'"; $res = $database->query($query); if($res && $res->numRows() > 0) { while ($row = $res->fetchRow()) { $fpath = $path.'/modules/'.$row['directory']; if($type=='css' && file_exists($fpath.'/frontendUser.css')) { $css[] = $fpath.'/frontendUser.css'; } else if ($type=='css' && file_exists($fpath.'/frontend.css')) { $css[] = $fpath.'/frontend.css'; } if($type=='js' && file_exists($fpath.'/frontendUser.js')) { $js[] = $fpath.'/frontendUser.js'; } else if ($type=='js' && file_exists($fpath.'/frontend.js')) { $js[] = $fpath.'/frontend.js'; } } } $query = "SELECT DISTINCT `directory` FROM ".TABLE_PREFIX."addons a JOIN ".TABLE_PREFIX."sections s ON s.module = a.directory"; $res = $database->query($query); if($res && $res->numRows() > 0) { while ($row = $res->fetchRow()) { $fpath = $path.'/modules/'.$row['directory']; if($type=='css' && file_exists($fpath.'/frontendUser.css')) { $css[] = $fpath.'/frontendUser.css'; } else if ($type=='css' && file_exists($fpath.'/frontend.css')) { $css[] = $fpath.'/frontend.css'; } if($type=='js' && file_exists($fpath.'/frontendUser.js')) { $js[] = $fpath.'/frontendUser.js'; } else if ($type=='js' && file_exists($fpath.'/frontend.js')) { $js[] = $fpath.'/frontend.js'; } } } $done = 1;}