when storing style sheets to file vBulletin uses @import:
Code:
@import url("clientscript/vbulletin_css/style-xxxx-xxx.css");
this has a negative impact on web page performance, is it some how possible to change this to link?
Code:
<link rel="stylesheet" type="text/css" href="style-xxxx-xxx.css" />
--- Update ---
I have found this in includes/adminfunctions_template.php which looks to be the code I need to edit:
PHP Code:
if (write_css_file($cssfilename, $css))
{
$css = "@import url(\"$cssfilename\");";
}
BUT
there is also this function that deletes the older css files:
PHP Code:
function delete_css_file($styleid, $csscontents)
{
if (preg_match('#@import url\("(clientscript/vbulletin_css/style-\w{8}-0*' . $styleid . '\.css)"\);#siU', $csscontents, $match))
{
// attempt to delete old css file
@unlink("./$match[1]");
}
}
so would need to change the preg_match regex for it to work with <link>, bit of an ask but can somebody be kind enough to rewrite the function?