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.
Options

BBcode extension help

edited September 2005 in Vanilla 1.0 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);

Comments

  • Options
    lechlech Chicagoland
    eww, font tags
  • Options
    :P, Yeah. I have no idea why it is spitting that out. I can't look at it now, but I will have a play around with it this afternoon. Sorry I can't be of more help now.
This discussion has been closed.