CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Drupal Modules (Moderator: Donald Lobo) »
  • Views suport for custom fields using the civinode/cck module in Drupal 5
Pages: [1]

Author Topic: Views suport for custom fields using the civinode/cck module in Drupal 5  (Read 2183 times)

kaysea

  • Guest
Views suport for custom fields using the civinode/cck module in Drupal 5
April 19, 2009, 06:44:47 am
Hello,

In a nutshell, I'm able to pull native CiviCRM fields into a view, but not the custom ones. Let me also say, that I am a far-cry from a developer so bear with me if I need a little hand-holding.

Here is my post on drupal.org outlining my process/problem: http://drupal.org/node/434974
Here is the post (replied to by the module maintainer) that makes me think it's possible: http://drupal.org/node/194493

I also poked around the civinode_views.inc file in the module and noticed this part of the code that pulls the data based on the field name...seems to me that it doesn't like numeric values. (again, I'm pretty good at getting the gist of the code...but debugging is hard for me)

**********

function civinode_view_contact_field_view_handler($fieldinfo, $fielddata, $value, $data) {
  if (!is_numeric($value) or $value == 0)
    return FALSE;
  $contact = array();
  _civinode_cck_cache_mgr('fetch', '_crm_views', $value,$contact);
  if (!$contact)
    return FALSE;
  $field_name = $fielddata['options'] ?
                   $fielddata['options']:
                   'display_name';
  $modified = $contact[$field_name];
  if ($modified)
    return $modified;
  else
    return $value;   
}
**************************

If I'm reading this right...is it possible to adjust this function to that it will accept the ID's of the custom fields maybe by inputting something like "custom_id#"?

Thanks in advance for any assistance you can provide.

Kristin
PS. I'm happy to make up any lack of skills to modifying code by adding to the documentation.

I'm using Drupal 5 with civicrm 2.0.5 (Upgrading to 6 isn't an option right now)
« Last Edit: April 19, 2009, 06:49:24 am by kaysea »

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Views suport for custom fields using the civinode/cck module in Drupal 5
April 19, 2009, 07:08:35 am

Your best bet will be to follow this up on the drupal issue queue / module maintainer himself. The core team is not familiar with the CiviNode module

Note that in CiviCRM 2.2 the views integration module is part of the CiviCRM distribution

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

kaysea

  • Guest
Re: Views suport for custom fields using the civinode/cck module in Drupal 5
April 19, 2009, 08:39:42 am
Yeah....I've emailed the module maintainer directly last week...and no reply....so I thought I'd try here too. I'd love nothing more to upgrade but right now I don't have the money, time, nor expertise to face it.  :( Thanks for your help.

Cheers,
Kristin

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Drupal Modules (Moderator: Donald Lobo) »
  • Views suport for custom fields using the civinode/cck module in Drupal 5

This forum was archived on 2017-11-26.