Live Topic

Mook

Mr. Manager
Staff member
Admin
May 23, 2007
206,693
117,573
Elgin
Real Name
Mike
some of you might have noticed this yesterday (in between the site crashing).

i installed a sweet little hack yesterday called Live Topic. this is totally different from the live feed i'm always preaching about.

if for example you are one of those people who like to sit in a very active thread and refresh over and over waiting for someone to reply, this hack is for you.

see explanation below:
If a thread has been posted in X seconds then its now Live, if other users are viewing the Live topic and are on the last page they will experience a clean ajax experience while talking to other members. Once the thread is older than X seconds its no longer Live and it will now act like a normal thread. Also if a user edits one of their posts that's inside of the thread, it will be updated too so there is no longer a reason to ever have to refresh.

There is also logic for the viewer, the viewer of the thread has to be in an active state to see responses. An active user state is determined upon the users actions, if no actions were made in X seconds then the user is marked as inactive.

Also you may wonder why this could save your server bandwidth and CPU. If a user is refreshing to talk to another members the queries on a normal thread load are way more intense than the ajax call that this modification makes. So if you have 5 people talking to each other none of them have to refresh the page, all they are doing is simple page requests and one intense request when there has actual change.

baiscally the thread keeps itself updated as it stays active. after 5 minutes of inactivity, it goes back to normal. if you see "live topic" next to the thread title, it means no refreshing for you. weee!
 

Thread Info