Install the kabissa code and sample data from SVN
$ cd ~/svn
$ svn checkout http:$ cd ~/svn/kabissa/bin
$ sh setuplinks.sh ~/svn/civicm ~/svn/kabissa
$ cd ~/svn/civicrm/bin
$ ./setup.sh schema/KabissaSchema.xml
$ cd ../sql/
$ mysql -uUSERNAME -pPASSWORD CIVICRM_DB < civicrm_41.mysql
$ mysql -uUSERNAME -pPASSWORD CIVICRM_DB < civicrm_data.mysql
$ cd ../../kabissa/sql/
$ mysql -uUSERNAME -pPASSWORD CIVICRM_DB < kabissa_data.mysql
$ mysql -uUSERNAME -pPASSWORD CIVICRM_DB < kabissa_sample.mysql
$ mysql -uUSERNAME -pPASSWORD DRUPAL_DB < kabissa_drupal.mysql $ cd ~/all/modules/civicrm/templates/CRM
$ ln -s /home/httpd/vhosts/beta.kabissa.org/httpdocs/sites/all/modules/kabissa/templates/CRM/Kabissa Kabissa
$ cd /home/httpd/vhosts/beta.kabissa.org/httpdocs/sites/all/modules/civicrm/CRM
$ ln -s /home/httpd/vhosts/beta.kabissa.org/httpdocs/sites/all/modules/kabissa/CRM/Kabissa Kabissa
$ cd /home/httpd/vhosts/beta.kabissa.org/httpdocs/sites/all/modules/civicrm/xml/schema
$ ln -s /home/httpd/vhosts/beta.kabissa.org/httpdocs/sites/all/modules/kabissa/xml/schema/Kabissa Kabissa
- You will need to update your drupal modules/user/user.module with the hacked version for Kabissa needs. The hacked version is at: ~/svn/kabissa/modules/user/user.module.hack. Note that this module has been hacked as of Drupal v5.3 (lines changed: 1158,1159)
- Now follow Drupal and CiviCRM Configuration Steps below.
Updating an existing deployment from SVN
- To retrieve any code modifications/bug fixes etc. from our repository:
$ cd ~/svn/civicrm
$ svn update .
$ cd ~/svn/kabissa
$ svn update .
- To rebuild and repopulate the entire database:
 | *These next steps will reload all meta data, and remove all contact/member/organization data which you've added
