I originally posted in this thread: http://xenforo.com/community/thread...-a-callback-for-pages.7226/page-5#post-498765
--
I know this is an old thread, but I can't find anything else (unless someone has a link?).
I've got my class setup in /library/PGMemberList/PageCallback/Members.php and I'm just using the example code from the video at the moment, modified with my class name:
My template file just has a foreach loop of the user title as in the video.
But I can't save the page in the ACP when I enter the class name and method? Looking at the XHR request the page makes, the server responds with Internal Server Error 500.
I've also edited the database page entry with my class name and method, but then the resulting page node just shows up blank. Even with debug mode on for my IP Address I don't get any information about the error.
Any ideas?
--
I know this is an old thread, but I can't find anything else (unless someone has a link?).
I've got my class setup in /library/PGMemberList/PageCallback/Members.php and I'm just using the example code from the video at the moment, modified with my class name:
Code:
<?php
class PGMemberList_PageCallback_Members {
public static function respond(XenForo_ControllerPublic_Abstract $controller, XenForo_ControllerResponse_Abstract $response)
$userModel = $controller->getModelFromCache('XenForo_Model_User');
$response->params['users'] = $userModel->getLatestUsers(array(), array('limit' => 5));
$response->templateName = 'pgmember_list';
}
}
My template file just has a foreach loop of the user title as in the video.
But I can't save the page in the ACP when I enter the class name and method? Looking at the XHR request the page makes, the server responds with Internal Server Error 500.
I've also edited the database page entry with my class name and method, but then the resulting page node just shows up blank. Even with debug mode on for my IP Address I don't get any information about the error.
Any ideas?