Quote:
Originally Posted by TheLastSuperman
Ok so go to AdminCP > Plugins & Products > Add New Plugin
Title: Custom background per style for VSA Chatbox
Execution Order: 5
Hook Location: parse_templates
Code:
if (STYLEID == 1) {
if (THIS_SCRIPT == 'forumhome') {
$vsacssfix = '<style type="text/css">
#vsacb_messagearea {
background:#ffffff !important;
background-color:#ffffff !important;
}
</style>';
$template_hook[headinclude_bottom_css] .= $vsacssfix;
}
}
Now in styleid #1 it will show the chatbox with the background color in the plugin. I also told it to only do this on forumhome.
An example for multiple styles would be:
Code:
if (THIS_SCRIPT == 'forumhome') {
if (STYLEID == 1) {
$vsachatcssfix = '<style type="text/css">
#vsacb_messagearea {
background:#ffffff !important;
background-color:#ffffff !important;
}
</style>';
$template_hook[headinclude_bottom_css] .= $vsachatcssfix;
}
if (STYLEID == 2) {
$vsachatcss2fix = '<style type="text/css">
#vsacb_messagearea {
background:#ffffff !important;
background-color:#ffffff !important;
}
</style>';
$template_hook[headinclude_bottom_css] .= $vsachatcss2fix;
}
}
^ I moved the if this script to the outside so it's still specified but also not repeated (not required). If you're using the chatbox on other pages then remove that snippet about THIS_SCRIPT and the closing } tag in the code.
This should sort the chantbox background per style so long as you include each style in the plugin per new code  .
|
I tried the first code, didn't change anything. Replaced it with second code, and still didn't change anything. I did it exactly as you stated to do it. I don't know what the heck is wrong.