Script to use Datawriter to auto-create threads

NeoCHI

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?
 
Currently the only documentation I can think of is the commenting and code in these three files:

library/XenForo/DataWriter.php
library/XenForo/DataWriter/Discussion.php
library/XenForo/DataWriter/Discussion/Thread.php
 
PHP:
$threadWriter = XenForo_DataWriter::create('XenForo_DataWriter_Discussion_Thread');
$threadWriter->set('title', "New Thread");
$threadWriter->set('message', "Content of thread.");
$threadWriter->save();

or something like that, I don't have the DataWriter open to check variable names.
 
View this function: XenForo_ControllerPublic_Forum::actionAddThread You will get more and more information when try to using script for creating new thread ;)
 
Top Bottom