Am I doing this wrong?

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

I decided to go with the Bio module, since I have one type of profile, and fairly simple needs.

  • When registering, people enter some basic contact info First Name, Last name and some info that will remain private, like phone number.
  • When their application is accepted, they can create their "profile"... But I want to be able to keep the First Name and Last Name they originally entered on their registration form.
  • I don't want them to use the "title" field for their name.

In the future I would like to use their last names as a way to sort through their profiles... so does this mean I will not be able to use the Views integration of the Bio module? The problem is that I don't want the users who haven't been accepted into the program to create their first and last name, since this content type is only for a specific user role...

Am I doing this all wrong?

Thanks in advance for any advice you can offer.

PS_ why does the text on this first page in the group get tinier and tinier and tinier?

Comments

Does it need to be this complicated?

bonobo's picture

Hello, Heather,

Does it need to be this complex?

You can us the auto_nodetitle module to eliminate the need for your users to use the Title field for their name.

RE: "But I want to be able to keep the First Name and Last Name they originally entered on their registration form." -- it seems that, if someone is going to be changing their first/last name, they will likely have a good reason for it, especially if their application needs to be accepted in order for them to become full site members. Eliminating this feature will likely cause some administrative headaches.

RE: "The problem is that I don't want the users who haven't been accepted into the program to create their first and last name, since this content type is only for a specific user role..." Use the core profile module to register users. Then, use the bio nodes for users who have been accepted into the site. As part of the acceptance process, promote these users into a new role. You can then restrict the ability to create bio nodes to that elevated role.

I hope this helps, and feel free to ping back with additional questions.

Cheers,

Bill


FunnyMonkey
Tools for Teachers

point 1) yep, agreed. point

heather's picture

point 1) yep, agreed.

point 2) "Use the core profile module to register users" - Gotcha! This is what I am doing now.

  • Register: first/last name, a bit of info - all hidden fields.
  • Accepted as "Participants" and they can create a bio node... thing is, the annoying title field. It seems necessary for searching and listing. I thought of turning it into a location field, or some other one line 'required' text field.. But then, again, it's the problem of the title in searches.

I wondered if I could auto-magically populate Bio's title field with the First Name Last Name;both of which were required when registered. But that would create a few problems; like, first/name last name sorting... and not allowing editing of the field. Blech. :P

So! I am going to go check out the auto_nodetitle module!

thank you :) i'll report back!

RE: "I wondered if I could

bonobo's picture

RE: "I wondered if I could auto-magically populate Bio's title field with the First Name Last Name" --

That is exactly what auto_nodetitle does -- see http://drupal.org/project/auto_nodetitle -- you'll want to install the token module to get the most from it -- there's a lot of flexibility there.

Cheers,

Bill


FunnyMonkey
Tools for Teachers

/claps embarrassingly thank

heather's picture

/claps embarrassingly

thank you!

can't get the title to pull in profile info?

heather's picture

i have installed it and i've been playing around with it.. to no avail. have you any examples of how this would work?

looks like i can't access custom fields in the default user profile fields (e.g., $user->firstname ) and the token module can't access the default user profile info. i made an issue, but cross-posting here since you seem to know what i'm talking about: http://drupal.org/node/257147

  • my main problem is that i want everyones real first and last names at time of registration.
  • after that, individuals' roles are approved; so only certain people will be making a full bio node.
  • and i'd like the title to use the real first and last name they entered at registration, for search and listing reasons. (rather than "username" or "author name")

therefore, i can't use "bio" to make CCK first/lastname fields. because it would automatically make a bio for people who are not going to be able to have bios...
(edit: fixed link)

use a php snippet for auto_nodetitle

bonobo's picture

Hello, Heather,

You can use a php snippet to generate the content of your title -- check the "Evaluate PHP in pattern" checkbox at the bottom of the config options for the for auto_nodetitle on your bio node type (at admin/content/types/bio )

Also, just for curiosity, what do you gain by limiting the creation of bios to specific users? Or, what would you lose by having all approved users create a bio? Given that you can filter bio nodes (using views) based on user roles, you might be able to simplify the back-end setup by allowing your approved users to create bios, but then create different displays of users based on role.

Cheers,

Bill


FunnyMonkey
Tools for Teachers

my php snippet that doesn't work.

heather's picture

sorry i had the wrong issue linked above (fixed it) i was trying a PHP snippet.. heh, that is what i was supposed to have linked above. http://drupal.org/node/257147

<?php
 
global $user;
 
$title = ($user->profile-firstname . $user->profile-lastname);
  return
$title;
?>

But of course that doesn't work, since I assume the user information isn't available at the time the bio node is created.

Thanks for your patience thinking this through with me.

I suppose there must be a KISS it kinda work around. I tried, as you might be thinking, to put the firstname/lastname fields in the bio node (instead of default user profile). Then I made them "required" so they could show up in the registration form.. so it seems that since "unauthorized accounts" are not allowed to make a Bio node, well the fields don't show up. Weirdness.

Anyway... your sensible KISS it question: why not just let everyone create a Bio node? Well... good question... It's kinda out of my own hands to make this decision. Only specific people who meet certain criteria will be able to create Bios- as this denotes that they are participating in a certain project, for which they made "an application". The Bio node entails uploading Video, images, etc... and I suppose you're right in asking, why not just let everyone do this? And then only show certain ones...

I think there'd be some expectation, if you created a profile that others should be able to see it. In the framework of the project, it doesn't make much sense to let everyone create a Bio. (some will be artists, some will be arts workers, some will be evaluators, so only artists are making these "participant profiles"; other people just fill in their First/Last real name, and a short "about me" in the default user profile.

Now, I'm not trying to argue for it my way... just explaining the context of the project, and how I've come to this dastardly conclusion that I have to try and bend the Bio node to my will.

I wish I could figure out how to pull fn/ln information from the default user node, and just get it to display on the page, and fn/ln it into the "link" in listings. Again, I may just be having a conceptual problem.

Ooo I thought I was so

heather's picture

Ooo I thought I was so close... I wondered if Views... maybe that's all I really needed...

I went to make a Bio Node view that would show the fields from default user profile.
/admin/build/views/add

--> Fields > Profile: First Name & Profile: Last Name
--> Filters > Node Type: Bio

But of course... The profile fields First name and Last name are not available to the view for the Bio.. I was hoping it would pull the names based on the UID...

... but it's PHP not ESP.

I got some nice MySQL errors when I tried that. Am I missing a trick? Any hints on where to look?

Profiles as nodes

Group organizers

Group notifications

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

Hot content this week