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

Attachments break if I call the parent?

Discussion in 'XenForo Development Discussions' started by Liam W, Jun 12, 2013.

  1. Liam W

    Liam W Well-Known Member

    Ok, this is a new one!

    In my latest signature addon, if I call the parent attachments break (the images don't embed).

    If I remove the parent call, the images suddenly embed! This is very strange, wondering if anyone had any ideas?

    This is the class I am overriding (with my code):


    class UDS_ViewPublic_Thread_View extends XFCP_UDS_ViewPublic_Thread_View
        public function 
    $bbCodeParser = new XenForo_BbCode_Parser(XenForo_BbCode_Formatter_Base::create('Base', array('view' => $this)));
    $bbCodeOptions = array(
    'states' => array(
    'viewAttachments' => $this->_params['canViewAttachments']
    UDS_ViewPublic_Helper_Message::bbCodeWrapMessages($this->_params['posts'], $bbCodeParser$bbCodeOptions);

    And that's that. If I remove the first line of the function, attachments work...

Share This Page