The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
css @import to <link>
when storing style sheets to file vBulletin uses @import:
Code:
@import url("clientscript/vbulletin_css/style-xxxx-xxx.css"); 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:
there is also this function that deletes the older css files: PHP Code:
|
#2
|
||||
|
||||
Uh, that is php code, not css code. I'm nearly positive vBulletin doesn't use an @import in the actual css rules. It uses a standard <link> tag, in the head.
|
#3
|
|||
|
|||
Quote:
"Store CSS Stylesheets as Files?", if you check yes instead of the full css loading in page (see this sites source for example) you get something like this: Code:
<style type="text/css" id="vbulletin_css"> /** * vBulletin 3.8.5 CSS * Style: 'foobar'; Style ID: 5 */ @import url("clientscript/vbulletin_css/style-436ba35e-0005.css"); </style> The first php code snippet is what helps create this , each time you update your style a new css file is created and the function in op deletes the older stored css file. |
#4
|
|||
|
|||
Try replacing the preg line with:
Code:
if (preg_match('#<link rel="stylesheet" type="text/css" href="style-\w{8}-0*' . $styleid . '\.css" />#siU', $csscontents, $match)) Quote:
|
#5
|
|||
|
|||
Quote:
|
#6
|
|||
|
|||
Quote:
Oh right - I got the pattern to match but forgot that it needs parens around the matched part to use in the unlink call. If you want to try again, you could try this: PHP Code:
|
#7
|
|||
|
|||
Also didn't work but I moved clientscript/vbulletin_css/ from unlink into preg match and is now.
|
#8
|
|||
|
|||
I was just wondering if your <link> tag had the path in the file name or not. I guess it does.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|