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

Set IP Address on new thread/post

Discussion in 'XenForo Development Discussions' started by Jafo, Aug 19, 2014.

  1. Jafo

    Jafo Active Member

    Consider:

    Code:
    $writer = XenForo_DataWriter::create('XenForo_DataWriter_Discussion_Thread');
    
            $writer->set('user_id', $user['user_id']);
    
                $writer->set('username', $user['username']);
    
                $writer->set('discussion_open', 0);
    
            $writer->set('title', $row['subject']);
    
            $writer->set('view_count', $row['views']);
                     
            $postWriter = $writer->getFirstMessageDw();
    
            $postWriter->setOption(XenForo_DataWriter_DiscussionMessage::OPTION_IS_AUTOMATED, true);
    
                $postWriter->set('message', $post['message']);
     
                $writer->set('node_id', $forumid);
    
                    $writer->preSave();
    
                    $writer->save();
    
                    $thread = $writer->getMergedData();
    
    How would I set the IP for this first post?
     
  2. Jafo

    Jafo Active Member

    Nobody eh? :)
     

Share This Page