0

Just wondering how you did the activity stream, is it something you bolted on or is it part of CI?

Also does it take up a lot of resources?

5
Contributors
16
Replies
96
Views
3 Years
Discussion Span
Last Post by pritaeas
Featured Replies
  • 1

    > What, no comment on the changes? :) It's jacked up to the point of being useless now. :( The times are all jumbled rather than in order, and it's difficult to tell what's current. Also, the update is too fast to properly investigate what's happening in realtime. Read More

0

I do it a really crappy way and I actually need to redo it very soon.

It's just simple ajax with jQuery ... every 5 seconds, it fetches an updated list from the server and overwrites the HTML. The better way to do it is fetch the changes since the last 5 seconds as JSON and only make the necessary adjustments. This way we don't have the bandwidth overhead of the entire list every time. It takes up the same amount of resources as fetching a pageview every 5 seconds.

0

Now to steal the jQuery from the webpage:

<script type="text/javascript">
<!--
function refresh()
{
    $.post('/stats/js_refresh_online', { csrf_token: csrf_hash }, function(data) {
        $('#online-list').html(data);
    }); 
}

$(function() {
    var timer = setInterval(refresh, 1000);
});
//-->
</script>

Oh, looks like it's every single second.

0

You've motivated me to make changes to our activity stream page tonight. :) Thanks for that!

1

What, no comment on the changes? :)

It's jacked up to the point of being useless now. :( The times are all jumbled rather than in order, and it's difficult to tell what's current. Also, the update is too fast to properly investigate what's happening in realtime.

Votes + Comments
Was thinking the same
0

I thought this was about the activity stream on the main page. I figured now this is about the member stats page.

Yes, its very difficult to follow now.

0

Darn you people! I really loved it looping the data, and always having somethign new to show. But no one else liked it, so I've reverted it :(

0

Looping? what looping, the only looping was my eyes trying to keep up with the information on the screen.

0

Looping as in if there was no new information to display, it looped back to 10 minutes ago and replayed the last 10 minutes.

0

Interesting. Just watched the activity stream after browsing Web Dev forum and saw this:

83b6baec534f037182a67d9efc276230

I wonder how it determined I was reading that thread, while instead I was watching the activity stream and coming from a different forum altogether...

Tried visiting a PHP thread and going back to the activity stream, yet still that same link kept showing ;)

Edited by pritaeas

0

That's incredibly, incredibly odd!! If it happens again please let me know ... the only thing I can think of is that you clicked into it and out of it in a different browser window or something and forgot, I don't know. I really have no idea how the system could just make it up.

0

the only thing I can think of is that you clicked into it and out of it in a different browser window or something and forgot

I didn't. I have no explanation either.

This topic has been dead for over six months. 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.