I need to create something super simple where users can communicate back and forth with each other. I’m not looking for an actual online forum like this, so Wix Forums is a no-go.
Just a super simple, send and receive messages.
My website allows for users to sign up for projects. So, once they sign up for a project I need to have some sort of chat where they can communicate with the project manager or other people on the project.
I agree with Manny. I still haven’t found a serviceable solution for this. App Market is pretty lackluster. To be honest, something like the HTML component messaging demonstration would work for me: Velo: Working with the HTML iframe Element | Help Center | Wix.com.
I just need something that allows my users to chat amongst themselves, not necessarily with the site owner.
Ideally, it will be a solution that does not involve HTML, just because that is not easily customizable, and is somewhat burensome to use, especially for those of us who have learned code from Wix Code and not traditional HTML/CSS.
Hi Alexey – I think your solution is a little more complex than what I am looking for.
Manny – I realized that you can just code out a very basic messenger in Wix using repeaters. I created a Messages dataset, with three fields “Message”, “User”, “Thread”. Then you can code it to populate the repeater with message content from each “thread” and also pull in user information if necessary. That’s the quick and dirty but it works like a charm as a back and forth messenger between uesrs.
You’ll need to have a decent understanding of coding to make this work. But if you have some experience coding this should be able to get you started. I’ve attached a photo of what it looks like. It’s just a simple repeater, then I populate all the necessary information with code (see below).
In my code, where I have application_id, you can think of that as the particular chat thread. So, it’s a dynamic page for each “thread”, and when the page loads I query my message database based on the particular thread. Then push that message data into the repeater. The rest of the code is just formatting and aesthetics.
This conversation is only view able to certain groups of people, which is why I have it set to a dynamic page and then also am defining the DynamicItem. For example, let’s say I am running a school website, that has 3 different classes. Biolology, Math, English. Each class has a different conversation or messaging window. So, I have 3 different dynamic pages for each class, then in the code I am getting the dynamic ID for that particular class, then querying any messages that have been posted. Logically the code works as such:
What is the ID of the class? (Biology)
Query for any messages that pertain to Biology (Bio Messages)
Sort those messages in order
Use the Member ID in the Bio Messages to Query my member database and pull in their info, like profile photos and names.
Place those Bio Messages in the repeater
Done.
The setChat function is just my personal organizational preference for writing code. I don’t like having all of it together in the onReady function, so I just package it into functions then reference it from the onReady. There’s really no need for me to do it here, so you can remove it as a function of you wanted.
Ah ok i think i get it. but trouble is that for the two users to go back and continue the chat would require storing & creating a link to that specific page. Else each time a new dynamic page will be created yeah?
Hi Jakob, there are plenty of free available resources from Wix on how to create profiles. Search the forums or articles. They do a much better job than I could explain and it’s the same code I used.