Hello, I am in the process of coding my website, and plan on creating a feature which is similar to the Bulletin board found on Myspace. I have a few algorithms in mind on how this should be done, but I think these would take up quite a bit of server load. Basically, what I am trying to do, is create a bulletin board system which will only be available to viewing to the users on your friends / contact list, no one else. My first idea was to find every friend of the user posting the bulletin, and place their account id's into an array. Then, using foreach, I would loop through and place that bulletin ID into a row called 'Bulletins', where bulletins would be listed such as: 5,19,15,100,75,3 Say the ID of this new bulletin being posted is 177. I would then loop through the friends of the poster, and add ,177 to the end of their bulletin list. To display, I would again use foreach, and execute a function for each bulletin ID displaying the bulletin details. This was my idea, though. I'm here asking if anyone know of a more efficient way to go about this. Any suggestions? Thanks!
I am not sure I fully understand how you plan to set the forums up. 1) Are you wanting to give each a user their own forum (message board) and then limit users who can view it to those who are their friends? .. or .. 2) Are you wanting to create a general forum (message board) for everyone but only show the threads created by users on your friends list? If #1 is your goal, simply store the userid's of friends in each user record and then read that record before showing the forum for that user. That way, you only have to search through one list/array before determining if the user can read the forum. If #2 is your goal, then it will be more complicated and will require an additional query on the user records to load the friends lists for each of the users who posted threads that are currently showing on the page. -Zeras