0

I am thinking to implement a forum like Private Message into my website for those who are a registered member. (<100 Member anyway)

So Member A can send a message to Member B.
Member B will have a notification popup within some seconds saying that he received a new message (without reloading the page is preferable. aka Facebook style).
Member can check all messages that he sent or received.

Anyone can point me a direction?

I am thinking to use a normal techinque like mysql + php, insert the message to the mysql and then send a singal to trigger the alert to the target user.

1.Member A send the message
2.mysql recevied > php send a singal to the target user (Member B in this case)
3.Member B's browser received the singal
4.popup a noticfication on his browser
5.if Member B didnt check the message than it will popup again on his next login
6.Member can view their messages list and open those old messages.

I am stuck at #3 at the moment. I think I need to use jquery to trigger the event like #3? Can someone please point me a direction?

thanks

Edited by yy886

2
Contributors
3
Replies
45
Views
4 Years
Discussion Span
Last Post by masterjiraya
0

as based on facebook. a jQuery is needed. I dont know how to post a diagram here (jpeg) but Let me explain it to you.
First you need to have a little background stuff on...
1.)jQuery
2.)Javascript <-- this is mainly needed for Ajax and jQuery scripting
3.)HTML's form behaviors <--- meta file and and such more
4.)CSS <--- needed in your jQuery
5.)Database
6.)PHP <--- since aJax is included, it is a form of cloud computing.

for interface, and dynamism take the first 4 I had mentioned.
jQuery is used for interactivity of the forms, Ajax for dynamism anf automization of data, Javascript is the form HTML's trigerring event (onClick, onKeyUp, onMouseOver, etc...) CSS in this manner is not only focused on HTML now it is also a prerequisite for jQuery. HTML's form behaviors is also a must to learn if it includes file uploadable or not.

chatbox:
so now In every event of the chat box like onKeyUp or onClick it will trigger an Ajax function. once jQuery has done it's part, jQuery must call an ajax function to pass it to PHP. in this manner, you created a chatbox.

for cloud computing, take the last 2.
Notification Pop-Ups:
once it passed down to PHP, do some saving stuff to the database and then once the database has succesfully saved the data, then it will pass back to PHP to throw the message back to the Ajax stuff to create dynamism of data back to jQuery once again.

forums look-alike:
because of jQuery that needs CSS... CSS is the one that you need to manipulate the stuff.

for interaction of data between users do the loop of a circle like this
HTML & CSS->Javascript->jQuery & CSS-> AJAX ->PHP->Database throws back to another user by database->PHP->AJAX->jQuery & CSS->JavaScript-> HTML & CSS

and that's the way you need to do.

0

Thanks mate, i have some idea now and will do the normal PM system first and then I will try to implement the noticfication fuction.

0

since I gave you the hint. you can do some googling for jQuery chatbox and forums. and please do not hesitate to ask us. but please close this forum and mark this thread as solved.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.