Robust
Well-known member
I don't think my controller is loading properly
Error:
If I throw my function directly into XenForo_ControllerPublic_Member it works fine. Outside of that, I get that error.
Listener:
Error:
The following error occurred:
The controller XenForo_ControllerPublic_Member does not define an action called Userslike.
If I throw my function directly into XenForo_ControllerPublic_Member it works fine. Outside of that, I get that error.
Code:
class newProfileTabs_Extend_ControllerPublic_Member extends XFCP_newProfileTabs_Extend_ControllerPublic_Member
{
public function actionUsersLike()
{
$userId = $this->_input->filterSingle('user_id', XenForo_Input::UINT);
$user = $this->getHelper('UserProfile')->assertUserProfileValidAndViewable($userId);
$users_likes = $this->getModelFromCache('newProfileTabs_Model_newProfileModel')->getAllGivenLikesByUser($userId, '10');
return $this->responseView(
'newProfileTab_ViewPublic_Member_UsersLike', 'newProfileTab_ourTab_content',
array('user' => $user, 'users_likes' => $users_likes)
);
}
}
Listener:
Code:
public static function load_controller($class, array &$extend)
{
if ($class == 'XenForo_ControllerPublic_Member')
{
$extend[] = 'newProfileTabs_Extend_ControllerPublic_Member';
}
}