Not signed in (Sign In)

Categories

Vanilla 1.1.4 is a product of Lussumo. More Information: Documentation, Community Support.

Help keep Vanilla free:
Welcome Guest!
Want to take part in these discussions? If you have an account, sign in now.
If you don't have an account, apply for one now.
    • CommentAuthorrYno
    • CommentTimeSep 15th 2005 edited
     # 1
    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);
    •  
      CommentAuthorlech
    • CommentTimeSep 15th 2005
     # 2
    eww, font tags
    •  
      CommentAuthornathan
    • CommentTimeSep 15th 2005
     # 3
    :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.
Add your comments
    Username Password
  • Format comments as