I know that this is a very newbie question, but please be patient with me as I have tried to find the answer before posting here!
I want to use Drupal for a web site that has these facilities:
a) Registered users can create publically-accessible content based on a template (i.e. there are items of information that they need to input and that is displayed to the world on the web site.
b) There is private information that someone can create which essentially uses the web site as an online, private information store. This content is also of a fixed form (i.e. certain fields and files that they can upload, images, etc) but it is visible ONLY to the person who created that contant. No-one else.
Is this possible in Drupal?
Can some kind person help a newbie by recommending how best to do this?
Comments
nodes and modules
a) As you may know, in Drupal all the content is represented by a "node". There can be various types of nodes that have different type of content - ie different fields, which is what I understand you mean by "template". The easiest way for you to create such a template is to use one of the node creation modules - for instance the Content Creation Kit : http://drupal.org/project/cck
b) Drupal has a certain number of modules that allow to manage node access restrictions. You would need to use such a module in combination with your own node type (as in (a)). Unfortunatly, I do not know of any module that does what you want - "Organic groups" module allow to restrict access per "group" - but you have to create those groups first. "Simple Access" allows you to restrict access per "taxonomy term" - but again you have to create those first.
Unless I have missed a module that does what you want, I think you will need to write your own node type for this with your own "hook_access" to restrict pre-defined nodes to pre-defined users. This will require PHP programing skills. To get started look at http://drupal.org/node/508 (in particular "Creating modules - tutorials" and "Creating new node types - a tutorial")
Thank you very much for
Thank you very much for this. It helps enormously. I will indeed write a module and hopefully it can be added to the ever growing list of Drupal modules!
Private space
For a project I'm working on at the moment, I wrote a module (called 'privatespace') which allows each users to have a "private space" in the form of a node ; such that :
- A single URL (eg. "/privatespace") leads each user to their own node
- The node is created on demand (first access)
- The node is created from a template (ie. duplicates an existing node)
- Users can be redirected at login to their own node
However this module doesn't apply any access restrictions on the node (other users can view it). The reason for this is that in Drupal (at least up 4.7 - I'm yet to look at the new access control of 5.0) you can't really do that - even if you forbid access to a node, other modules can allow that access.
Therefore the node itself should enforce it's privacy - which means it has to be written with that in mind. The module provides an API to make it easy. It also provides an API to manage a private files directory - and maybe more in the future.
I haven't released it yet because I'm still working on it (and haven't written an installer) but if you're intrested you can email at anselm at netuxo dot co dot uk and I'll send it to you "as is".