Why use node profile instead of just adding CCK to usernode?

Events happening in the community are now at Drupal community events on www.drupal.org.
Garret's picture

I'm on Drupal 5. When I use nodeprofile to hold and display user profile data the "edit" button, at the top of a user's profile page, goes to edit the usernode instead of the node profile, because that's the container.

Why not just use CCK to add all the fields I want directly to usernode? It seems like that would be a lot simpler, more elegant; and it would eliminate the need to patch all these functions to make my node profile viewable and editable from everywhere usernode appears. Am I missing something?

Before you answer the question, here's what I'm going for ...
I want to be able to display MySpace-like features to my user's profile pages including:
+ the user's avatar image
+ a buddylist with avatars
+ user's recent blog entries
+ a guestbook or buddy comments

So why not just use usernode instead of nodeprofile?

Comments

Not sure...

niklp's picture

...but wasn't the whole point that users aren't nodes either? None of users, profiles or comments are nodes - I think that's the problem? You can't do much to content if it isn't a node.

Maybe I missed something here?

you can

fago's picture

you can do that, however for bigger profiles it might not be the best way. Furthermore it behaves quite strange with required fields, so my suggestion is to create another extra content type for the profile.

How to Edit Account Settings From Usernode View?

Garret's picture

Thanks for your help, Wolfgang! How do you fix the tabs at the top of the usernode be something like "Edit Your Account Settings" (which leads to the original username and password edit page) and "Edit Your Profile" (which leads to the new nodeprofile edit page)? Right now all I get is an "Edit" tab that leads to an empty usernode edit page. If I could get more sensible edit tabs there the whole nodeprofile solution would seem much more integrated for the user experience. Better yet, if there could be one big page linked from that "Edit" tab that allowed a user to edit all their account and profile data that would be great.

If this solution doesn't exist yet; How does one even begin to move in that direction? I'm using Drupal 5 and I'm willing to take a crack at it, but I'm not an experienced Drupal developer yet. I don't know how to edit tabs yet.

Cheers,
Garret

that's currently not

fago's picture

that's currently not possible, you have to create extra menu items e.g. by using pageroute.
However I plan to make this possible with nodeprofile 2.0...

I am trying to do something similar

bfbryan1811's picture

So far I have created a custom usernode page with a section showing the user's account info and another section showing the user's profile info (from CCK/nodeprofile). It looks pretty sweet. I also have icon links that I'd like to direct back to an edit page for each. I can send the user back to user/uid/edit but that shows a view tab in addition to edit. I'd like to hide the view tab as it's not relevant as I am using nodeprofile. As for nodeprofile I haven't a clue as to where to send user's to update this info. Is it possible to just create seperate pages for both with html forms update to allow users to update their info? Or is there an easier way that I am overlooking.

Thanks

Can you expand on "it

RobRoy's picture

Can you expand on "it behaves quite strange with required fields"? I want to just use usernode, but would like to know of any adverse effects first.

Here's how

ximo's picture

The way usernode works, is that it creates a new usernode when a user registeres by programatically filling out the "new usernode" form with all fields empty. So if you have CCK fields on your usernode that are set to required, it won't be able to automatically create the usernode, and unless you knew this you'd be wondering why on earth your users doesn't get usernodes (like I did).

I like using CCK and usernode, and thought nodeprofile and viewsfusion and all that was a bit too much for me. And I need all fields to be required. So what I do, is I make all fields not required in the usernode's Content Type admin pages, and then use hook_form_alter() in a custom module to make the fields required when the user is editing it. It works fine on most fields, but I'm struggeling with imagefield fields... Wasn't that smooth after all, but I guess I'll figure out how to make imagefields required as well.

why creating another

fago's picture

why creating another solution if you could just use nodeprofile!?
views_fusion is no requirement for nodeprofiles.

Profiles as nodes

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week