CiviCRM Developer Training

CiviCRM is a powerful, free and open source (AGPL-licensed) web-based contact relationship management (CRM) system that focuses on the needs of non-profits. A growing number of CivicActions’ clients employ CiviCRM to support membership and contribution management, events, group mailings and report generation. With every release, CiviCRM is adding features and capabilities while simultaneously increasing its flexibility, modularity and usability. The latter trend is essential and greatly welcomed by the community as the already existing large set of features have generated a degree of code complexity that makes CiviCRM difficult to understand and extend by (say) a typical Drupal developer.

Members of the CiviCRM Core Team, including the project’s founder Donald Lobo, Dave Greenberg, Kurund Jalmi and Deepak Srivastava host regular user and developer trainings around the world to support the growing community and to encourage community involvement. I attended the two-day developer training “Configuring, Customizing and Extending CiviCRM” in New York City this past September, and found it rewarding. As suggested, before attending I read the “Extending CiviCRM chapter of “Understanding CiviCRM” online book. Though the training covered many of the same areas as the book, being led through the process of actually implementing new features using CiviCRMs APIs and hooks as well as having direct access the the core implementation team greatly deepened my understanding of how it all works. There’s a lot of “magic” in CiviCRM that makes many common tasks very easy. But as with Drupal, if you don’t already know the hooks and have a feeling for how and where they can be used, even simple extensions can be a bit daunting. That’s where this training – as well as the community supported IRC channels and forums – come in handy.

After some coffee, bagels and introductions, Lobo kicked things off by reviewing new features of the current stable version 3.2 code base. These include enhanced usability, PHP 5.3 compatibility, free tagging (for cases and activities) and price sets. Then he covered some coming v3.3 features, which included de-dupe optimization, a first version of database logging, CiviEngage and a new mechanism for CiviCRM plugins that supports payment processors, custom search and custom reports. Having bumped against the problems each of these forthcoming features are targeted to solve, I look forward to building future sites with CiviCRM v3.3. Of course, I also look forward to building sites with Drupal 7, but it is likely that I will have to wait until CiviCRM 3.4 for Drupal 7 compatibility.

Then Kurund gave a quick code layout overview and reminded us of some debugging tips, in particular, adding &smartyDebug=1 to a GET request will expose the smarty variables (when CiviCRM debug is enabled). Also, adding &directoryCleanup=1 (or 2, or 3) will remove Smarty templates (or temporary files, or temporary files & uploaded files). Handy.

Next we embarked upon a series of hands-on exercises to explore the growing collection of CiviCRM hooks. We began by adding a Social Security Number (SSN) entry field to the New Individual Contact form. This process included creating a new ‘civicrm_ssn’ table, overriding the CRM/Contact/Form/Edit/Individual.tpl template (and setting up the requisite custom templates directory in Global Settings >> Directories) to support the new text field, and creating a new “civicrm_ssn” Drupal module to hold the logic. I have attached the working code for my civicrm_ssn.module which makes use of the hook_civicrm_buildform() hook_civicrm_postProcess() and hook_civicrm_validate() hooks. Further refinements might include encrypting the SSN before storing it in the database, and indeed some of the more advanced participants worked on this while others (like myself) worked to get the basic functionality working.

Interspersed with coding sessions were presentations by the New York State Senate (presented by Kyle Jaster of rayogram, 63 CiviCRM instances – one per district – with over 15 million contacts total), The School Module (by Lobo), SimplyCivi (also by Kyle, a Drupal-7-ish CSS-based overlay for CiviCRM admin pages), and I reported on two CivicActions projects: Amnesty International (140K contacts, extensive use of CiviMail and custom searches), and The Recording Academy’s Grammy365 “social network” that pushes the boundaries of membership management due to the rigorous and oft-times ad-hoc membership rules.

Then back to some hands-on work with Andrew Hunt leading us through the development of an events calendar using Drupal Views integration. The interface for this is now all point-and-click, largely thanks to Views 2. It’s amazing how powerful these tools already are, and the future promises much more. And Deepak took us on (what was for me) a whirlwind tour of customizing CiviReport first by adding first name, last name and gender to the Constituent Summary Report. What I didn’t dive into at all was a quick session by Kurund on jQuery, and while some worked on creating custom searches, I continued working on – and getting help with – my custom CiviReports.

While I was clearly not one of the most advanced programmers in the room, I learned a lot and could tell the time was useful for those at all levels. IRC channels and forums and great, but when it comes down to it, nothing can beat having the core developers looking over your shoulder and offering hints and sharing their expertise. And what I haven’t mentioned is that at the same time as this developer training, they also have a User and Administrator Training that covers installation and configuration of virtually every feature in CiviCRM. If you are doing any work – at any level – with CiviCRM, you will find that one or the other of these trainings is just right for what you need. See for the dates and locations of future trainings. Further, Gregory Heller runs a series of excellent single day User Trainings that are ideal for organizations considering CiviCRM or for administrators who want to know more about what their existing CiviCRM implementation can do.

2017-03-31T06:20:11+00:00 Categories: Development, Nonprofit|

About the Author:

Fen joined CivicActions as an Engineer in 2005. Bridging the gap between the technical and business aspects of projects, he has a hand in all stages of software development, from requirements gathering and analysis to specification, implementation, documentation and maintenance. Fen is a change-maker both at work and in the world community, constantly seeking solutions to make things work better — from software to social justice and beyond.

Having spent over twenty years at the leading edge of programming, networks, system architecture, and information technology, Fen combines his deep experience and inventive drive to bring valuable improvements to CivicActions teams, processes, and clients. His pivotal contributions include:

  • Developing tools to support process flow and empower distributed teams to collaborate
  • Implementing a public key management system for smooth transitions of team members
  • Co-authoring the CivicActions Security Policy to ensure the safe handling of client data
  • Adding automated testing into the tool chain for better system performance
  • Exploring the inclusion of security compliance as part of continuous integration

Fen has served many high-profile clients during his tenure at CivicActions, including Amnesty International, Buckminster Fuller Institute, Democracy Now!, the Grammys, Women’s Funding Network, CNU, Sedona, SACNAS, EJUSA, Smithsonian Institution, and FosterClub. He is currently implementing an automated compliance process as the Information System Security Officer (ISSO) for the U.S. Department of Defense Security Cooperation Agency (DSCA).

Prior to joining CivicActions, Fen made many valuable contributions to his field through the founding of two companies (OpenPrivacy and Identity Commons) and his work on the Inter-Process Communication “socket” protocol with Bill Joy at Berkeley Systems Design. He also worked for General Magic and Oracle. As a student at M.I.T., he developed the first personalized “digital newspaper,” which resulted in a grant that helped launch the M.I.T. Media Lab.

Fen earned a combined Bachelors and Masters degree in Electrical Engineering and Computer Science from the Massachusetts Institute of Technology, where he was the founder and first president of the M.I.T. Ultimate Frisbee Club. He enjoys disc golf, mountain biking, photography, and watching his teenage son play hockey.