Caro Visitante, por que não gastar alguns segundos e criar uma Conta no Fórum Valinor? Desta forma, além de não ver este aviso novamente, poderá participar de nossa comunidade, inserir suas opiniões e sugestões, fazendo parte deste que é um maiores Fóruns de Discussão do Brasil! Aproveite e cadastre-se já!
$writer = XenForo_DataWriter::create('XenForo_DataWriter_Discussion_Thread');
$writer->set('user_id', $visitor['user_id']);
$writer->set('username', $visitor['username']);
$writer->set('title', $input['subject']);
$postWriter = $writer->getFirstMessageDw();
$postWriter->set('message', $input['message']);
$writer->set('node_id', $forumId);
$writer->preSave();
$writer->save();
$thread = $writer->getMergedData();
return $this->responseRedirect(
XenForo_ControllerResponse_Redirect::SUCCESS,
$this->getDynamicRedirect(),
new XenForo_Phrase('your_message_has_been_sent')
);