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

DataWriter Forum

R

ragtek

Guest
#2
Ups.
Sorry, i've completly forgotten on you :(

That's the helper i'm using for this (with minimal infos)
PHP:
    public static function createForum($forumName, $parentId = 0){
        $dw = XenForo_DataWriter::create('XenForo_DataWriter_Forum');
        $dw->set('title', $forumName);
        $dw->set('node_type_id', 'Forum');
        $dw->set('parent_node_id', $parentId);
        $dw->save();

        return $dw->getMergedData();
    }