Jamie Corcoran
Member
I'm trying to make a custom dynamic page on my forum using my own plugin but it only works locally.
I exported the plugin to my website and installed it but now I get this error (when I put the site in debug mode):
This is the code that I'm using.
Does anyone know what's wrong?
I exported the plugin to my website and installed it but now I get this error (when I put the site in debug mode):
Code:
The controller LIGLivestream_ControllerPublic_Livestream does not define an action called Index.
This is the code that I'm using.
Route Prefix: LiveStreams
Route Type: Public
Route Class: LIGLivestream_Route_Prefix_LiveStreams
Use class to build link: Always
PHP:
<?php
class LIGLivestream_Route_Prefix_LiveStreams implements XenForo_Route_Interface
{
public function match($routePath, Zend_Controller_Request_Http $request, XenForo_Router $router)
{
$controllerName = 'LIGLivestream_ControllerPublic_Livestream';
$routeName = 'LiveStreams/';
return $router->getRouteMatch($controllerName, 'index', $routeName, $routePath);
}
}
PHP:
<?php
class LIGLivestream_ControllerPublic_Livestream extends XenForo_ControllerPublic_Abstract
{
public function actionIndex()
{
$visitor = XenForo_Visitor::getInstance();
$sessionModel = $this->getModelFromCache('XenForo_Model_Session');
$onlineUsers = $sessionModel->getSessionActivityQuickList(
$visitor->toArray(),
array('cutOff' => array('>', $sessionModel->getOnlineStatusTimeout())),
($visitor['user_id'] ? $visitor->toArray() : null)
);
$boardTotals = $this->getModelFromCache('XenForo_Model_DataRegistry')->get('boardTotals');
if (!$boardTotals)
$boardTotals = $this->getModelFromCache('XenForo_Model_Counters')->rebuildBoardTotalsCounter();
$viewParams = array(
'onlineUsers' => $onlineUsers,
'boardTotals' => $boardTotals
);
return $this->responseView('IGLivestream_ViewPublic_LiveStreams', 'EP_LiveStreams', $viewParams);
}
}
Does anyone know what's wrong?