Hey guys, i need Your suggestions(help).
i created a social network website not long time ago,now i want to put the News feed in the home page like the Facebook one.
That is if a friend posts status,add friends,uploads photos,video,join groups,Commented something etc to appear in the home page.

Please i need ur suggestion guys.
1.How will the database structure supposed to be.
2.How can i display them
3.any other suggetions.
any help will be appreciated.

Hey guys, i need Your suggestions(help).
i created a social network website not long time ago,now i want to put the News feed in the home page like the Facebook one.
That is if a friend posts status,add friends,uploads photos,video,join groups,Commented something etc to appear in the home page.

Please i need ur suggestion guys.
1.How will the database structure supposed to be.
2.How can i display them
3.any other suggetions.
any help will be appreciated.

Make a table for recent_updates
id, userid, description, updated_time

Recently updated anything by any user -> Insert into that table.

Make an Ajax autoupdater call -> Collect the friend userids associated for the logged in user and fetch the data from the recent_updates

Update the recent changes div...

I haven't seen how the facebook works, but I am expecting it will be like this...I am not sure about this, hopw it helps you to think..

To help you out, here are some tables and the structure I've used:

CREATE TABLE `wall_likes_username` (
  `l_user` varchar(100) NOT NULL,
  `post_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `wall_posts` (
  `p_id` int(11) NOT NULL AUTO_INCREMENT,
  `post` varchar(255) NOT NULL,
  `date_created` int(11) NOT NULL,
  `p_user` varchar(200) NOT NULL,
  `email` varchar(80) NOT NULL,
  `likes` int(11) NOT NULL,
  PRIMARY KEY (`p_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `wall_posts_comments` (
  `c_id` int(11) NOT NULL AUTO_INCREMENT,
  `c_user` varchar(200) NOT NULL,
  `comments` text NOT NULL,
  `date_created` int(11) NOT NULL,
  `post_id` int(11) NOT NULL,
  `email` varchar(80) NOT NULL,
  PRIMARY KEY (`c_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.