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 »
  • Installing CiviCRM »
  • Drupal Installations (Moderator: Piotr Szotkowski) »
  • Drupal Commons 3.2 & CiviCRM 4.1
Pages: [1]

Author Topic: Drupal Commons 3.2 & CiviCRM 4.1  (Read 5172 times)

fen

  • I post frequently
  • ***
  • Posts: 216
  • Karma: 13
    • CivicActions
  • CiviCRM version: 3.3-4.3
  • CMS version: Drupal 6/7
  • MySQL version: 5.1/5.5
  • PHP version: 5.3/5.4
Drupal Commons 3.2 & CiviCRM 4.1
May 02, 2013, 09:35:19 pm
Are there many users of CiviCRM with Drupal Commons?  There is an overlap between the two systems (Commons and CiviCRM) that is often easy to work with but at other times troubling.

It's the basic things that worry me.  For example, Commons generally accepts a person's first and last names on registration.  CiviCRM also wants this information, and generally obtains it via placing custom profile fields into the user registration and account edit pages.  Views integration makes this CiviCRM custom profile information available to Drupal, but OG and other Commons modules (like realname and commons_profile_social) expect Drupal to know the user's First and Last names. 

I just found civicrm_realname (http://drupal.org/project/civicrm_realname) which "implements hook_username_alter() so that, if available and non-empty, the CiviCRM "Display name" is shown in place of the Drupal login name for username displays."  This sounds quite useful, and will enable me to use the CiviCRM profile to collect a person's First and Last Names.

And it appears the civicrm_og_sync module has been updated recently (http://issues.civicrm.org/jira/browse/CRM-11908) - thanks guys (and gal)!

Are there other areas to watch for?  Am I in for a lot of headaches, or is it relatively smooth sailing as I start to wire these two behemoths together?

Thanks!
=Fen

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Drupal Commons 3.2 & CiviCRM 4.1
May 04, 2013, 11:36:05 am
There are a few other instances of Drupal Commons with CiviCRM. If you search for "Drupal Commons" on this forum you will find a few posts. I am not aware of any major issues.
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

fen

  • I post frequently
  • ***
  • Posts: 216
  • Karma: 13
    • CivicActions
  • CiviCRM version: 3.3-4.3
  • CMS version: Drupal 6/7
  • MySQL version: 5.1/5.5
  • PHP version: 5.3/5.4
Re: Drupal Commons 3.2 & CiviCRM 4.1
May 06, 2013, 01:07:55 pm
Yep, they seem to be working pretty well together.

I'm connecting CiviCRM to a Drupal Commons site that has 30K users.  These users may have Firstname, Lastname fields set in Drupal (e.g., $user->field_name_first) which I'd like to pull in on Synchronize.  It looks like I can use hook_civicrm_pre('create','Profile',$id,&$params)  to do this, as $params['email-Primary'] should be set. If I can use the email address to pull field_name_first and field_name_last from Drupal (this is what I'm currently working on) and add the to the params[] array (as Joomla does) before the call to createProfileContact() then the contact should get created with the Drupal first/last name.

The UFMatch hook could be used instead (already has access to the Drupal UID) but then I'd have to push the firstname/lastname values directly into CiviCRM - though this might actually be pretty easy.

Has anyone else already done this?  If not, once I get this working, I'll post my (mini) module.

fen

  • I post frequently
  • ***
  • Posts: 216
  • Karma: 13
    • CivicActions
  • CiviCRM version: 3.3-4.3
  • CMS version: Drupal 6/7
  • MySQL version: 5.1/5.5
  • PHP version: 5.3/5.4
Re: Drupal Commons 3.2 & CiviCRM 4.1
May 13, 2013, 04:55:14 pm
A basic module for syncing standard Drupal Commons 7.x-3.2 user fields to a CiviCRM v4.3.x contact upon user -> contact sync or update by the (Drupal) user is at:

https://svn.civicactions.net/repos/foster/fosterclub/trunk/modules/custom/civicrm_commons/civicrm_commons.module

The synced Drupal fields are:
  • First Name
  • Last Name
  • Facebook URL
  • LinkedIn_URL
  • Twitter_URL

While there could be problems caused by data duplication mis-match if changes are made to the CiviCRM contact (as syncing is one-way only) in our use case, we expect changes to these fields to only be made by the Drupal user.

Note that it hard-codes the custom field ids for the Facebook, LinkedIn and Twitter URLs that were created locally in a 'Social Media' fieldset.  (The code also has commented out code that could be used to obtain these dynamically, assuming they were labeled appropriately.)

Let me know if this is useful to anyone.  Comments, suggestions welcome.

fen

  • I post frequently
  • ***
  • Posts: 216
  • Karma: 13
    • CivicActions
  • CiviCRM version: 3.3-4.3
  • CMS version: Drupal 6/7
  • MySQL version: 5.1/5.5
  • PHP version: 5.3/5.4
Re: Drupal Commons 3.2 & CiviCRM 4.1
June 24, 2013, 07:09:01 am
The module is still pretty basic - and still in dev state - but has been promoted to project status on drupal.org - see: https://drupal.org/project/civicrm_commons

BetaTheta

  • I’m new here
  • *
  • Posts: 2
  • Karma: 0
  • CiviCRM version: 4.3
  • CMS version: Drupal
  • MySQL version: 5.5
  • PHP version: 5.4
Re: Drupal Commons 3.2 & CiviCRM 4.1
July 27, 2013, 06:19:11 pm
Hey Fen,

I'm really interested in the integration of Drupal Commons/CiviCRM. I sent you an email, but I figure I might as well ask the same questions here:

- do you run Commons and CiviCRM on the same site (e.g. www . example . com) or do you use a multi-site setup with the Domain Access module (commons . example . com and civicrm . example . com)?

- if you do run them on the same site, how does the theming work out? I'm really curious to know how the Drupal Commons Origin theme plays with CiviCRM.

Thanks

fen

  • I post frequently
  • ***
  • Posts: 216
  • Karma: 13
    • CivicActions
  • CiviCRM version: 3.3-4.3
  • CMS version: Drupal 6/7
  • MySQL version: 5.1/5.5
  • PHP version: 5.3/5.4
Re: Drupal Commons 3.2 & CiviCRM 4.1
July 29, 2013, 03:53:49 pm
I run civicrm as a module in commons as if commons was simply drupal. No domain module, same site.

I set the the CiviCRM admin theme to Seven (single column) but have also had good luck with Antonelli - a fluid width subtheme for Bartik.  On my site, users don't directly access civicrm, but may via webform_civicrm and/or views integration.

Hth,
=Fen

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • Drupal Installations (Moderator: Piotr Szotkowski) »
  • Drupal Commons 3.2 & CiviCRM 4.1

This forum was archived on 2017-11-26.