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

HTML to BBCODE and BBCODE to HTML

Discussion in 'XenForo Development Discussions' started by Zephyr, Feb 1, 2015.

  1. Zephyr

    Zephyr Well-Known Member

    Hello, I would like know the class names available (and recommended) method for convert html to bbcode and bbcode to html with Xenforo Model please.

    Currently I have that when I push html inside xenforo database from external website:
    [​IMG]

    I need a solution for convert my html in xenforo bbcode before store my message inside the xenforo database.

    Thanks.
     
  2. lol768

    lol768 Active Member

    BBCode to HTML:

    Something like this?
    PHP:
    $formatter = \XenForo_BbCode_Formatter_Base::create();
    $parser = new \XenForo_BbCode_Parser($formatter);
    $html $parser->render($bbCode);
     
    maitandat1507 and LPH like this.
  3. maitandat1507

    maitandat1507 New Member

    Can you explain clearly about that? @lol768
    Thank you very much!
     

Share This Page