To answer your question, I wrote a module:
The code snippet I posted below probably wouldn't work because of timing issues (by the time the block was being printed it's too late to add the header). Seemed better to package it up into a module. Enjoy.
I had the same problem today, so I looked in the source code.
In civicrm.install there's a function called _civicrm_get_db_config. It's looking in the $databases array for an element with a key civicrm. So I added this to settings.php:
$databases['civicrm']['default'] = array (
'database' => 'civi_db_name',
'username' => 'mysqluser',
You can use the Views Rules module: https://www.drupal.org/project/views_rules
This will provide a Views Loop: from the project page: "A view loop is similar to a regular Rules loop, but allows looping over rows of view results."
So enable that module, and then create a view that lists contacts that are in the group you desire.
Some basic instructions ...
So a little research takes me to Totten's blog where he lays out the rational for splitting out entity definitions into seperate PHP files.
The full definition of the array format is laid out in the hook_civicrm_managed guide and an example .mgd.php file is here
Since yesterday you can now do that if you're using Drupal! @jackrabbithanna (Mark) added some code to CiviCRM Entity Project, which now exposes civicrm_contribution_recur as an Entity in Drupal so that you can manipulate it in Drupal like any other Entity. Will post some steps/screenshots here:
git clone https://github.com/jackrabbithanna/civicrm_entity....
I admire the principle of not being too ambitious in building customizations, but I worry that you'd be going through far more trouble than you'd need to. You might consider just building a custom Drupal module that did exactly what you need.
Set up a Drupal form with all the fields that you need. Then in the submit function, use the CiviCRM API to create ...
I found the best introduction was this workshop: https://denver2015.civicrm.org/sessions/civicrmdrupal-integration-showcase The PDF on that page is helpful; the video of the workshop is available here: https://www.youtube.com/watch?v=i2GpnrVGdrc.
Note also that there are significant plans underway for CiviCRM Entity announced this week, see here: https://...
I wish i would have seen this question earlier, I can certainly help you out.
checkout civicrm_entity.api.php in the civicrm_entity module
I don't believe the controller is checking the ACL's when loading an entity. We may be able to add 'check_permissions' => True to the call there in civcirm_entity_controller.inc CivicrmEntityController::loadEntites... ...
This can work -> when on the Contact Summary View -> under Actions -> an Admin can create a user account for that Contact;
And then to Automate this workflow: you can use CiviCRM Entity module + Drupal Rules configured to create a Drupal user account when a Membership (of specific id) has been added;
As with many problems with Drupal integration civcrm_entity is the answer.
Install the latest civicrm_entity module for Drupal in the usual way (Recommend using Drush if you can).You'll also need to enable the civicrm_entity_views_extras sub module.
We'll be using drupal views to display the results so if you have your Drupal and Civi in different ...
There is still work to be done to get this firing fully - and you many need to reach out to some of the Partners to help get things working sufficiently for your scenario. There are a number that have done a bunch of work in this area.
There are some other Drupal tools that aren't fully firing with civicrm, ones that we use in pretty much every development ...
Congratulations, you're the winner of jackrabbithanna's Friday open source evening random issue choice award!
I've added a configuration option to CiviCRM Entity to be able choose a few options for what the civicrm contact entity label should be.
You'll find a fieldset 'Options' at the configuration page: 'admin/structure/civicrm-entity/settings'
Graham - I've reproduced that. Not seeing the date of birth field either. Seeing lots of other dates though. Not sure what's going on. Could you please open an issue here: https://github.com/eileenmcnaughton/civicrm_entity/issues
Update: this is now top of the list for D8CE.
Updated: this is fixed now as of https://github.com/eileenmcnaughton/...
You can cut down one step by assigning the to be imported contacts an external ID; then also use that external ID to import the Activities.
Other than that - we end up writing mysql queries to import on an going basis from other data systems - once these queries work well they can then be bundled into an extension - so admin staff can initiate/run the ...
Not everyone has the skills to create extensions. But here are a couple of links that you might find useful:
The description of what I'm trying to do is below, and you can download (and/or pitch in) on the current versions of the Rules below at this GitHub repo.
In creating the CiviCRM Contribution record, I haven't been able to figure out how to set the Receive Date. I can't input the token for the date of the order because that ...
So my understanding of your use case is that you want to record in the back end in-kind donations related to items to be auctioned off in bundles. I assume that each item has its own valuation, and that you are mainly interested in getting a custom field on the contribution to reference an item. (I would guess the bundles of items are the sales side of the ...
This is a great question and frankly I've found it challenging to "seamlessly" integrate Drupal and Civicrm. I have successfully used the Drupal Rules module and Civicrm Entity to make Civicrm updates. Alternatively, you can use the rule module and a PHP snippet to invoke the Civi API and make the update.
The civicrm_entity / rules approach does not let ...
One possibility would be to use views module to create a view that displays auction package nodes, with a contextual filter for the contribution reference field. Then you provide a block display and configure the block to show on contribution pages; it should show the package that is referencing that contribution.
This doesn't pull any Drupal entity data ...
I'd suggest you start at https://docs.civicrm.org/ You'll want to read through the User Guide to get an understanding of what CiviCRM is and what it can do. In particular, you will need to study the Membership and Contributions sections.
From there, head to the Developer Guide to learn how to create an extension, how the API works, what hooks are and how ...
The successor to the Sunlight API Dupal module is the Civi-native Electoral API extension. I wrote documentation back when I was collaborating on the project, but it seems to have been taken down. I will investigate finding a copy and getting it online.
You may also be interested in the CiviCRM for e-advocacy page.
The rule will only trigger when the Drupal version of the contribution page at path /civicrm-contribution-page/(id)
We haven't added a feature to trigger the rule event when the civi version of the contribution page is viewed.
You can also use webform + CiviCRM Entity + rules + webform rules to do this job. You would need to gather all required fields for the event on the webform, and map the submitted values properties and use a create entity action
I need to add an option "Tag ID" in the Host Source Column field setting of the CiviCRM Entity Reference module to make this work.
It won't take much to add it.
Look in your code to the matching file, add:
'tag_id' => 'Tag ID (Entity Tag)',
Part of the process that CiviCRM Entity uses to integrate is to read metadata on the civicrm API entities, and also for fields with options lists, it fetches those with an API call...
This API call :
$result = civicrm_api3('Relationship', 'getoptions', [
'field' => "relationship_type_id",
Is what is producing the warning...
I'm calling this a ...