I have made a plugin that show all last threads in all forums, for the current user.
So first, I get all viewables node list from the current user, but there is an issue with this list.
In the list, I have node id which are private node.
I don't understand why.
So, user are can see thread TITLE in private node, but can't see thread CONTENT (has I want).
How can I do, to don't get this private node in the list please ?
Here my code :
$node_model = XenForo_Model::create('XenForo_Model_Node'); $nodes = array_keys($node_model->getViewableNodeList()); $thread_model = XenForo_Model::create( 'XenForo_Model_Thread' ); $last_posts = $thread_model->getModelFromCache('XenForo_Model_Thread')->getThreads(array( 'discussion_state' => 'visible', 'not_discussion_type' => 'redirect', 'deleted' => false, 'moderated' => false, 'node_id' => $nodes ), array( 'limit' => $limit, 'order' => 'post_date', 'orderDirection' => 'desc', 'join' => XenForo_Model_Thread::FETCH_USER ));
50.6 KB Views: 2
11.8 KB Views: 2
12.6 KB Views: 2
26.1 KB Views: 1
25.1 KB Views: 1