I am about to develop a wall which fetches a lot of wall posts from different users. I have a global table called "edu_posts" containing wall posts, and comments to these.
I wish to create some kind of system to focus on bringing the most relevant content up for the user.
I wish feedback / alternatives methods / etc for my current solution I thought of, which is as following:
Simple rating system:
key => the user id, value => the number of times the reciever_id has appeared
. Then you will end up with a list, like the following: $userlist = array(12 => 9, 55 => 8, 7 => 5, 56 => 3) // etc etc
(so basically: ID 12 has appeared 9 times, ID 55 8 times, and so on) Now we have achieved the list of relevant user_ids.$userlist
array with each field: author_id (for the post), author_id (for the comments), author_id (for the likes)
. Lets say, that in post 30 (above printed example) the user id: 12 exists 3 times (2 times in comments, and 1 time in likes) then the rating is 3 * 9 (nine, because the user_id 12 has appeared 9 times in our $userslist)
, and then we add this number (3 * 9): 27 to the ratings field
, in the $posts_array
.$posts_array
compared to the ratings field.Did it make sense? Do you understand my trouble? I hope I am clear enough. I understand that this is a very hard question to answer, and that there really isn't any real answer. I just need to evaluate the different methods which exists, as above example will be a pretty heavy SQL (to fetch all different relevant tables, and containing data) and PHP operation.
Many thanks in advance!