How to show a forum in a page

How to show a forum in a page

I would love to see an update to this resource. It doesn't do the trick anymore...
Actually, I think the new "xfrocks widget nodes pages" and the new widgets that can show detailed threads info might be an alternative that does the same.
 
Changed line 25 to get around the missing $controllerName but am now getting an array_slice error

New Line 25
PHP:
$controllerForum->preDispatch('index', 'XenForo_ControllerPublic_Forum');

Line still giving error (line 38):
PHP:
$controllerResponse->params['threads'] = array_slice($controllerResponse->params['threads'], 0, $threadsToShow - 1);

Can comment out the above line and all is well .. otherwise .. get this error.

Code:
XenForo_Application::handlePhpError()
array_slice() in ShowResearchNotes.php at line 38
ShowResearchNotes::showResearchNotesInPage()
call_user_func_array() in XenForo/ControllerPublic/Page.php at line 46
XenForo_ControllerPublic_Page->actionIndex() in XenForo/FrontController.php at line 337
XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 134
XenForo_FrontController->run() in /path/community/index.php at line 13
@LPH Have you solved this error?

Regards, Luis.
 
Tutorial is updated to work on XenForo 1.2.x.

Changes:

Line 25:
Code:
$controllerForum->preDispatch('index');
to:
Code:
$controllerForum->preDispatch('forum', get_class($controllerForum));

Line 28:
Code:
$controllerResponse = $controllerForum->{'actionIndex'}();
to
Code:
$controllerResponse = $controllerForum->{'actionForum'}();
 
Top Bottom