Upcoming Events

NYC CiviCRM Meetup - September 7th
September 7th, 2010
This next NYC meetup will feature a case study or 2, a look at what's new in (more...)

Configuring, Customizing and Extending CiviCRM - New York
September 16th, 2010
This comprehensive two-day hands on training course is targeted at (more...)

CiviCRM User and Administrator Training - New York
September 16th, 2010
A comprehensive two day hands on training course covering the configuration, (more...)

CiviCRM Code and Test Sprint - New York
September 18th, 2010
This code and test sprint is targeted at experienced developers who want to (more...)

CiviCRM Toronto Meetup
September 21st, 2010
Come meet others from the Toronto Area who are interested in, using or (more...)

CiviCRM Philly Meetup – September 2010
September 23rd, 2010
Come meet others from the Philadelphia Area who are interested in, using or (more...)

CiviCRM Seminar - Dublin
September 28th, 2010
NfP Services are hosting a free seminar at The IBOA, Stephen St Upper, Dublin 8 (more...)

London developer and implementer training
September 30th, 2010
This comprehensive two-day hands on training course is targeted at implementers, (more...)

London user and administrator training
September 30th, 2010
A comprehensive two day hands on training course covering the configuration, (more...)

Berlin user and administrator training
October 6th, 2010
A comprehensive one day hands on training course covering the configuration, (more...)

Berlin developer and implementer training
October 7th, 2010
This comprehensive one-day hands on training course is targeted at implementers, (more...)

Benelux meetup in Brussels: Connect, communicate and activate your supporters and constituents
October 11th, 2010
Come meet others who are interested in, using or developing for CiviCRM. For (more...)

CiviCRM Toronto Meetup
October 19th, 2010
Come meet others from the Toronto Area who are interested in, using or (more...)

CiviCRM Toronto Meetup
November 16th, 2010
Come meet others from the Toronto Area who are interested in, using or (more...)

CiviCRM Components

Tools for engaging your supporters...

CiviContribute


CiviEvent


CiviMail


CiviMember


CiviReport


CiviCRM integration with views ...

Not Just a Contact Database

These optional components give you more power to connect and engage your supporters.

  • civiEVENT

  • Online event registration and participant tracking.

  • civiMEMBER

  • Online signup and membership management.

  • civiMAIL

  • Personalized email blasts and newsletters.

  • civiREPORT

  • Report generation and template management.

June 28, 2008 - 14:03 — lobo

The Drupal Views module has some pretty cool functionality. Views 2 fixed the "everything is a node" concept from Views 1, this enables integration with CiviCRM (which does nothing with nodes). A concise description of Views from its project page: This tool is essentially a smart query builder that, given enough information, can build the proper query, execute it, and display the results.

CiviCRM profiles (in view/search mode) behaves like views. However it is not a flexible or configurable as views is for the end user. Integrating with views also allows the potential of integrating CiviCRM information with other Drupal specific information. e.g. Contact information on folks who are most active on your blog / forum / comments

I took user.views.inc as a model and started hacking away to create civicrm.views.inc. You can get a copy of that file from our svn respository. So far its quite simple and just integrates the civicrm_contact and civicrm_email tables. I hope to add the phone/address fields in the next couple of hours/days and get a better idea of how to potentially generalize it.

I'd like to generate that entire file (civicrm.views.inc) directly from our xml schema definition. We know most of the information we need there and with a few smarty class stubs, i think we can do this easily.. This will allow us to improve and support a lot of the core civicrm tables and also the various component tables (contribiution, membership etc)

One thing which i have not yet figured out is if views can generate sql queries across multiple dbs. In the past we have recommended that folks store the civicrm data in a separate db, so multi-db support would be nice. MySQL does support it (with appropriate permissions), so you can have a query like:

SELECT d.uid,  d.name, c.id, c.display_name
FROM   drupal6.users d,
       civicrm21.civicrm_contact c,
       civicrm21.civicrm_uf_match uf
WHERE  uf.uf_id = d.uid
AND    uf.contact_id = c.id

If you are a views/civicrm hacker and have an interest in pushing this project forward, please contact me via email/irc

Update: I've made quite a bit of progress and civicrm.views.inc now understands the email and contact table. I'll start adding more fields and automate that over the next few days. Once Views2 goes RC, i'll add it to sandbox so folks can get an idea of the power of a CiviCRM / Views integration

( categories: )

Comments

The link to the SVN repo

The link to the SVN repo gives a 404 File Not Found.

The current/correct path is here:
http://svn.civicrm.org/civicrm/trunk/drupal/modules/views/

Looking at the code now.. I am hopeful for this. There is a huge need for up-to-date Drupal docs on integrating external (non-Drupal) dBs into Drupal Views. The few tutorials I found are obsolete, not reflecting changes Views.

Any progress?

Hi Lobo,

have you made any progress on the integration with the Views2 module of Drupal?

I have tried your file, but it doesn't seem to get loaded by the Views module. As if he doesn't find the civicrm.views.inc file (I have placed it into the modules/civicrm/drupal folder). Should I do something else as well to get it working?

no progress

hoping that someone in the community steps up and runs with it. My work was more a proof of concept with an earlier version of views2. you'll need to look at the code debug it to get it working etc. If there is enough interest, we will work on this at CiviCamp

Awesome lobo, Having this

Awesome lobo,
Having this would also take care of the most common reporting needs. Only time will tell, but I see the ability to easily make complex reports with Views as being a big draw to the platform.

--
Dave Hansen-Lange
Web Developer
Advomatic LLC
http://advomatic.com
Hong Kong office