Jump to content

facebook style live feed


runnerjp

Recommended Posts

Randomly? Why random? Why not the most up to date ones? That makes more sense... It would be rather easy... Just do a select query on an "actions" database that stores what people do with a timestamp on each action. Limit it to something like 10 and order it descending so that the latest ones get shown first.

Ok so i mean something like this..

 

Today

11:16 AM Old Web Guy changed his profile status to "is asleep"

11:15 AMOld Web Guy joined the group .

10:58 AMOld Web Guy added a new blog post titled Short Blog Test

10:55 AMOld Web Guy joined the site

9:29 AMmanoj sharma joined the site

8:00 AMsamo sami joined the site

 

Yesterday

11:47 PMDance Utah uploaded a new video called Dance

11:36 PMDance Utah uploaded a new video called Dance

11:32 PMDance Utah joined the group Dance.

11:27 PMDance Utah updated his profile and changed his profile photo.

11:27 PMDance Utah updated his profile and changed his profile photo.

11:27 PMDance Utah updated his profile and changed his profile photo.

11:27 PMDance Utah uploaded new photos to Default Album.

 

so everytime somesays makes a post or uploads an image add it to a table 'actions' then call the last 10.

 

Exactly. The best way, if you want to display images, would be to have an action type in your action table so you know how to handle it. action_type for uploaded pictures would be 1. So if you have an action type of 1 it knows to also include thumbnails of the pictures they uploaded. Most actions can be generic and simply have an action_message which would display what they did. Make sense?

 

EDIT: Also make sure to clear this table out pretty regularly if you have an active database of users. It will get full fast ;) Probably best to do a cron job and clear a certain amount of old entries from users. I'm sure you can figure out what way would work best for you.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.