P
P
phmphx2015-02-01 05:21:52
Yii
phmphx, 2015-02-01 05:21:52

Yii2 Site messaging and online-offline display system?

There is a site written in Yii2
The customer urgently requires to implement it on the site
1. messaging (between users)
2. displaying the status of the user online or offline
3. tree-like comments, please tell me if there are developments in this area available or even ready solutions?
Thanks in advance

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Ivan, 2015-02-01
@IvanCher

The implementation depends on the current database structure and project.
1. If you do not need to update messages from users without reloading the page, then simply create a messsage table with the fields id, text, user_id (you may need some more) and a form for creating a message. I don't see any difficulty here.
If you need to update messages without reloading the page, like a chat, then look in the direction of push messages, or stupidly through js every few seconds check if there are new messages, if there are, then draw.
2. It's more interesting here. There are many different options. Of the simplest:
3. Yes, just iterate and draw as needed, I don’t see any problems here either, the standard use of php.

P
proffmen proffmen, 2015-03-16
@proffmen

Ivan, as I see it, you are a professional and so simply and easily described in almost 2 words about such a large module as comments. Could you confirm your words in practice by posting the source code of the message module for yii2 in the public domain. I mean, I was originally a user of "Phmphx" and I, too, am waiting for help from professionals in deeds, and not in words. Thanks for understanding!
8af0150014e74944a88f2316ad924648.jpg

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question