The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Create overwriting CSS file
Hi,
I want to add a CSS file to my theme which is able to overwrites ALL of the existing stylesheets in a theme. The css file will be hosted on my server, but i want to have the ability to edit it locally and then just upload it, not using the templates editor in vbulletin. Is this possible and how do i make sure that it's overwriting all the other css? Please help me out here, thanks! |
#2
|
||||
|
||||
You'd need to remove all links to the vbulletin css (in the headinclude template, I believe, but there may be some other calls the in the main templates like FORUMHOME, SHOWTHREAD, etc) and then put in a link to your file on your server.
|
#3
|
||||
|
||||
Quote:
What i want to do is to create a css file that is on top of all other stylesheets, so i can overwrite them, instead of going in each of the template files and look for the specific css code everytime. Thanks for the help so far Lynne |
#4
|
||||
|
||||
Why not just add the css to the additional.css template, that will override the other css templates.
|
#5
|
||||
|
||||
Quote:
opening, saving & reloading the css template all the time. I do a lot of work in the templates and it would save so much time if i were able to do it that way. :/ Also, not all of the css is in the additional.css template, if you just have 1 file that is able to overwrite all other stylesheets, you could just check out which class or id you need via dev tools and write it in your own css file. |
#6
|
||||
|
||||
Make a plugin for this:
AdminCP > Plugins & Products > Add New Plugin Product: vBulletin Hook location: parse_templates Title: Custom Style Changes Execution Order: 5 Code:
if (STYLEID == 1) { $template_hook['headinclude_bottom_css'] .= '<link type="text/css" rel="stylesheet" href="aaa.css' . '?d=' . $style['dateline'] . '" />'; } |
2 благодарности(ей) от: | ||
TheLastSuperman, TheRealso0sick |
#7
|
||||
|
||||
|
#8
|
||||
|
||||
Now that is not 100% tested with all the css in there, that was just some quick tests.
|
#9
|
||||
|
||||
Thanks for your help, but this doesn't seem to work.
Wherever i put my css file, theres always a additional.css underneath it that overwrites my edits :/ |
#10
|
||||
|
||||
Are you setting your css elements to !important ?
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|