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

XF 1.3 Adding more than one option to a BBcode

Discussion in 'XenForo Questions and Support' started by dmurphy, Jun 5, 2014.

  1. dmurphy

    dmurphy Member

    Hello,

    I am creating a custom BBcode using the BBcode manager in XenForo. However I need to have more than one option in the bbcode.

    For instance [bbcode id="50" color="75]

    Is this possible?
     
  2. Chris D

    Chris D XenForo Developer Staff Member

    It's not possible using a simple replacement.

    Using a PHP callback you can use PHP to split the option into different parts, just like the default QUOTE bb code:
    [QUOTE="dmurphy, post: 775798, member: 67106"]
     
  3. dmurphy

    dmurphy Member

    Ahh yeah that is what I was thinking if I could not do it with a simple replace. Thanks for the help.
     
  4. Chris D

    Chris D XenForo Developer Staff Member

    If you look at the file:

    library/XenForo/BbCode/Formatter/Base.php and look for the function renderTagQuote you will see an example of how the option string is split into multiple options.
     
    dmurphy likes this.

Share This Page