10 February, 2011
By Eileen
Filed under Architecture

It seems like time to give people a quick update as to what api v3 is about. API v3 will be shipping with CiviCRM 3.4 and basically it's like v2 but more so. Well, it's like bits of v2 api and all the other bits have been changed to be like those bits... make sense?


The key to v3 is standardisation. All the api have files now represent their entity (which is generally their table name) - membershipContributionLink is now called MembershipPayment. The mismash of things in the UFGroup (or whatever it was) have been split out into UFField, UFGroup, UFJoin, UFMatch (who knew we had an api call that could return a contact's user_id & vice versa?). We're not 100% there on everything but we've made a big step forwards. Some api that I couldn't make sense of haven't been brought across at this stage (volunteers welcome) - the  civicrm_uf_profile_groups_ functions spring to mind.


The functions in each api are now all called



Read more
12 November, 2010
Filed under Architecture, CiviCRM, Drupal

This is a summary of ideas from this forum topic, http://forum.civicrm.org/index.php?topic=15983 , and discussion should continue here.


I'm working on a CiviCRM/Drupal installation for an organization that puts on workshops and houses and feeds people for the duration of the workshops.  CiviCRM's built-in way of handling price sets as flat lists of options and prices, doesn't quite do what we want.


We need events to have many signup options, including length, since we sometimes give the option to attend partial workshops, and fee level, since we have different pricings for students and the unemployed.  Many other options' prices, in turn, need to depend on the length field and the fee level field - for example, housing option prices need to be adjusted based on length of attendance selected, since a private room for a weekend would not cost...

Read more
30 October, 2010
Filed under v3.3, Architecture, CiviCRM

I have been working on dedupe optimization, part of 3.3 release and a make it happen project, and we are quite happy with the results. A fuzzy rule (first+last+email) which would take 4.3 mins on a 65K contact database, now takes 1.02 sec (tested on a iCore5, 4Gig machine). On a 1.45 million database same rule which used to take forever (i had to quit after 1 hr), now takes 13 sec. Below are some more stats.


65 K Contacts 1.45 M Contacts
Old code New code Old code New code
Fuzzy Rule Strict Rule Params Strict Search Params Fuzzy Search Fuzzy Rule
Read more
01 October, 2010
By xavier

Hi all,


For the training in london, we wanted a simple example that illustrates how to customise and improve civicrm for specific usages using the ajax interface. I'm sharing the result with you, hoping you will find it useful.

One common workflow we have is to change the status of an activity from "scheduled" to "complete". The default way is to click on edit, go to the full form, change the status, save, and go back to the list of activities

We are going to improve it with a "one click click complete": on the list of activities, we transform the status column into an action (when "scheduled"), and when I click on it, it changes it to Completed, without changing screen. For that, we are using the ajax interface and the activity api....

Read more
09 September, 2010
By michal
Filed under v3.3, Architecture, Extensions

This blog post is outdated. For latest information about how to create extension, please refer to Extensions Wiki Page.


It had to happen sooner or later - CiviCRM is growing with with variety of functionality, where people can plug in their own, custom pieces and make CiviCRM more tailored to their needs. Most prominent examples at the moment include payment processors, custom searches and custom reports. Don't confuse it with "larger scale" customisation, like writing Drupal modules which - using API and hooks - modify CiviCRM behaviour. We're talking about well defined, self-contained pieces of code which throw in some useful functionality into your existing installation. As of now, it's a bit of a hassle to install them - you need to put files in proper places, register them using administrator section and so on: nothing...

Read more
17 August, 2010
Filed under Architecture

Tokens are used in CiviCRM to create mail merges in much the same way as, for example, Microsoft Office. They are currently implemented in (at least) four places in CIviCRM: 'CiviMail', 'Send Mail to Contacts', 'Create PDF Letter' and 'Create Mailing Labels'. Out of the box Civi comes with a decent set of tokens, including tokens for all the address fields. One thing it doesn't do is provide a token that correctly formats an address block taking account of when fields aren't present. For example, if i used the following address tokens for my address:

 {contact.street_address} {contact.supplemental_address_1} {contact.supplemental_address_2} {contact.city} {contact.postal_code} 

It would look something like this:

109 Roding Road

London E5 0DR

i.e. two blank lines make a big gap which doesn't look great. Civi has already solved the address formatting problem in other places including mailing labels and on the contact view screen. And Civi has a...

Read more
10 August, 2010
Filed under CiviMember, Architecture

Being able to efficiently identify and merge duplicate contacts and related data is be an important -- and often time-consuming -- task for organizations getting data from multiple sources. The current CiviCRM dedupe and merge process does not scale well beyond a moderate number of contacts and consequently there has been dicussion on the forums and IRC about optimizing the dedupe and merge code in CiviCRM.

Niro Solutions and the International Mountain Bicycling Association (IMBA) and have jointly made funds available to sponsor this work and we are opening up the project scope for discussion before work begins. The aim is to to have the enhanced functionalty in core for the CiviCRM 3.2.2 release.

Donald Lobo laid out the high-level goals of the project:

  • The ability to scale the dedupe process to at least one million contact records
  • Significantly improve import/event registration/contribution/other workflows that use dedupe
  • Be...
Read more
22 July, 2010
Filed under Architecture, Drupal, Schools
A school needed an online admission application process to be developed and integrated with CiviSchool. The application form is a different workflow from the online family forms. Web Access helped convert this idea to working application as part of the CiviSchool Project. I have been working with Web Access on this project and we have completed most of it. Now seemed to be a good time to let everyone know about what we have done so far. Here is how the admission workflow is -
  • Parent account setup : A parent goes to the school site and uses a civicrm registration profile to create an account and enters the site. The account automatically gets assigned a "Applicant Parent" subtype.
  • Filling admission application...
Read more
19 June, 2010
By xavier
Filed under CiviEvent, v3.2, Architecture
Thanks to the good folks at the Party of European Socialists that sponsored the feature, Tech To the People... Read more
14 June, 2010
By lobo
Filed under Architecture, CiviCRM
While doing a deployment for a large organization, our good friends at Rayogram hit upon a pretty severe export scalability issue. The primary export was failing for approx 40K rows. They contacted us to see if we can figure out whats happening and why. They first assumed that the big issue was using a custom feature (merge same address / merge household address) and wanted us to look at it and potentially optimize and fix the issue. In general dealing with memory issues in PHP are not something i look forward to (it comes a close second to debugging core dumps in PHP). Basically you cannot afford to leak a lot of memory in every iteration. For the export, if you leak 10K for every iteration, u will need 400M for a 40K export not including any of the memory used before export was called. On my initial tracing of the code we were leaking between 15K of memory for every iteration. On my local labtop, i could process approx 5K contacts before... Read more