• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Script to use Datawriter to auto-create threads


Active member
Hi, I'm looking to create some sort of script to help me create threads using Datawriter. Can someone point me to some documentation to help me out?

Daniel Hood

Well-known member
Currently the only documentation I can think of is the commenting and code in these three files:


Daniel Hood

Well-known member
$threadWriter = XenForo_DataWriter::create('XenForo_DataWriter_Discussion_Thread');
$threadWriter->set('title', "New Thread");
$threadWriter->set('message', "Content of thread.");
or something like that, I don't have the DataWriter open to check variable names.


Formerly Nobita.Kun
View this function: XenForo_ControllerPublic_Forum::actionAddThread You will get more and more information when try to using script for creating new thread ;)