I have a class that extends XenForo_Model_Forum, the method actionAddThread.
Unfortunately, I can not in my class to get a ID of new thread except from the
Well, in principle, it can be used. But what if $response provides a link to the forum, not a new thread:
A fully copy of the actionEdit XenForo_ControllerPublic_Thread - is not correct.
What are some ways to get the ID of new thread that you just created?
Unfortunately, I can not in my class to get a ID of new thread except from the
Code:
public function actionAddThread()
{
$response = parent::actionAddThread();
$threadLink = $response->redirectTarget;
...
Code:
if (!$this->_getThreadModel()->canViewThread($thread, $forum))
{
$return = XenForo_Link::buildPublicLink('forums', $forum, array('posted' => 1));
}
else
{
$return = XenForo_Link::buildPublicLink('threads', $thread);
}
What are some ways to get the ID of new thread that you just created?