Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
How can i overload plugin css files in my theme?
Hi!
I have installed the 'whosonline'-Plugin, which has a 'whosonline.css' file in the plugin directory.
Is it possible to replace that file for my theme by copying it in my theme folder? (like the vanilla.css or garden.css described on the Theme Quick Start docs page)
I have installed the 'whosonline'-Plugin, which has a 'whosonline.css' file in the plugin directory.
Is it possible to replace that file for my theme by copying it in my theme folder? (like the vanilla.css or garden.css described on the Theme Quick Start docs page)
0
Comments
As S said i believe you need to keep it where it is.
@ScaraX
Possible I have solution for your problem.
Put all content of whosonline.css in /themes/yourtheme/design/garden.css (add to the end) and override CSS values as you want. If it will work well, send a word about that.
color: #FFFFFF !important;
Which should override some of the stuff if u follow S's
That's the case (full path) for some core plugin :
- Is php case sensitive about functions names? (as AddCssFile is called with uppercase and lowercase "Css").
- Why use GetResource? Especially for the flagging.css, and embedvanilla, as by default it will look into the design folder.
To be able to theme those, we had to change (it was for tagging)
$Sender->AddCSSFile('plugins/Tagging/design/tagadmin.css');
-> $Sender->AddCssFile(tagadmin.css', 'plugins/Tagging');
I can create a patch for all of those ones, but what should I do about the GetResource? Move the css to a design folder and change the call to as above?
Furthermore, as the css are not unique, maybe it might be a good idea to be able have all of them in a separate folder, similar to what's possible for application?
@Tim, @Mark, @Todd, @digibomb, @Lincoln (yep.. calling everybody)
The extended syntax for AddCssFile that you're seeing there came along after I had written GetResource as a convenient shortcut for finding plugin CSS and views. AddCssFile() called in that manner has also had a couple of bugs until recently, so it hasn't been publicized. Nowdays though, it should be safe to use it.
Make sense?
Vanilla Forums COO [GitHub, Twitter, About.me]
Extended, you mean with the 2 parameters? Such as the one I used so that lena could theme the tagadmin.css.
I guess so (after reading again your comment), so it's safe for me to change everything using it, and create a pull request, right?
Vanilla Forums COO [GitHub, Twitter, About.me]
Some plugin I do use, some I don't. I'll enable them before and afterward to check it loads the same css file.
Vanilla Forums COO [GitHub, Twitter, About.me]