the your database.* This should not be necessary once there is a stable version of the Kabissa component. |
$ cd ~/svn/civicrm/bin
$ ./setup.sh schema/KabissaSchema.xml
$ cd ../sql/
$ mysql -uUSERNAME -pPASSWORD CIVICRM_DB < civicrm_41.mysql
$ mysql -uUSERNAME -pPASSWORD CIVICRM_DB < civicrm_data.mysql
$ cd ../../kabissa/sql/
$ mysql -uUSERNAME -pPASSWORD CIVICRM_DB < kabissa_data.mysql
$ mysql -uUSERNAME -pPASSWORD CIVICRM_DB < kabissa_sample.mysql$ echo "truncate sessions" | mysql -uUSERNAME -pPASSWORD DRUPAL_DB
- Now follow Drupal and CiviCRM Configuration Steps below.
Drupal and CiviCRM Configuration Steps
Drupal User Management
The Kabissa component requires specific configuration for Drupal User Settings, Roles and Access Control (Drupal >> Administer >> User Management). You must login as a user with Drupal Administrator privileges to complete these steps.
Create Drupal Roles:
- Kabissa Member
- Kabissa Staff
Drupal Access Control (assign permissions to roles)
anonymous AND authenticated user roles
These permissions allow visitors and non-members to browse and search Member Directory, contact members and related persons, and apply for membership.
- civicrm module
- access all custom data
- create Kabissa Application
- profile listings and forms
- view all contacts
Kabissa Member role
These permissions allow members to also edit their Member Profile(s), and invite other people to join/affiliate with their organization listing.
- civicrm module
- access Kabissa
- access all custom data
- access uploaded files
- create Kabissa Application
- create Kabissa Drupal users (this permission allows Members to add people - and have a user created for them, new configuration requirement as of Nov 13, 2007)
- edit Kabissa Application
- profile listings and forms
- view Kabissa Application
- view all contacts
Kabissa Staff role
Staff can review applications and change members status as well as access all CiviCRM "backend" functionality (Advanced Search, View Activity History for all contacts, Import, etc.)
- civicrm module
- access CiviCRM
- access Contact Dashboard
- access Kabissa
- access all custom data
- access uploaded files
- add contacts
- administer CiviCRM
- create Kabissa Application
- edit Kabissa Application
- edit all contacts
- import contacts
- profile listings and forms
- review Kabissa Application
- view Kabissa Application
- view all contacts
- user module
- access user profiles
- administer users
NOTE: Depending on responsiblities of staff - you will probably want to add other content-related permissions for this role (e.g. create page content, administer comments, etc.)
User Settings
- Enable these Public Registration settings:
- Visitors can create accounts and no administrator approval is required.
- Require e-mail verification...
- Edit User e-mail settings as needed to "brand" the site for Kabissa
- Enable Picture Support
CiviCRM Configuration
Some of these settings will be pre-configured by loading kabissa_data.mysql. However, you should verify and modify if needed:
- Enable the Kabissa component: Administer CiviCRM >> Global Settings >> Enable Components
- Configure the Custom Templates path and verify that this path contains an alias link to ~svn/kabissa/templates/Kabissa/CRM
- Hide Latitude and Longitude fields: Global Settings >> Address Settings
- Verify that all potential member countries and provinces are available: Global Settings >> Localization
- Global Settings >> Outbound Email (SMTP) , to specify the SMTP server.
- Global Settings >> Localisation: Make sure all African countries and any other countries where members might reside are made "Available" - as well as their State/Provinces.
- Global Settings >> Mapping/Geocoding - enable and set provider IF there is decent coverage for a significant portion of member address locations.
The Kabissa install uses three Profiles and several Custom fields. These should all be pre-installed from kabissa_data.mysql.
Customizing Kabissa Screens
The Kabissa repository includes customized versions of the profile templates which display Member Details. These templates can be further customized/styled as needed. Also, customized versions of the Member Directory search form and listings can be created and committed to repository.
*Custom versions of templates are stored in the Kabissa component repository at: http://svn.quest.civicrm.org/kabissa/templates/Kabissa//CRM*
Review the online doc for general info about customizing profiles before working with these files:
http://wiki.civicrm.org/confluence/display/CRMDOC/Customize+Built-in+and+Profile+Screens
You should also review the Smarty templating engine documentation:
http://smarty.php.net/manual/en/
Existing Custom Templates
| File |
Used For |
templates/Kabissa/CRM/Profile/Page/1/View.tpl
templates/Kabissa/CRM/Profile/Page/1/Dynamic.tpl |
Profile 1 is used for Kabissa Staff Search, Listings and View of Member Details. View.tpl and Dynamic.tpl create the view screen. |
templates/Kabissa/CRM/Profile/Page/3/View.tpl
templates/Kabissa/CRM/Profile/Page/3/Dynamic.tpl |
Profile 3 is used for Kabissa Members and Visitors Search, Listings and View of Member Details. View.tpl and Dynamic.tpl create the view screen. |
Customizing Additional Screens
You can create custom versions of other profile-based screens by following these examples.
If you want to create a custom version of the Member Directory LISTINGS (search results) for visitors and members:
- Save a copy of templates/CRM/Profile/Page/Listings.tpl as templates/Kabissa/CRM/Profile/Page/3/Listings.tpl
- Modify the template as needed and commit to the component repository. As with the View screen, the default version uses a table layout which a column for each field in the Profile which is configured "In Selector".
In 1.9, the SEARCH form portion of a profile listing needs to be hacked directly (the "custom" path copy is not used). This is being fixed in 2.0 (http://issues.civicrm.org/jira/browse/CRM-2429). So, if you want to customize the search form layout (Member Directory search), you need to modify the main copy of the template:
- Save a backup copy of templates/CRM/Profile/Form/Search.tpl and then modify this file as needed.
Data Migration Outline
I would start off with a set of 10 organizations and tweak the below process till you are happy with it. Hopefully script most of it. Then run it with a larger set (100 orgs) and do some testing before migrating the entire database
- Import Organizations with all standard CiviCRM data fields (org name, address, phone etc.).
- Import Individuals with all standard CiviCRM data fields - and map the "employee of org" "create relationship" field. (Test the relationship create with a few records first - it is critical that the Organization Name used here matches exactly the Organization Names from step 1 - or CiviCRM will create a new organization rather than connect the individual to the existing one.)
- Export Organizations from CiviCRM (Org name and Internal Contact ID are all you should need) to a spreadsheet.
- Export kabissa_details data from modern bill (mission statement, etc.) into a CSV file. Massage this data - in particular the "look-up" fields like focus_id, status_id etc will need to use the INTEGER values assigned in CiviCRM. Check kabissa/sql/kabissa_data.mysql lines 45-87 for these values.
- Merge the CiviCRM Internal Contact ID column into the modern bill CSV export file - this will become the kabissa_details.contact_id column value.
- Create / run a SQL script to populate kabissa_details table from the CSV file.
- Export Activity History data from legacy app and merge with internal contact ID from CiviCRM
- Import Activity History for Organizations into CiviCRM using merged file (Internal Contact ID is "match to contact" column).
- Create drupal users for all contacts that have a relationship with the organization. You might want to use the drupal "user import" module