Active
Project:
Activism
Version:
6.x-2.0
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
6 Aug 2009 at 22:26 UTC
Updated:
29 Jul 2010 at 21:49 UTC
Jump to comment: Most recent file
Comments
Comment #1
johngriffin commentedHi, I'm interested in collaborating on this, please let me know if any code already exists?
Comment #2
TallDavid commentedIs there any chance the CiviCRM integration will be usable for the 2010 campaign season?
Comment #3
johngriffin commentedHi, I've attached the code which we wrote to insert activism sign-ups into civicrm as activities.
It's a bit messy and has some values in there which are specific to our use but hopefully we'll be able to clean it up a bit. There are two functions, which may be renamed and moved to another module as they do not implement hooks:
/**
* Generate a CiviCRM contact for use with the ativity we will register later
*/
function activism_get_civicontact($email, &$form_state )
/**
* Create a new activity record in civicrm
*/
function activism_civicrm_create_activity( &$form, &$form_state )
At the moment we're simply calling activism_civicrm_create_activity() in the submit handler of a custom module called activism_appeals but if this doesn't make it into activism module then it's probably best to create your own module, use hook_form_alter to add a custom submit handler to the activism sign up form, and call activism_civicrm_create_activity() from within that submit handler.
Comment #4
joe-b commentedI've done a load of work to improve the integration of the module with CiviCRM, and to make Activism more 'international' - collect countries in the petition form, allow states/provinces other than US states. With CiviCRM, all the countries and provinces are available in the CiviCRM database, so I've amended Activism to access these, and to use AHAH to update the available states.
I've also changed the content type name to 'activism_campaigns' - 'campaigns' is a rather generic name, already used by an existing CCK custom content type in my case.
I've taken @johngriffin's advice and dropped some of the extra CiviCRM stuff into an extra custom module (activism_petitions) - this really ought to be integrated into the main Activism modules, if acceptable. I've also taken out his own specific code and generalised it by adding a config field to select the Activity type from those available in CiviCRM directly.
I submit the work here for review.
The changes I've made have some knock-on effects - by adding in countries and selecting provinces accordingly, the tool needs to have access to all the country > province data. That's fine if CiviCRM is available, but is a problem otherwise - I guess that data is covered by the CiviCRM user licence, so there may be options to make use of it in Activism module.
Comment #5
meecect commented+subscribe
Comment #6
Neil Adair commentedI've tried this out and it works well. I'm wondering why the use of CiviCRM "activities" as it is more common to use CiviCRM "groups" for this type of function. Groups are the basis for CiviMail and CiviCRM forms have the option of adding the users to groups.
Comment #7
dangrice commentedHey Joe,
I installed the two modules but the email confirmation and page redirect settings aren't holding their values. Are they on yours?
-Dan