Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
BBcode extension help
I added the extra BBcode functionality from the extensions page, but the one thing that is erking me is the "font" tag for [ color]. I mean everything is compliant but that.
so this is the original
$String = preg_replace("/\[color\=(.+?)\](.+?)\[\/color\]/","<font color=\"$1\">$2</font>",$String);
And so far i've changed it to this, but it's giving me a wierd code readout.
$String = preg_replace("/\[color\=(.+?)\](.+?)\[\/color\]/","<span style=\"color:\"$1;\">$2</span>",$String);
when I do that the html output is:
<span style="" red="">color</span>
So would any preg_replace expert like to tell my why I'm getting that error? lol.. thanks
---
Also - I added [s] as a strike through as I needed that on my forum.
$String = preg_replace("/\[s\](.+?)\[\/s\]/","<span class=\"strike\">$1</span>",$String);
0
This discussion has been closed.
Comments