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

Bot - Creating new Threads?

Discussion in 'XenForo Development Discussions' started by keving, Dec 6, 2010.

  1. keving

    keving Member

    I need to add some Threads wich not generated by Users.
    Is there an easy way without being modify SQL Tables?
    We currently have an Bot wich posts Threads in vB over SQL. We need this on xenforo ;)

    Hope anybody can help me ;)

    greets Kevin
  2. ragtek

    ragtek Guest

    I've coded a little helper for me.
    Everybody is allowed to use it if he wants^^
    class Ragtek_Helper_DataWriter
         * Helper for XenForo Thread Datawriter to create a thread
         * @param array $user
         * @param <int> $forumId
         * @param <str> $subject
         * @param <str> $message
         * @return <array> Thread Information
    static public function createThread($user$forumId$subject$message)
    $writer XenForo_DataWriter::create('XenForo_DataWriter_Discussion_Thread');
    $postWriter $writer->getFirstMessageDw();

    You can see it here in action http://xenforo.com/community/threads/ragtek-contact-thread.5521/
  3. keving

    keving Member

Share This Page