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

XF 1.5 How To Add Content to Conversation Based On Recipients

Discussion in 'Styling and Customization Questions' started by Dan Allen, Nov 13, 2015.

  1. Dan Allen

    Dan Allen Active Member

    My boss and I talk privately in conversations. Can you image if we were talking privately forgetting to check if someone else is in the conversation? Like I did today. Good thing I was only making a jerk of myself and not saying something that would have given false impressions.

    Here is what we want to do. If the conversation is just the two of us, set the border to each message to something we cannot miss.

    So I am looking at the template for conversation messages. How do we test the recipient list from within there? I am delighted to see the recipient field in the conversations table is blob format. Is there a way to issue commands for reading those blogs from within templates.
    Is there a way to issue any database commands from within templates?

    Thank you.
  2. Brogan

    Brogan XenForo Moderator Staff Member

    Have a look at the conversation_recipients template.

    That has the $recipients array which includes the user IDs of all of the participants in the conversation.

    You should be able to create a conditional statement based on that.
    Dan Allen likes this.
  3. Dan Allen

    Dan Allen Active Member

    thank you, I can understand this in principle.

    I see the loop
    I need to chew on this a little.
    Is there language reference for the code in templates?
  4. Brogan

    Brogan XenForo Moderator Staff Member

    Dan Allen likes this.

Share This Page