Multiple Attributes - I worked around this by doing the following:
Since my SPAN statement looks like so:
<span style="color: #F1A010; font-weight: bold;">
and not <span style="color: #F1A010;">
I went and had a look at the plugin code as follows:
admincp -> Plugins & Products -> Plugin Manager -> VSA New Reply
&
admincp -> Plugins & Products -> Plugin Manager -> VSA New Thread
The coder uses preg_match - whilst I know nothing really about coding as such, I applied a bit of logic and expanded his preg_match a little to match how I multi-attribute my Usergroups.
So it looks like this BEFORE:
preg_match("#<span[^style|>]?style=['|\"]?[^color:]color:[\s+]?(.*?)[;]?['|\"]?['|\"]?>#",$usernameopen,$newcolor);
More or less I needed modify the match as stated below
<span style="color: #F1A010;"> [change it to]--> <span style="color: #F1A010; font-weight: bold;">
To do so would add this code somewhere (well after the color style ; semi-colon to be exact):
?[^font-weight:]font-weight:[\s+]?[^bold]bold[;]
My Final Code:
preg_match("#<span[^style|>]?style=['|\"]?[^color:]color:[\s+]?(.*?)[;]?[^font-weight:]font-weight:[\s+]?[^bold]bold[;]?['|\"]?['|\"]?>#",$usernameopen,$newcolor);
So to be clear, here's the before and after:
BEFORE
preg_match("#<span[^style|>]?style=['|\"]?[^color:]color:[\s+]?(.*?)[;]?['|\"]?['|\"]?>#",$usernameopen,$newcolor);
AFTER
preg_match("#<span[^style|>]?style=['|\"]?[^color:]color:[\s+]?(.*?)[;]?[^font-weight:]font-weight:[\s+]?[^bold]bold[;]?['|\"]?['|\"]?>#",$usernameopen,$newcolor);
THIS IS WHAT THE CHATBOX DISPLAYED BEFORE:
[color=#F1A010; font-weight: bold]SlipperyDuck[/color] replied to the thread Facebook Integration Now up.
THIS IS WHAT THE CHATBOX DISPLAYED AFTER:
SlipperyDuck replied to the thread Facebook Integration Now up.
|