adambedford Posted March 12, 2010 Share Posted March 12, 2010 I'm designing a web application that will have elements of social networking involved and I'm theres a couple of things that I'm not sure which way is best to go about them: The first is notification options. I want to make it possible for a user to decide what notifications from my website they receive. Kind of like Facebook where you can decide if you get an email when someone sends you a message etc. I've thought about having a table called notification_options with fields for the User ID and then fields for the various notification options they can opt in/out of (e.g. receive email when friend requested etc.) The other option I've come up with is to have a field in the existing users table with a number that corresponds to a certain combination of notification options (such as 1 means receive emails for everything, 2 means receive emails only when someone sends you a message and so on...) What do you guys think is the best way to approach this? My other dilemma involves privacy options (ie. who can view profile, other info etc) And I've come up with the same options as above for this one as well. Any suggestions/pointers would be really appreciated! And if I've missed a different posibility to go about this - I'd really like to hear it as I'm sure it's better than the possible solutions I've come up with. At the moment I'm leaning towards having a table with fields for each option and User ID and then just updating that if a user changes their mind and referring to that when writing the functions that will send notifications/restrict info based on privacy settings. Quote Link to comment https://forums.phpfreaks.com/topic/195053-not-sure-how-to-go-about-this/ Share on other sites More sharing options...
harristweed Posted March 12, 2010 Share Posted March 12, 2010 I'm in agreement. Best to have a table that holds the options. Easier to operate than a code for different combinations. Quote Link to comment https://forums.phpfreaks.com/topic/195053-not-sure-how-to-go-about-this/#findComment-1025375 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.