Profile fields on Usernode nodes

IceCreamYou - February 27, 2008 - 02:41
Project:Usernode
Version:5.x-1.3
Component:Miscellaneous
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active
Description

My primary interest in Usernodes is that it allows me to search my users via Views. However, I would like to be able to search users via profile fields (in particular, users' real names), and that's not possible as it stands.

The solution that would be easiest would be to just dump all the information from all the public profile fields onto the usernode. That would be acceptable for my needs, but the best option from the administrative user's standpoint would be to allow a set of checkboxes on the settings page which enabled/disabled each profile field individually.

I understand that this can be done via theming and such--in fact, that's what I'm planning on doing until this feature gets implemented or is denied--but as a general usability thing it would have been nice if I didn't have to go look up commands I've forgotten just to be able to search users.

Thanks.

#1

IceCreamYou - February 27, 2008 - 05:39

Update: I'm not sure exactly what the Views Fastsearch module searches for when it filters through nodes, but it's not finding anything in the profile field "profile_real_name" when I use the code below in node-usernode.tpl.php. This is strange, because you'd think that if I made the text show up on the Usernode, it would find it. As-is, the code below produces the result "Name: Test" assuming the user inserted the word "Test" in his Real Name profile field.

This is the code I'm using in node-usernode.tpl.php in Bluemarine on MySQL 5.0.45:

  <div class="profile">
    <span class="profile-profile_real_name"><strong><?php print "Name: "?></strong></span>
    <?php $result = db_result(db_query("SELECT value FROM {profile_values} WHERE fid = '33' && uid = '%s'", $uid));
      print
$result?>
</div>

My temporary solution is to use some tricks with NodeProfile that I hadn't thought of before.

 
 

Drupal is a registered trademark of Dries Buytaert.