![]() |
|
Thread Tools |
#1
|
||||||||||||||||
|
||||||||||||||||
css @import to <link>
when storing style sheets to file vBulletin uses @import:
this has a negative impact on web page performance, is it some how possible to change this to link?
--- Update --- I have found this in includes/adminfunctions_template.php which looks to be the code I need to edit:
BUT there is also this function that deletes the older css files:
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? No members have liked this post.
Last edited by PinkMilk; 13 Aug 2013 at 04:57. |
#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.
__________________
Looking for ImpEx?
No members have liked this post.
|
#3
|
||||
|
||||
Originally Posted by Zachery
Under the vbulletin options > Style & Language Settings there is an option:![]()
"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:
as you can see it uses @import, this is not the best option it is better to use <link> as explained in op. 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. No members have liked this post.
Last edited by PinkMilk; 13 Aug 2013 at 06:57. |
#4
|
||||
|
||||
Try replacing the preg line with:
Originally Posted by Zachery
I thought the same thing, but it turns out it is something that browsers recognize. http://stackoverflow.com/questions/1...why-use-import
![]()
No members have liked this post.
|
#5
|
||||
|
||||
Originally Posted by kh99
Thanks but didn't work, I have the <link> format working great its just the deleting of the older stylesheet, guess I will have to just remember to clean that folder out from time to time.
![]()
No members have liked this post.
|
#6
|
||||
|
||||
Originally Posted by PinkMilk
![]()
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:
No members have liked this post.
|
#7
|
|||
|
|||
Also didn't work but I moved clientscript/vbulletin_css/ from unlink into preg match and is now.
No members have liked this post.
|
#8
|
|||
|
|||
I was just wondering if your <link> tag had the path in the file name or not. I guess it does.
No members have liked this post.
|
![]() |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Administrative and Maintenance Tools Add "Add/Import Product" link in AdminCP menu. | BBR-APBT | vBulletin 3.8 Add-ons | 14 | 28 Apr 2011 21:07 |
Administrative and Maintenance Tools Put [Add/Import Product] link in your admincp menu | ericgtr | vBulletin 3.6 Template Modifications | 18 | 20 Apr 2010 15:57 |
Administrative and Maintenance Tools Put [Add/Import Product] link in your admincp menu | ericgtr | vBulletin 4.x Add-ons | 11 | 12 Mar 2010 17:51 |
Administrative and Maintenance Tools add/import product link relocation | o0Hubba0o | vBulletin 3.6 Add-ons | 7 | 09 Jun 2007 19:16 |
«
Previous Thread
|
Next Thread
»
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
|
|
New To Site? | Need Help? |
All times are GMT. The time now is 20:53.