XF 2.0 How to show custom page in profile page?

grantus

Active member
I'm having an issue with the profile pages. In Xenforo 1, I had an extra tab before "profile posts" and it showed a custom PHP page I had created.

I used this in my addon code:

Code:
class Test_Listener {
    public static function templateHook($hookName, &$contents, array $hookParams, XenForo_Template_Abstract $template) {
        
        if ($hookName == 'member_view_tabs_content') {    
            ob_start();
            require_once('/path/to/test.php');
            $contents .= '<li id="test" class="profileContent">'.ob_get_contents().'</li>';
            ob_end_clean();
        }

    } // end public static function templateHook
} // end class Test_Listener

The problem is I have no clue how to go about this for Xenforo 2. I have my custom page ready to go, it's just the profile page tabs that have me stumped.

Any help would be appreciated! Thanks.
 
Top Bottom