Having problems putting PHP into a page

Matthew Hawley

Well-known member
This is the html I put in the page
Code:
<div class="baseHtml messageText">
{xen:raw $cssMinify}
</div>

This is my PHP file in /library/XenForo/Pages/CSSMinifier.php
Code:
<?php

class XenForo_Pages_CSSMinifier

{

    public static function includeFile(XenForo_ControllerPublic_Abstract  $controller, XenForo_ControllerResponse_Abstract &$response)

    {

        ob_start();

        require('/forums/CSSMinifier/gui/index.php');

        $myContent = ob_get_contents();

        ob_end_clean();

        $params = array(

            'myContent'  => $cssMinify

        );

        $response->params = array_merge(

            $response->params,

            $params

        );

    }

}

All I'm getting is a blank page. Any suggestions?
 
Last edited:
is debug mode on? I would like to think the callback is wrong on your page node, but you'd have got an error on the admin end when trying to save. I haven't done this in a while. You should try using routes now. I think it's within your capabilities to go outside of pages. If you need help with that give me a PM and I'll try to walk you through.
 
is debug mode on? I would like to think the callback is wrong on your page node, but you'd have got an error on the admin end when trying to save. I haven't done this in a while. You should try using routes now. I think it's within your capabilities to go outside of pages. If you need help with that give me a PM and I'll try to walk you through.

Yes debug mode is on.
 
Back
Top Bottom