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

Imported conversations

Discussion in 'XenForo Questions and Support' started by PeterT, Feb 19, 2011.

  1. PeterT

    PeterT Active Member

    I am in the process of completing the setup of my imported MyBB forum.

    I and other users have many many old private conversations, is there a way of deleting these en mass rather then clicking them one at a time and then clicking Leave Conversation.
     
  2. Brogan

    Brogan XenForo Moderator Staff Member

    You can run a query/empty the table to delete them all, if you're comfortable doing so.
    I would need to check which tables are involved, as there are several tables related to conversations.

    I actually ran the query on my old (phpBB) forum before importing.
     
    Umit likes this.
  3. PeterT

    PeterT Active Member

    I wish I had [​IMG]

    I know how to run a query in phpmyadmin but alas not how to construct it.
     
  4. Brogan

    Brogan XenForo Moderator Staff Member

    I haven't tested this so please take a backup first and test it on your local installation.

    There are 4 tables related to conversations so if you empty/truncate those, in theory it should work:

    The tables are:
    xf_conversation_master
    xf_conversation_message
    xf_conversation_recipient
    xf_conversation_user

    My good friend Jake also suggested you may need to run this query:
    UPDATE xf_user SET conversations_unread = 0

    You might need to run a cron task or update the cache afterwards but I shouldn't think so.

    I'll do some testing on my local installation to see what the effect is.
     
    maszd, StRonK and Umit like this.
  5. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    I just did a quick test and these queries work for deleting all personal conversations. You can paste these queries into phpmyadmin:

    Code:
    TRUNCATE TABLE xf_conversation_master;
    TRUNCATE TABLE xf_conversation_message;
    TRUNCATE TABLE xf_conversation_recipient;
    TRUNCATE TABLE xf_conversation_user;
    UPDATE xf_user SET conversations_unread = 0;
    
    Backup first just in case. My test was successful but I might have missed something.
     
    maszd, Nicky, StRonK and 2 others like this.
  6. PeterT

    PeterT Active Member

    will backup and give it a go, thanks.
     
  7. PeterT

    PeterT Active Member

    Wow you guys are good worked a treat, thank you.
     
  8. PeterT

    PeterT Active Member

    5 minutes and I am going online.

    A big thanks to Floris at XenFans.com for the import and you guys with the SQL.
     
    Fuhrmann likes this.
  9. Floris

    Floris Guest

    Hey PeterT, I am glad we were able to help you convert away from mybb to xenforo. Enjoy the new board!
     
    Fuhrmann likes this.
  10. kilcher

    kilcher Active Member

    Hopefully you warned people before deleting all of their private messages. :)

    Mind sharing your link so that we can look at your new forum? :)
     
  11. PeterT

    PeterT Active Member

    Fuhrmann likes this.
  12. Bellinis

    Bellinis Active Member

    I would like to delete a member's conversations older than x days. How can I do that?
     
  13. Eagle

    Eagle Well-Known Member

    Thank you Jake.. But we will wait for another "older than X days" SQL Query :p
     
  14. motowebmaster

    motowebmaster Active Member

    Is this still good for xf 1.5 ?
     
  15. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Yes.
     
  16. NURV

    NURV Member

    Hi,

    How could I delete all conversations with the same title? I sent out a mass message and forgot to check the box for leaving the conversation. Now I have a ton of clutter. How can I just delete these completely?

    Thanks!
     
  17. Amaury

    Amaury Well-Known Member

    Just select all the conversations and leave them:

    Convo.PNG
     
    NURV likes this.
  18. NURV

    NURV Member

    Hi @Amaury, I'm aware of that but there are thousands of conversations. It will take me a day to do it that way.
     

Share This Page