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

'DataWriter_Discussion_Thread' error

Discussion in 'XenForo Development Discussions' started by Mr. Goodie2Shoes, May 28, 2012.

  1. Mr. Goodie2Shoes

    Mr. Goodie2Shoes Well-Known Member

    okay, so I made this add-on: http://xenforo.com/community/resources/xensocialize-by-xencode.763/
    whose main objective is to send a tweet whenever someone creates a thread... but it seems like it's also triggered when someone 'moderates' the thread (e.g. moving the thread to a different forum, deleting the thread etc...), the error has been posted by stewart1champ here: http://xenforo.com/community/threads/xensocialize-by-xencode.32084/#post-366691

    and I am totally confused on what should I do next... any kinda help is welcomed :)
     
  2. ragtek

    ragtek Guest

    You can use $this->isInsert() inside your DW (and also check the message_state)

    e.g that's from my automatic facebook notifier:
    PHP:
    if ($this->get('message_state') == 'visible')
    {
    if (
    $this->isInsert() || $this->getExisting('message_state') == 'moderated')
    {
    // todo move this from core to seperate add-on
    Ragtek_FacebookCore_Helper::postOnUserProfile($post);
     
    CurveGotti and Mr. Goodie2Shoes like this.
  3. Mr. Goodie2Shoes

    Mr. Goodie2Shoes Well-Known Member

    woohoo... it works! :D
     

Share This Page