VarunGrazitti,
I'm creating aka LiveChat custom component.
Where the user is typing a question and see related discussions from a specific board so it looks like 'chatting'.
Do you have some code you can share the way you've mentioned?
I'm doing it via Ajax calls.
- What is the user still wants to post a question to a specific board?
How to do it? via Ajax again?
- How to refresh aka polling and if another new post there pop it on the top?
-------
I'm using some of ideas in Dev discussions to search before posting. I'm pooling messages subject, body and author.
However I can't pull avatars.
- Is it anyway to do it in one Ajax call?
I know I can make it another api call to get it... but how to get in inside another ajax call because I'm using jquery each method:
$.each(result.response.messages.message, function(index, msg) {
msgMarkup += "<tr><td class='subj'><a href='" + msg.view_href + "'>" + msg.subject.$ + "</a></td><td class='date-time'>${result_post_time}" + msg.post_time.view_date + " " + msg.post_time.view_time + "</td><td>${result_post_by}" + "<span class='author'><a href='" + msg.author.view_href + "'>" + msg.author.login.$ + "</a></span></td><td class='date-time'>${result_edit_time}" + msg.last_edit_time.view_date + " " + msg.last_edit_time.view_time + "</td><td>${result_post_by}" + "<span class='author'><a href='" + msg.last_edit_author.view_href + "'>" + msg.last_edit_author.login.$ + "</a></span></td></tr>";
}
....
and appending to 'suggested posts'any code snippets appreciated.