? civicrmdata-contact-view.patch Index: civicrmdata.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/civinode/contrib/civicrmdata/civicrmdata.module,v retrieving revision 1.1 diff -u -r1.1 civicrmdata.module --- civicrmdata.module 24 Apr 2006 22:30:27 -0000 1.1 +++ civicrmdata.module 8 May 2006 04:26:13 -0000 @@ -59,6 +59,7 @@ * Implementation of hook_field(). */ function civicrmdata_field($op, &$node, $field, $a2, $a3, $a4) { + global $user; /* there isn't any need to switch ($op) { case 'view': @@ -75,6 +76,18 @@ $node->$field['field_name'] = $node_field; return '
'. $node_field['view'] .'
'; }*/ + if ($op == 'view') { + error_log("field invoke view"); + switch ($field['field_name']) { + case 'field_contact_ref': + if ($node->field_contact_ref['crmid']) { + $pid = civinode_get_default_profile_id($user->uid); + $contact_node = civinode_util_node_factory($node->field_contact_ref['crmid']); + $output = theme('crm_profile_group', 1, $contact_node); + return $output; + } + } + } } @@ -145,7 +158,8 @@ $options[0] = '<' . t('None') . '>'; } - include_once(dirname(__FILE__) . '/../civinode_utils.inc'); + //include_once(dirname(__FILE__) . '/../civinode_utils.inc'); + $options += civinode_get_allowed_options($crm_entity);