I've developed a privacy feature that works directly with the buddylist.module, written mostly in PHP with HTML forms. It is not a module, however, the code can simply be placed in a remote file with a block that contains the form code. Bascially, the user either chose (from a drop down menu) Private mode or Public mode. Private mode will allow only their friends to see their profiles and public mode will allow anyone registered to see their profile.
Again, this has not been developed as a module but can absolutely be developed into a module, by someone who has direct experience with the Drupal API, which I do not.
If anyone would like the raw code for what I've done, please let me know so some one can develop it into a module and make it available for download.
Comments
Hi popboard, I'm working on
Hi popboard,
I'm working on a social networking site based on Drupal too. I would like to see your code if you don't mind show it in public
Sounds like a good thing for
Sounds like a good thing for a module
Social networking and privacy
Regarding privacy in a social networking site, i'd like to throw in a few unstructured ideas regarding drupal:
The rights management in drupal currently only allows two "operating modes" regarding "view access"
a) allow all to see the content of a user
OR
b) only allow a few selected (users with special roles) to see the content
The latter has an additional restriction: The user cannot specifiy, which other users may see his content, because roles are given to users by administrators
This isn't a problem with comments or forum messages, but it might get relevant regarding pictures/galleries or blog entries.
I have been thinking about a "virtual role management", but not yet found a way to implement it. The basic idea is the following:
the site administrator defines one or more "virtual roles" like "friend" and "foe". Now a user can assign other users to one of this roles, but this assignment isn't used globally only in respect to the user.
The site-admin can "virtual role"-enable some node/content-types (like image or blogentry). If a user creates content of those types he can select whether it is
a) closed --> no one can see it except people on the users "friend"-list
b) open --> everyone can see it except people on the users "foe"-list
Ideally other modules could hook into this:
e.g. private messages. Usually users want to be open and let anybody send them messages, except for a few blokes who are going on their nerves.
Suggestion: Buddygroups
Soungs great! Privacy and anonymity are important features for strong online communities.
Suggestion: If a user has the possibility to define his personal "roles", this corresponds very nice to already defined buddygroups. I think this could be even more efficiant than building buddygroup privacy upon ACL, because ACL counts each user.
Combining buddy groups with node access?
I just read about the nodeaccess module. Seems to be a great and userfriendly approach. There you can define users that you want to have access to a certain node you created. I would suggest to combine these modules: Nodeaccess functions must be enhanced so you needn't type in each user's name you want to grant access for, but choose from the buddylist you already have. Even more sophisticated would be to choose from buddygroups, because it is likely to expect all members in a group to behave as a target group. I just suggested this feature as an issue for nodeaccess module: http://drupal.org/node/122394
What do you think about this feature? Would it be beneficial to have some buddylist-expert supporting nodeaccess development?
prior art
i wrote this once for buddylist but never really finished - http://cvs.drupal.org/viewcvs/drupal/contributions/modules/buddylist/con...
This can definitely be done
This can definitely be done in a module, it may take some work though.
As of right now, for my privacy feature, i have the user submit a simple form: either select private mode or public mode..both have different values, naturally. (And a hidden form that contains $user->uid)
In my template.php file I ran a db query on the table that includes the data submitted for the privacy mode..if its the value for private mode, check to see if person is friend..if person is friend, return profile.tpl.php..if is not friend return (then make your own template..perhaps profile_private.tpl.php. This works perfectly. Prety much you can impliment the snippets used to add or remove somone as a friend..
however...you will need RDs accept/reject version of buddylist.module to do this, since if your profile is private and I can add you without any request accept, it defeats the purpose. ;)
I've done everything I've needed as far as privacy is concerned for my site ( http://thepopboard.com )...nodes, profiles, etc..however..its not based on a module..i could tell you how to set these things up, if you'd like.
"If anyone would like the
"If anyone would like the raw code for what I've done, please let me know so some one can develop it into a module and make it available for download."
"I could tell you how to set these things up, if you'd like."
please share.
http://drupal.org/node/93981
http://drupal.org/node/93981 for coding
Popboard
sorry if it seems I'm not paying attention. I am, and I thank you for all the work you've done. With the new release system, we're going to have more flexibility than ever when it comes to bringing additional developers on board for the buddylist module, and once I get all those issues sorted, we'll hopefully see a quicker turn around on new features and issues. Thanks for the patience.
steven wittens module
steven wrote a buddylist priovacy module recently. is for protecting profile fields to buddies. see http://cvs.drupal.org/viewcvs/drupal/contributions/modules/profile_priva...