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

get all attachments in a thread?

Discussion in 'XenForo Development Discussions' started by Neuro, Nov 9, 2014.

  1. Neuro

    Neuro Member

    I'm looking through the attachment models and the xf_attachment* databases, and I'm a little confused.

    Do I have to go through each post in a thread to call getAttachmentsByContentId to collect all attachments?

    I'm trying to gather all attachments in a thread and show them in a little area above a thread.
     
  2. Aayush

    Aayush Well-Known Member

    I think probably you should get all the posts in a thread and then search the attachments table with these post ids
     
  3. Neuro

    Neuro Member

    thank you. i'm looking through the thread model to see if i can find something that'll return all posts.
     
  4. Neuro

    Neuro Member

    ahh nevermind. i found it in the post model.

    thank you!
     
    Aayush likes this.

Share This Page