how to add variable to viewparams

Thanks alots

-does this mean I dont need to extend forum controller?how to select the place of code execution?
you need to extend it, BUT you don't need to run
PHP:
 $visitor = XenForo_Visitor::getInstance();
        $visitorId = XenForo_Visitor::getUserId();
        $forumId = $this->_input->filterSingle('node_id', XenForo_Input::UINT);

        $ftpHelper = $this->getHelper('ForumThreadPost');
        $forumFetchOptions = array('readUserId' => $visitor['user_id']);
        $forum = $ftpHelper->assertForumValidAndViewable($forumId ? $forumId : $forumName, $forumFetchOptions);

        $forumId = $forum['node_id'];
 
Top Bottom