Quote:
Originally Posted by TheLastSuperman
Will do  and you're clear on how to add more styles to this right? Let's do an example real quick to be sure but I'm going to make it simpler than before:
PHP Code:
if (STYLEID == 90 OR STYLEID == 91 OR STYLEID == 93) {
$vsacssfix = '<style type="text/css">
#vsacb_messagearea {
background:#ffffff !important;
background-color:#ffffff !important;
}
</style>';
$template_hook[headinclude_bottom_css] .= $vsacssfix;
}
^ So per the above I just added styleid's 90, 91, and 93 because in my example code we are pretending that styleid 92 already has a white background for the chat because it's a light style  the other three listed in the code were dark styles like avenger blue. <-- That's on an example if you're adding more than one style to this plugin.
Hint: You can also modify this code to make new plugins doing many things including switching logos per forum, background images per forum and much more it just takes some creativity and some tinkering from all of you  . In fact I use variants of this on many sites accomplishing many things! If you've ever ran into some of the shared css issues with custom styling this can come in handy when css is shared on a different page but you're trying to accomplish something that just does not like the default definition being overwritten in additional.css (since it's global) so you use a plugin like this to specify THIS_SCRIPT or forumid and overwrite it there  .
Edit: Actually good idea for a new article ^ so I'll have that posted soon!
|
Yes, I gotcha. And, I even went in and changed the color code from the stark white to a softer pale gray, which matches other things (such as new and old post images) in the theme. May do that for a couple other themes I have.