Working on a "wall" feature where users can share site-content with their friends

Go To StackoverFlow.com

0

I've seen this question get asked a billion times BUT my project requires a little extra sauce. I am trying to create an image upload web app where users can upload their images to a library, and I want this library available to everyone on the site.

Also, I want anyone on the site to be able to "push" any picture they see and like, onto a FEED like the Facebook wall where all their friends(or some, sortable) can see the picture that they "pushed" to the feed; kind of like promoting what you like to your crowd... This feed needs to update every 20 seconds.

I am currently far behind from the point which I am asking about. I have just completed the user login and the basic layout. I need some guidance in order to have a clear idea of what I'm getting into before I move any further.

Any help would be greatly appreciated

2012-04-04 07:28
by Gevorkyan
"I need some guidance in order to have a clear idea of what I'm getting into before I move any further." - Guidance in what? How to create such a wall feature - Bono 2012-04-04 07:29
Ya I want someone to walk me through what I asked about up at the top; and what I meant in the last paragraph was that I need to know how to create the wall feature before I move any further. I like having a clear picture of what I'm going to be coding. A rough layout is perfect; I can adjust to my needs very easily. I've never dealt with a feed related site before and I'm pretty new to php - Gevorkyan 2012-04-04 07:44


0

I can tell you how to build that, but I can't build that for you.

You need a database, where you can have a "users" table. Then you need a "friends" table and a "images" table. On the users table you record users of the app: id, login, password and name. On the friends table you store list of friends (other users) of a id. On the images table you record the path to the image. The CRUD model..

You are not pushing anything. Wen a user upload a image, is recorded on the database. The next time one of his friends refresh the page, a SQL query will get all his friends images, and render the right html code. So the image will automatically show there.

2012-04-04 08:14
by Tei
I actually do need users to be able to push the images to their own friends. They need to be able to view all the images on the site in one huge database of all images, which will be filled as users upload. But i also want a feed where users can see the images that their friends are "pushing" to them.. sort of like "hey take a look at this picture it's sick"... get it? Sorry if I'm not being clear enough = - Gevorkyan 2012-04-05 02:48
Then you can have a "pushed" table. With iduser, idfriend, id_image, datetime, where you add entries for the images the user push to his friends. Every time a user push a image, you write a new entry. I have added a time mark, because I suppose you want to order by time (first the newer ones) and perhaps delete or ignore old entries - Tei 2012-04-05 08:49
thanks that makes sense... I didn't know that it would require another table - Gevorkyan 2012-04-06 00:17
It would need another table, because 1 image can be pushed to multiple people. Theres no way to store in a row of the table "images" a list of maybe 20 friends to who you are pushing a image. Maybe a dude want to share his photo with his mother and his girlfriend and his friend John - Tei 2012-04-09 09:03
Ads