Hi,

I'm setting up a yellow pages like web site and would like my users to both create content and create a user account at the same time when they register on my site. See: http://static.olalindberg.com/drupal/071108_Registration_01_Sketch.gif for a sketch of what I'm thinking my combined registration and content creation page could look like.

What I'm trying to do is pretty much covered in this thread: http://drupal.org/node/100359 but I can't find anything more than a request for this. I'm open for alternative solutions as well as ideas for how to get it working.

Registration process

Not logged in user

  1. The user enters the registration web site. A page that works like the sketch above is shown.
  2. The user fills the form and press the Preview button
  3. A validation e-mail is sent to the e-mail address given in the form. The data is saved but not displayed until the e-mail address is validated. A password is also generated and added to the e-mail.
  4. The user validates his/her e-mail address
  5. The data is displayed on the web site

Not logged in user

Since users only are able to create one Company node / e-mail address the content for the logged in user is populated in the form and the user is able to edit that data.

Workarounds / alternatives

These are the possible workarounds that I have been thinking about.

Adding the company information to the user node

Since users only are allowed to create one node / e-mail address I have been thinking if it would make sense to add all fields on my Company Content Type to the User node with help of the Profile Module (http://drupal.org/handbook/modules/profile). One huge problem with this is that the fields that can be added to the Profile Module seems to be quite limited (CCK fields and Taxonomy fields doesn't seems to be supported).

Make a custom module / Extend my theme

It might be a possible solution to make the customizations as a module or as a modified theme for my site. I'm a bit worried that this might take quite some time though. Any ideas for how this could be done?

Questions

If anyone have any ideas, other workarounds or comments on the workarounds they are welcome. I'll update this post when I find a solution. Thanks in advance!

Comments

gmasky’s picture

subscribe

dtabach’s picture

Nodeprofile module will allow any CCK type, with any CCK field, to act as a 'Profile' for users. It can be viewed/created/edited from /user/xx page.

Nodefamily module (required by nodeprofile) will limit how many nodes of a certain type can be created by an user. In your case, you will want to limit users to create only 1 node of the 'profile' cck type.

Pageroute module will guide users to predefined steps. In your case, create the 'profile' node just after registration.

Usernode module will create an automatic 'profile' node upon registration.

Durval Tabach

Durval Tabach

dtabach’s picture

Nodeprofile module will allow any CCK type, with any CCK field, to act as a 'Profile' for users. It can be viewed/created/edited from /user/xx page.

Nodefamily module (required by nodeprofile) will limit how many nodes of a certain type can be created by an user. In your case, you will want to limit users to create only 1 node of the 'profile' cck type.

Pageroute module will guide users to predefined steps. In your case, create the 'profile' node just after registration.

Usernode module will create an automatic 'profile' node upon registration.

Durval Tabach

Durval Tabach

olalindberg’s picture

Hi and thanks for your response!

I don't really understand how I can configure those 4 modules to get the result I'm looking for. Could you please explain?

I did the following:

Nodeprofile module - Enabled me to add custom CCK fields to my usernode. I added some fields (seems to work fine).

Node family module - I set the maximum created nodes to 1 (seems to work fine).

Pageroute module - I first tried to set it up to edit my usernode in the first step and a preview of the changes in the next and thought that I could point anonymous users to my route were they could both register and commit content in one step. I couldn't get this to work though. Was it how I was supposed to do?

Usernode module - Automatically creates and removes nodes when I delete user accounts. Seems fine since it created usernodes for all my existing user accounts.

I got the following:

When I register as a new user I get the password sent to the e-mail address as supposed. When I log in as my new user I can fill in the form to populate the usernode. This seems correct - Was that what you meant?

I have another problem now though. Since the usernode module creates usernodes for all users (even administrator) when I do my listing (with views module) I get the administrator user nodes as well. I tried to find a filter to not output any nodes were my CCK-title field was empty but I failed (http://drupal.org/node/101050). Any comment on that?

I'm a bit confused right now. Will continue with this tomorrow! Thanks a lot. Best regards,

Ola

dtabach’s picture

Sorry I can't help you much about Usernode and Pageroute, as I never used them. The info in my previous post was extracted from Nodeprofile README.txt file. Please read it (if you haven't yet); it contains not only info about Nodeprofile, but also useful information about ways of integrating these modules.

But this might be of some help: Usernode is optional. You can define any cck content type as being you custom user 'profile'. Actually, if convenient, you can use more than one node type as 'profile' (then you can use Views Fusion module to create your lists). Thus, admin will not necessarily have an user profile.

Durval Tabach

mrgoltra’s picture

subscribe

UNarmed’s picture

Did you ever mannage to get this right, im looking for the exact same thing? I think its a great way to both get content added and get users to register ... two birds with one stone >_<