1. 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

Discussion in 'XenForo Development Discussions' started by NeoCHI, Sep 13, 2013.

  1. NeoCHI

    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?
  2. Daniel Hood

    Daniel Hood Well-Known Member

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

  3. NeoCHI

    NeoCHI Active Member

    How about a simple example of a script that'll create a thread with some text as it's message.
  4. Daniel Hood

    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.
  5. Nobita.Kun

    Nobita.Kun Well-Known Member

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

Share This Page