public function actionIndex()
{
if ($mediaID = $this->_input->filterSingle('action_id', XenForo_Input::UINT))
{
return $this->responseRedirect(XenForo_ControllerResponse_Redirect::SUCCESS, XenForo_Link::buildPublicLink('media/media', array('media_id' => $mediaID)));
}
$this->canonicalizeRequestUrl(XenForo_Link::buildPublicLink('media'));
$options = XenForo_Application::get('options');
$viewParams = array(
'perms' => $this->perms,
'trendingMedia' => $this->getModelFromCache('EWRmedio_Model_Lists')->getMediaList(1, $options->EWRmedio_trendingcount, array('sort' => 'trending')),
'recentMedia' => $this->getModelFromCache('EWRmedio_Model_Lists')->getMediaList(1, $options->EWRmedio_recentcount, array('sort' => 'date')),
'popularMedia' => $this->getModelFromCache('EWRmedio_Model_Lists')->getMediaList(1, $options->EWRmedio_popularcount, array('sort' => 'popular')),
'trendingPlist' => $this->getModelFromCache('EWRmedio_Model_Playlists')->getPlaylists(1, $options->EWRmedio_trendingplist, array('sort' => 'trending')),
'recentPlist' => $this->getModelFromCache('EWRmedio_Model_Playlists')->getPlaylists(1, $options->EWRmedio_recentplist, array('sort' => 'date')),
'popularPlist' => $this->getModelFromCache('EWRmedio_Model_Playlists')->getPlaylists(1, $options->EWRmedio_popularplist, array('sort' => 'popular')),
'sidebar' => $this->getModelFromCache('EWRmedio_Model_Parser')->parseSidebar(),
);
return $this->responseView('EWRmedio_ViewPublic_Media', 'EWRmedio_Media', $viewParams);
}