Could you possibly add this one teeny tiny function to bio? :)

function bio_preprocess_author_pane(&$variables) {  
  $bio_type_name = bio_get_type();
  $variables['profile_node_ids'][$bio_type_name] = bio_for_user($variables['account']->uid);
}

What it does is makes available the nid of the profile node associated with the user in the account pane in AF/APK. This is a first step in making fields from that node available. The reason I'm just getting the ID and not doing a full node load is that this author pane could be on 50+ forum replies and that would do a full node load for each user which would be a performance nightmare.

I'm hoping to get a similar function into nodeprofile and, for D6, content profile so there is a consistant naming of $profile_node_nids[NODE_TYPE] for all three modules. Then AF/APK can act on the nid without caring what module people are using for profiles.

Thanks,

Michelle

Comments

Allie Micka’s picture

Status: Active » Postponed (maintainer needs more info)

What's the status of this? Is this still required?

It seems like such a thing might be possible in your module by creating a configuration interface to choose the user profile type(s), and then join on uid ownership for nodes of that type. Since all of the profile-as-node modules set uid's according to profile owners, it should allow you to remain PaN-module-agnostic.

it seems that this would be more configurable, because your admins could include/exclude node types based on an administrative choice. Meanwhile the PaN modules that support multiple node types would not be able to make an accurate prediction of how those node types might be used. So if my PaN module allows content of multiple types (which, yes, Bio doesn't do), the administrator knows that nodes of type "Profile" have meaningful information. And she knows that nodes of type "Business Listing" aren't pertinent to what your module is doing. The administrator can whitelist nodes of the relevent type, and they can appear in your listings based on ownership.

Would that work for you?

Michelle’s picture

Status: Postponed (maintainer needs more info) » Closed (won't fix)

Oh, heh, I totally forgot about this issue, sorry. Your suggestion is interesting but totally overkill for this. At any rate, I gave up on getting other maintainers to handle their own preprocess and ended up pulling all but a few into Author Pane itself. I didn't do one for Bio but haven't had anyone complain and I'm done with D5 now. So don't worry about this issue.

Thanks,

Michelle