Difference between revisions of "CiviCRM"
Jump to navigation
Jump to search
(extract upgrade) |
(adds custom search and database info) |
||
(23 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | + | For things specific to CiviCRM on WordPress, see the [[CiviCRM/WordPress]] article. | |
− | |||
− | + | Here we'll deal with the general plus Drupal-specific info (I think it's installed more with Drupal) | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
== Learn == | == Learn == | ||
[[File:Applications-education.svg|thumb|link=http://civiteacher.com|Go to CiviTeacher.com to learn about using CiviCRM|200px]] | [[File:Applications-education.svg|thumb|link=http://civiteacher.com|Go to CiviTeacher.com to learn about using CiviCRM|200px]] | ||
[http://civiteacher.com CiviTeacher.com] is a place for high quality videos on CiviCRM | [http://civiteacher.com CiviTeacher.com] is a place for high quality videos on CiviCRM | ||
− | |||
== Help == | == Help == | ||
Line 31: | Line 22: | ||
After installation, there is a checklist that you should complete (e.g. http://example.org/civicrm/admin/configtask) | After installation, there is a checklist that you should complete (e.g. http://example.org/civicrm/admin/configtask) | ||
− | + | Some of the things needed for a first-time setup: | |
<ol> | <ol> | ||
<li>Enable the CiviBartik theme, for Civi admin, and then immediately configure various blocks to NOT appear in that theme (remove everything from column two, so that you get a wide display) | <li>Enable the CiviBartik theme, for Civi admin, and then immediately configure various blocks to NOT appear in that theme (remove everything from column two, so that you get a wide display) | ||
<li>enable the [http://book.civicrm.org/user/current/introduction/components/ components] | <li>enable the [http://book.civicrm.org/user/current/introduction/components/ components] | ||
<li>check/enable permissions (Drupal) | <li>check/enable permissions (Drupal) | ||
− | <li> | + | <li>set the headers and footers for mailings |
− | <li>set the message template for mailings | + | <li>set the message template for mailings |
<li>setup custom fieldsets and data fields. Before you do this, learn about Option Groups | <li>setup custom fieldsets and data fields. Before you do this, learn about Option Groups | ||
<li>map import data to fields, groups, tags. Also do a large amount of data wrangling (normalization; and ETL) to get source data in a format suitable for use with CiviCRM. The data that I have is "composite" because it has individuals embedded inside organization records. So I needed to extract and flatten out contact records from their organization records; plus create and maintain a simple "external ID" system to relate them after import. This means parsing, slicing and dicing, string manipulation and making corrections or formatting data a particular way. I almost installed Pentaho Data Integration (kettle) because that tool is (supposedly) built for this job. <ref>But like since version 3, Pentaho still doesn't work even at 5. The install docs are missing. The thing failed to even load, with no error.</ref> | <li>map import data to fields, groups, tags. Also do a large amount of data wrangling (normalization; and ETL) to get source data in a format suitable for use with CiviCRM. The data that I have is "composite" because it has individuals embedded inside organization records. So I needed to extract and flatten out contact records from their organization records; plus create and maintain a simple "external ID" system to relate them after import. This means parsing, slicing and dicing, string manipulation and making corrections or formatting data a particular way. I almost installed Pentaho Data Integration (kettle) because that tool is (supposedly) built for this job. <ref>But like since version 3, Pentaho still doesn't work even at 5. The install docs are missing. The thing failed to even load, with no error.</ref> | ||
Line 43: | Line 34: | ||
<li>Option Groups. There are many things in CiviCRM that are already configured as "Option Groups". "Website" is one example. When adding an Organization or Contact, and you want to enter data about their website, it could be one of many types: main, work, personal, facebook, twitter, pinterest, github etc. These are defined in the option group for "website". You can modify these to suit your data and your needs. As another example, "Campaign Type" comes defined as 'Direct Mail', 'Referral Program', and 'Customer Engangement'. I added 'Marketing' so that I can do a generic (email/web) marketing campaign. | <li>Option Groups. There are many things in CiviCRM that are already configured as "Option Groups". "Website" is one example. When adding an Organization or Contact, and you want to enter data about their website, it could be one of many types: main, work, personal, facebook, twitter, pinterest, github etc. These are defined in the option group for "website". You can modify these to suit your data and your needs. As another example, "Campaign Type" comes defined as 'Direct Mail', 'Referral Program', and 'Customer Engangement'. I added 'Marketing' so that I can do a generic (email/web) marketing campaign. | ||
<li>If you plan to use the CiviCase component to manage the common constituent "projects" or "workflows" and their associated timelines, then you'll need to create your own "Case Types". Look at the existing "Case Types" for reference. | <li>If you plan to use the CiviCase component to manage the common constituent "projects" or "workflows" and their associated timelines, then you'll need to create your own "Case Types". Look at the existing "Case Types" for reference. | ||
− | <li>{{@todo}} review [http://wiki.civicrm.org/confluence/display/CRMDOC/Managing+Scheduled+Jobs docs] and setup cron to do things like geocoding | + | <li>{{@todo}} review [http://wiki.civicrm.org/confluence/display/CRMDOC/Managing+Scheduled+Jobs docs] and setup cron to do things like geocoding |
− | <li>Test and set your SPF record for your domain so that you can use Mailer, and review the docs for [http://book.civicrm.org/user/current/advanced-configuration/email-system-configuration/ email system configuration | + | <li>Test and set your SPF record for your domain so that you can use Mailer, and review the docs for [http://book.civicrm.org/user/current/advanced-configuration/email-system-configuration/ email system configuration] |
<li>Turn on logging in the Administration console, otherwise each record has a changelog, but there is no detail in the log! | <li>Turn on logging in the Administration console, otherwise each record has a changelog, but there is no detail in the log! | ||
− | |||
− | |||
</ol> | </ol> | ||
Line 55: | Line 44: | ||
== Upgrading == | == Upgrading == | ||
− | [ | + | There is a long guide on [http://wiki.civicrm.org/confluence/display/CRMDOC/Upgrading+CiviCRM+for+Drupal+7 how to upgrade CiviCRM for drupal] but the short version is |
− | + | # backup your database(s) [[Mysqldump]] | |
− | + | # download the code <code> wget https://download.civicrm.org/civicrm-4.6.5-drupal.tar.gz</code> | |
− | + | # move old code, and unpack new code <code>mv civicrm /tmp/ && tar xvzf civicrm-4.6.5-drupal.tar.gz</code> | |
− | + | # run the upgrade script <code>/civicrm/upgrade?reset=1</code> | |
− | + | # toast | |
− | |||
− | |||
− | < | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
== Profiles == | == Profiles == | ||
Line 130: | Line 64: | ||
<blockquote> | <blockquote> | ||
− | Custom tokens (based on custom data) can be added for organizations as well. These tokens will not be displayed in the list of available tokens, but can be added manually. The format is {contact.custom_12} | + | Custom tokens (based on custom data) can be added for organizations as well. These tokens will not be displayed in the list of available tokens, but can be added manually. The format is {contact.custom_12} where 12 is the ID of the custom data field. To find the custom data field ID, go Administer > Customize Data & Screens > Custom Fields and click on the field you want to use. Look at the URL. The last part of the URL will be an equal sign and a number (=12). The number (12 in this example) is the id of that custom field. |
</blockquote> | </blockquote> | ||
You can create your own tokens by implementing <code>hook_civicrm_tokens()</code> and <code>hook_civicrm_tokenValues()</code>. See | You can create your own tokens by implementing <code>hook_civicrm_tokens()</code> and <code>hook_civicrm_tokenValues()</code>. See | ||
− | + | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
* [https://civicrm.stackexchange.com/questions/2558/tokens-for-custom-field-set-with-multiple-records?rq=1 Stack Exchange] | * [https://civicrm.stackexchange.com/questions/2558/tokens-for-custom-field-set-with-multiple-records?rq=1 Stack Exchange] | ||
* https://civicrm.org/blogs/colemanw/create-your-own-tokens-fun-and-profit Coleman's writeup | * https://civicrm.org/blogs/colemanw/create-your-own-tokens-fun-and-profit Coleman's writeup | ||
− | * http://www.gingerfeet.net/civicrm-userguide-customdatafields <ref>[http://www.gingerfeet.com/home GingerFeet] is a Drupal and CiviCRM consultant + hosting provider like | + | * http://www.gingerfeet.net/civicrm-userguide-customdatafields <ref>[http://www.gingerfeet.com/home GingerFeet] is a Drupal and CiviCRM consultant + hosting provider like [https://eQuality-Tech.com eQuality Technology]</ref> has an overview that is pulled from the manual, however it may not reflect the most current version - especially since they sell CiviCRM as a service. |
* http://book.civicrm.org/user/current/organising-your-data/custom-fields/ the manual itself | * http://book.civicrm.org/user/current/organising-your-data/custom-fields/ the manual itself | ||
Line 314: | Line 90: | ||
== Extensions == | == Extensions == | ||
* See [https://civicrm.org/extensions/drupal listing of CiviCRM extensions for Drupal] | * See [https://civicrm.org/extensions/drupal listing of CiviCRM extensions for Drupal] | ||
− | * [ | + | * [http://wiki.civicrm.org/confluence/display/CRMDOC/Extensions Extensions documentation in the wiki] |
− | + | * [http://wiki.civicrm.org/confluence/display/CRMDOC/Create+a+Custom-Search+Extension Create a Custom Search extension] | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
== Developing Extensions == | == Developing Extensions == | ||
− | |||
− | |||
− | |||
* [http://wiki.civicrm.org/confluence/display/CRMDOC/Settings+Reference Settings Reference] | * [http://wiki.civicrm.org/confluence/display/CRMDOC/Settings+Reference Settings Reference] | ||
* [http://www.zyxware.com/articles/4490/civicrm-how-to-add-and-use-your-variable-in-settings-field-in-civicrm-database settings example] | * [http://www.zyxware.com/articles/4490/civicrm-how-to-add-and-use-your-variable-in-settings-field-in-civicrm-database settings example] | ||
Line 346: | Line 109: | ||
== Database == | == Database == | ||
− | The database code in CiviCRM is divided into two logical sections: the DAO and the BAO. The BAO holds the "business logic" for objects and extends the DAO. The DAO is concerned with data to/from the database backend and it's definition (object to relational database mapping, aka "[[wp:Object-relational mapping|ORM]]"). Both are an extension of the [https://pear.php.net/manual/en/package.database.db-dataobject.php PEAR DB DataObject] class. As of August 2015, this is true and [https://civicrm.org/node/95 this blog post from 2006] gives some more (early) background. | + | The database code in CiviCRM is divided into two logical sections: the DAO and the BAO. The BAO holds the "business logic" for objects and extends the DAO. The DAO is concerned with data to/from the database backend and it's definition (object to relational database mapping, aka "<abbr title="Object-relational Mapping">[[wp:Object-relational mapping|ORM]]</abbr>"). Both are an extension of the [https://pear.php.net/manual/en/package.database.db-dataobject.php PEAR DB DataObject] class. As of August 2015, this is true and [https://civicrm.org/node/95 this blog post from 2006] gives some more (early) background. |
<source lang="php"> | <source lang="php"> | ||
// from CRM/core/DAO.php | // from CRM/core/DAO.php |