Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
CiviCRM Cookbook

You're reading from   CiviCRM Cookbook Improve your CiviCRM capabilities with this clever cookbook. Packed with recipes and screenshots, it's the natural way to dig deeper into the software and achieve more for your nonprofit or civic sector organization.

Arrow left icon
Product type Paperback
Published in Jun 2013
Publisher Packt
ISBN-13 9781782160441
Length 236 pages
Edition 1st Edition
Languages
Tools
Concepts
Arrow right icon
Toc

Table of Contents (13) Chapters Close

Preface 1. Setting Up CiviCRM 2. Organizing Data Efficiently FREE CHAPTER 3. Using the Power of Profiles 4. Controlling Permissions 5. Managing Communications 6. Searching and Reporting 7. Integrating CiviCRM with Drupal 8. Managing Events Effectively 9. Using Campaigns, Surveys, and Petitions Effectively 10. Working with CiviMember 11. Developing for CiviCRM Index

Developing a CiviCRM Drupal module

In this recipe, we will explore how a CiviCRM Drupal module works. The basic code for this module is already available online.

How to do it…

In this example, we have a contact that is in a specific group. We are going to fire off an e-mail if someone edits that contact.

  1. Set up your own local development environment.
  2. Download, install, and enable the Drupal Devel module, available at http://drupal.org/project/devel.
  3. Navigate to https://github.com/eileenmcnaughton/civicrm_developer.
  4. Download the ZIP file for the module and expand it. It expands as a directory called civicrm_developer-master.
  5. Rename it civicrm_developer.
  6. Install and enable the module.
  7. In CiviCRM, add a contact to a group. Make a note of the contact ID; in this case, it was 51.
    How to do it…

    Here, a contact was added to the Media group.

  8. Navigate to Contacts | Manage groups. Note the ID of the Media group. In this case, the ID was 7. In your own implementation, the ID is likely to be different.
  9. Click on the Edit...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image