Project:vCard
Version:6.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active

Issue Summary

Any chance of supporting node profiles rather than just profile.module

Comments

#1

+1 for that...

#2

+1, please.

#3

Further to that, the focus should probably be on http://drupal.org/project/content_profile (for D6) rather than node_profile or bio, although bio support is probably easier as it's less complicated than NP.

It would be nice to see this support CCK-based profiles in D6 somehow though.

#4

Hi Nathan Paterson,
Have you done that? i want v card support to Node profile module.please guide how can i achieve this one?

Kamlesh Patidar

#5

hi all ,

i have done this.

Kamlesh Patidar

#6

AMAZING!!!111

Are you going to tell us how, or should we just guess? :p

#7

Hi NikLP,
a lot of customization is required to fulfill requirement using Node profile. i completely cleaned up Vcard code ,b'coz i don't wanna to use Pear library with Vcard. But with pear library it's easy Use


nodeprofile_load('type',account->uid);

where

type="profile_XXXX"
& get your fields as usual
$node->field_YYYY[0]['value'];

Kamlesh Patidar

#8

Version:5.x-1.x-dev» 6.x-1.x-dev

FYI: i needed this as well, included a quick/dirty fix

in vcard.module, function _vcard_get_map add the following before the return

  foreach (content_profile_get_types('types') as $type_name => $type) {
    foreach (content_fields(NULL, $type_name) as $field) {
      if ($field['type_name'] == $type_name) {
        $mapped = variable_get('vcard_profile_'. $type_name . '__' . $field['field_name'], 0);
        if ($mapped) {
          $p = content_profile_load($type_name, $account->uid);
          $v = $p->{$field['field_name']}[0]['value'];
          $map[$mapped] = $v;
        }
      }
    }
  }

in vcard.admin.inc, function _vcard_profile_fields add the following before the return

  foreach (content_profile_get_types('types') as $type_name => $type) {
    foreach (content_fields(NULL, $type_name) as $field) {
      if ($field['type_name'] == $type_name) {
        $output[$type_name . '__' . $field['field_name']] = $field['field_name'];
      }
    }
  }

#9

Hi attiks,

I added the code you suggested. On the vCard config-page I can now make the mappings (all content_profile fields show up nicely). The config-page also gets saved nicely, but my vCard stays empty (it opens in MS-Outlook). Any suggestions for where to find the problem?

Thanks,

Mike.

#10

try opening the vcard with notepad, so you'll see what's going on, feel free to post it here so I can have a look

#11

Hi,

I opened the vcard with notepad:

BEGIN:VCARD
VERSION:3.0
FN:
N:;;;;
PROFILE:VCARD
NICKNAME:
ADR:;;;;;;
EMAIL:
END:VCARD

It's empty. But, I didn't install Contact_Vcard_Build. Might that be the problem? If so, I'm sorry to have bothered you with my stupid mistake.

Thanks,

Mike.

edit:

I downloaded Contact_Vcard_Build, unpacked and now have Contact_Vcard_Build-1.1.2 (without extension). Where do I put this file? I have a local Drupal installation on a Xampp server.

Thanks.

#12

You have to install the pear package, using pear install Contact_Vcard_Build, check the install.txt file