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

Automated update of new posts/threads

Discussion in 'XenForo Pre-Sales Questions' started by James, Aug 4, 2010.

  1. James

    James Well-Known Member

    If new posts are added to a thread you're currently browsing, are they added automatically via AJAX and appended to the bottom or must I refresh the page? I've yet to figure this out.

    Also, is this the case for threads on the forumdisplay? Or must I also refresh for the new threads/new replies to re-order themselves?
  2. Timothy Kaler

    Timothy Kaler New Member

    Well it doesn't look like there is any background polling for new replies when you are viewing a thread. However, when they are processing your new reply they may fetch all new replies when they update the reply list.

    Edit: When posting a new reply, the server returns a chunk of text templateHtml that contains the html code to be appended to the reply list. This html code includes all new replies including the one being posted.

    However, it does not appear as though recently edited posts or deleted posts are updated.

  3. Nick

    Nick Well-Known Member

  4. James

    James Well-Known Member

    What about the private conversations and stuff? Are they auto-updating (if you're both watching the conversation and replying to each other within X seconds)?
  5. Erik

    Erik Well-Known Member

    Probably not. I don't think there's any auto-polling anywhere within the software currently. It would certainly be a very nice feature to have, assuming you are able to enable/disable it to control server load. :)
  6. Ahmed

    Ahmed Well-Known Member

  7. James

    James Well-Known Member

    Completely agree with the above.
  8. Timothy Kaler

    Timothy Kaler New Member

    Ideally there would be a single poll to the server at some admin configurable frequency that retrieves a list of JSON objects each of which specifies a Javascript function and its arguments. Each object representing an action which some part of the application wishes to "push" to the user. Then a "push" API could be exposed to all parts of the application and to 3rd parties interested in developing extensions.

  9. Erik

    Erik Well-Known Member

    Sounds like a good idea, although you wouldn't want to be retrieving data you don't need, obviously. :)
  10. Timothy Kaler

    Timothy Kaler New Member

    Well if there is no data to retrieve, then you would only download an empty list: "[]". You could further minimize the cost by creating a static file for every user whose contents are an integer representing an auto-incrementing ID of the last notification the application has generated for the user. Then the last notification id fetched by the user can be stored locally, and low cost http requests can be made by the user to the static file to check to see if a more costly poll to the notification fetching script is required.


Share This Page