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

bbCodeWrapper and attachments?

Discussion in 'XenForo Development Discussions' started by HDJuegos, Jan 29, 2011.

  1. HDJuegos

    HDJuegos Active Member

    I have a problem to render attachments in my Add-on. I have the next code in ViewPublic

    PHP:
    $bbCodeParser = new XenForo_BbCode_Parser(XenForo_BbCode_Formatter_Base::create('Base', array('view' => $this)));
                        
    $bbCodeOptions = array(
                        
    'states' => array(
                            
    'viewAttachments' => true
                        
    )
                    );
    $this->_params['newcontent']['HTML'] = new XenForo_BbCode_TextWrapper($this->_params['newcontent']['content'], $bbCodeParser$bbCodeOptions); 

    In the template all bbcode works fine, but attachments show that link:

    "view attachment 667" . If you click, you go to JPG.

    The problem is, how can i render it to make viewable as a post?.

    Thanks in advance
     

Share This Page