I'm wondering if anyone knows of a module that integrates with Content Profile, and gives user's the option of hiding their profile.
The client I'm doing this for is happy for any code to be contributed, so perhaps this would be good opportunity to have another submodule shipped with content_profile.
My personal goals for this module are:
- Keep code lightweight
- Keep configuration simple
- Keep logic for access rules straightforward
My concept for this module:
Privileged user configures the module with the following basic options:
Can users choose to make their profiles public?
[Radio buttons]
- Yes (User can choose whether profile is public or not)
- No (All profiles are private)
Default choice (hidden by jquery if 'No' is selected above)
[Radio buttons]
- Private
- Public
What content types should be private?
[Checkboxes]
- Profile
- Any other content type configured to be a profile type
Access rules
- Nodes are always available to the author (user who owns profile), and permission to edit is based on 'edit own profile nodes permission'
- Nodes are always available to privileged users (with permission of 'view private profiles' or similar)
- Nodes are hidden to everyone else if they are selected as private
- Nodes are available if public
I've got to start writing this module as soon as i finish this post, when I'm done I'll upload a tarball of my work for review. Dear maintainer, if you aren't interested, can you please let me know sooner rather than later if you have no interest in shipping a node access module with content_profile.
Cheers!
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | content_profile_privacy.20103006.tgz | 2.38 KB | nicksanta |
Comments
Comment #1
nicksanta commentedActually, scratch that. I've decided to use View own to achieve this functionality. I somehow managed to talk the client out of configurable privacy settings.
Comment #2
nicksanta commentedTurns out my view_own solution didn't work as well as I had theorised, and I had to write this module anyway. It works, and has configuration options at /admin/settings/content-profile-privacy
You need to visit the configuration options page before this module actually does anything.
No documentation at this point, I thought it would be good to get some more feedback before investing time in instructions.
Untar in your sites/[sitename]/modules folder and install. Uninstallation works fine.
Comment #3
nicksanta commentedComment #4
fagoYou can also use content access.
Comment #5
rbl commentedDoes this need any other module (besides CP obviously)? It's not working at all for me...
Ricardo
Comment #6
nicksanta commentedOnce enabled, head to admin/settings/content-profile-privacy and configure, then visit admin/content/node-settings and rebuild node permissions.
Comment #7
g.k commentedI followed the above steps but it didn't work for me. The privacy setting does appear in content profile and selecting 'private' doesn't work. I am using Display Suite/User Display though, not sure if it's causing any conflict.