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

XF 1.3 Custom BB Code Php Callback

Discussion in 'Styling and Customization Questions' started by katsulynx, Feb 26, 2014.

  1. katsulynx

    katsulynx Well-Known Member

    When I interpret the description (This callback will receive these parameters: array $tag, array $rendererStates, XenForo_BbCode_Formatter_Base $formatter.) correct, the Php class gets those three parameters handed over. So I guess it needs to take them as input logically, but which of them exactly includes which details?
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    What are you trying to do?

    Those parameters will be function parameters for whatever callback function you specify.
  3. katsulynx

    katsulynx Well-Known Member

    I just tried to get the right information of the input BB-Code, e.g. how [bbcode]001[/bbcode] is handed over to the php-File. Figured out it seems to be all stored in the $tag variable. $tag['tag'] is the BB-Code string, e.g. 'bbcode', $tag['option'] seems to be an array to hand over the related options if available, $tag['original'] contains two strings, in this case '[bbcode]' and '[/bbcode]' and $tag['children'] seems to have the value between the bbcode-bracelets, e.g. 001.
    sheel likes this.

Share This Page