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

Question about the page view ($this->_view) in the Bb Codes Formatter class

Discussion in 'XenForo Development Discussions' started by cclaerhout, Mar 6, 2013.

  1. cclaerhout

    cclaerhout Well-Known Member

    Since the XenForo developers are back to work, I've got two questions for them (or any developers who would have the answer of course). In the Formatter class, we can see for example this code (except the php comment):

            if ($this->_view)
    $template $this->_view->createTemplateObject('bb_code_tag_php', array(
    'content' => $content
    return '<div style="margin: 1em auto" title="PHP">' $content '</div>';
    In which case the page view ($this->_view) is not available when the formatter is called? Is it with mail templates? When the fallback is needed?

    Edit: I forgot to write my second question... :coffee:
    What was the purpose of this line which makes me crazy when I was trying to update TinyMCE:
    tinyMCE.dom.Event._pageInit(window); // for ajax loads
    There's no reference anywhere on the TinyMCE forum or anywhere else. I didn't find any problem with ajax loads. Was it a problem with some former browsers?
  2. havanaclub

    havanaclub Member

    The templates are also not available in the acp
    cclaerhout likes this.
  3. cclaerhout

    cclaerhout Well-Known Member

    I don't understand. The "view page" is available in the administration too.
  4. havanaclub

    havanaclub Member

    No, the needed templates doesn't exist as admin templates (e.g. quote,bb_code_XXXX)
    It's also commented in XenForo_ViewAdmin_Feed_Preview

    // don't pass a view to this, because the templates don't exist in the admin
    $bbCodeParser = new XenForo_BbCode_Parser(XenForo_BbCode_Formatter_Base::create('Base'));
    cclaerhout likes this.
  5. cclaerhout

    cclaerhout Well-Known Member

    Oh ok !!! It makes sense. Thanks. So if the view is not available it's a choice and there is no way to recreate a copy in the admin template.

Share This Page