1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.4 How to create simple custom bbcode

Discussion in 'XenForo Questions and Support' started by NeoCHI, Mar 14, 2015.

  1. NeoCHI

    NeoCHI Active Member

    I'm trying to create a simple bbcode where I can do something like:
    [bbcode=123 myoption=123 myoption2=123][/bbcode]
    and have this show as some html but able to use the three numbers as part of the html and the two options are optional.

    I know I need to use the Option Match Regular Expression, but I can seem to get it to work.
  2. Mike

    Mike XenForo Developer Staff Member

    A custom BB code only has one option -- anything after the first equals. In your example, this would be "123 myoption=123 myoption2=123". If you want to split this up to access the parts separately, you need to use a PHP callback.

Share This Page