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

XF 1.5 Custom BB Code php callback class & function definition

Discussion in 'XenForo Questions and Support' started by v8td, Apr 1, 2016.

Thread Status:
Not open for further replies.
  1. v8td

    v8td Member


    Where i can define the new class and function for PHP Callback?

    Please explain me this help line:
    "This callback will receive these parameters: array $tag, array $rendererStates, XenForo_BbCode_Formatter_Base $formatter."

    - $tag = is the tag of the custom bb code? ... So i can define a generic "handler" class, and function where i use if..else if like: ... if($tag == "myPhoto"){//php code}... else if($tag == "myTable"){//php code}) ?

    I must echo the $result, or just use return $result from function?

    - what is $redererStates and $formatter?

    - how to pass parameters? As json?
    - can i define as many params as i need?

    Some example for a more complicated custom bb code?

    I hope i posted this question in right place.
  2. Brogan

    Brogan XenForo Moderator Staff Member

    Please do not cross post the same questions multiple times.

    You have already posted this in the relevant forum.
Thread Status:
Not open for further replies.

Share This Page