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

Render HTML (not in template)

Discussion in 'XenForo Development Discussions' started by silence, Aug 26, 2013.

  1. silence

    silence Well-Known Member

    So I'm writing html to an output in the XF data folder. Now I want to get that output and send it as a viewParam to the template. The way I'm doing it successfully is as follows:

            $helper = new Teamspeak_Helper_Information();
    $account = new XenForo_ControllerHelper_Account($this);

    $options XenForo_Application::get('options');
    $path XenForo_Application::get('config')->externalDataPath;
    $path $options->boardUrl '/' $path '/teamspeak/viewer.html';

    $viewParams = array(
    //'viewer' => $helper->teamspeakViewer()
    'viewer' => file_get_contents($path)

    However this is extremely clunky and slow. What would a much more optimized way of doing this be since I can't think of a way D:

Share This Page