runnerjp Posted April 19, 2010 Share Posted April 19, 2010 How can i create a live feed for my website where it displays status update, added images ect from users randomly? any information how to plan this out would be great such as db structure and php code. Link to comment https://forums.phpfreaks.com/topic/199010-facebook-style-live-feed/ Share on other sites More sharing options...
aeroswat Posted April 19, 2010 Share Posted April 19, 2010 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. Link to comment https://forums.phpfreaks.com/topic/199010-facebook-style-live-feed/#findComment-1044631 Share on other sites More sharing options...
runnerjp Posted April 19, 2010 Author Share Posted April 19, 2010 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. Link to comment https://forums.phpfreaks.com/topic/199010-facebook-style-live-feed/#findComment-1044643 Share on other sites More sharing options...
aeroswat Posted April 19, 2010 Share Posted April 19, 2010 So what's wrong with what I said? Link to comment https://forums.phpfreaks.com/topic/199010-facebook-style-live-feed/#findComment-1044646 Share on other sites More sharing options...
runnerjp Posted April 19, 2010 Author Share Posted April 19, 2010 so everytime somesays makes a post or uploads an image add it to a table 'actions' then call the last 10. Link to comment https://forums.phpfreaks.com/topic/199010-facebook-style-live-feed/#findComment-1044651 Share on other sites More sharing options...
aeroswat Posted April 19, 2010 Share Posted April 19, 2010 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. Link to comment https://forums.phpfreaks.com/topic/199010-facebook-style-live-feed/#findComment-1044658 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.