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) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • How to import a vcard ?
Pages: [1]

Author Topic: How to import a vcard ?  (Read 4249 times)

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
How to import a vcard ?
February 22, 2008, 08:53:26 am
I know how to export one, but couldn't find a import. Am I missing something obvious ?
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: How to import a vcard ?
February 22, 2008, 10:08:30 am

that functionality is not present. A vcard importer would be a great community contribution :)

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: How to import a vcard ?
February 23, 2008, 03:23:09 am
Found two classes to parse:

http://sourceforge.net/projects/php-addressbook/
http://vcardphp.cvs.sourceforge.net/vcardphp/vcardphp/vbook.php?view=markup


The first one is PHP licensed, never quite understood how compatible it is with GPLv3. Could you accept it in civi ?

As for to put that in Civi, Is there a simpler to understand example that the scary CRM/Import/Parser/Contact.php ?

(alternatively, do you know how easy it would be to plug it above the import function ?)
More specifically, it'd see it as creating a default mapping vcard attributes -> civi contact fields, like for the CVS, and obvioulsy, instead of parsing the csv lines and feed them to the import, do the same with the vcard.

Could you tell me if this approach make sense based on the architecture of your importer ?

X+
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: How to import a vcard ?
February 23, 2008, 11:02:41 am

We package the PEAR library with CiviCRM which is also PHP licensed.

Unfortunately import is quite old code and not as well structured or pluggable. Its due for a rewrite (happening in 2.x) which will make it more pluggable (and much more efficient I hope)

Since vcard has a fixed well defined number of fields, can you assume/hard-code the mapping and do the import one v-card at a time?

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: How to import a vcard ?
February 24, 2008, 07:57:51 am
Hi,

Featurewise,  got a few suggestions. Please knock on the forum when the rewrite time has come, we might have ideas as well to make it easier to use.

As for the hardcoding, sure, But they are quite a few cases (what if the contact is already in, what if the organisation of this contact is in, or what if not...) to handle, and I was assuming they were already covered.

To be followed...
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: How to import a vcard ?
February 24, 2008, 11:53:52 am

X:

you might want to start a wiki page with your thoughts and ideas on it. I suspect we wont get to it till 2.2 or 2.3 at the earliest

You can model the vcard import similar to contact import. However i dont think contact import is very pluggable at the moment

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

businessbroker

  • Guest
Re: How to import a vcard ?
July 19, 2008, 07:25:56 am
on sourceforge there is an excel macro to transform vcards into vcf, this is free.
in my case I was having to transform thousands of companies an I bouyed a windows software for this.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • How to import a vcard ?

This forum was archived on 2017-11-26.