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

Creating Threads with the DataWriter

Discussion in 'XenForo Development Discussions' started by ragtek, Oct 7, 2010.

  1. ragtek

    ragtek Guest

    I'm using this code to create a thread:
    $writer XenForo_DataWriter::create('XenForo_DataWriter_Discussion_Thread');
    $postWriter $writer->getFirstMessageDw();

    $thread $writer->getMergedData();
    It's working nice, but it doesn't update the Forum Statistics.
    What's missing here?

    Attached Files:

    RastaLulz and Tomble like this.
  2. dmnkhhn

    dmnkhhn Active Member

    Take a look at library/XenForo/Model/Counters.php - from what I see this model is responsible for the statistics. :)
  3. g0rn

    g0rn Well-Known Member

    It is updated by the cron entry "Rebuild Board Totals Counter"
  4. Kier

    Kier XenForo Developer Staff Member

    Create a thread then wait a few minutes for the rebuild to be scheduled.
  5. ragtek

    ragtek Guest


    took some time but now they are up2date

    So i don't need to add something to my code.

    First "real Add-on" finished.
    alexD likes this.

Share This Page