CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • script to extract and inject customised fields and profiles
Pages: [1]

Author Topic: script to extract and inject customised fields and profiles  (Read 407 times)

falinx

  • I’m new here
  • *
  • Posts: 10
  • Karma: 0
  • CiviCRM version: 4.4.2
  • CMS version: joomla
  • MySQL version: 2.4
  • PHP version: 5.4.4
script to extract and inject customised fields and profiles
March 05, 2014, 12:56:09 am
Hey all, I guess I'm posting this in the right place. Is there a script that is customisable to extract the customised fields/profiles from a site ad then inject them into another. Here is the situation, we have multiple sites but they all follow the same structure. I want to be able to extract the customised fields/profiles then inject them into a newly freshly installed site. Is this the best way to go about it?

totten

  • Administrator
  • Ask me questions
  • *****
  • Posts: 695
  • Karma: 64
Re: script to extract and inject customised fields and profiles
March 05, 2014, 12:34:53 pm
There are a few options:

1. If you're writing an extension, then you can use "civix" to extract an XML file; when installing the extension, it will load the XML file.

http://wiki.civicrm.org/confluence/display/CRMDOC/Create+a+Module+Extension#CreateaModuleExtension-Addcustomfields%28CiviCRMv4.4+%29

2. In the "civicrm/bin/migrate" folder, there's "export.php" and "import.php". I think you need to call them through a web browser and provide a few arguments ('user', 'pass', and 'key' [the CIVICRM_SITE_KEY]).

3. If you're writing code, you can call CRM_Utils_Migrate_Export and CRM_Utils_Migrate_Import.

A couple minor differences: #1 requires that you specify which "custom groups" or "profiles" to export. #2 exports a whole lot of customizations. #3 can do either.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • script to extract and inject customised fields and profiles

This forum was archived on 2017-11-26.