I think the vCard module would be very interesting for my Drupal site. Unfortunately, I am using Drupal 5, and I cannot make vcard work.

Comments

sanduhrs’s picture

Status: Active » Needs work

So I did a first try to port it to Drupal 5.
All seems to work well, expect for one thing. The following code is being added to the vCard when downloaded:

<script type="text/javascript">
      $(document).ready(function() {
        $("body").append("");
      });
    </script>

I don't know how to address this.
Anyone?

sanduhrs’s picture

StatusFileSize
new2.91 KB

So, here's the patch ;)

sanduhrs’s picture

Status: Needs work » Needs review

The behavior I described in #1 seems to be gone by deactivating devel.module - see [1].
So the patch is ready to review.
vg

[1] http://drupal.org/node/130210#comment-220009

finedesign’s picture

Sorry, but do you mind sending a link to the patched module? I am not strong enough in the command line to do it myself:
http://drupal.org/patch/apply

and I figure you could just send the updated module. Yes?

Thanks-
paul

Christefano-oldaccount’s picture

I'm about to start testing it myself, but I've emailed you the patched module. To keep this issue uncluttered, I've answered your question about patching at http://drupal.org/node/168647#comment-264015

drupalina’s picture

if you have a dev version for 5.x I'd love to test it out

dman’s picture

StatusFileSize
new17.44 KB

The patch at #2 was good, although we needed the D5 .info file also.
Seeing as this project looks pretty quiet, I took it upon myself to upgrade it a little more.
Attached is a large revision for D5, including

  1. The D5 upgrade from #2
  2. numerous Drupal code style tidy-ups. Now coder.module compliant apart from where it invokes the PEAR object.
  3. Graceful degradation if the PEAR lib is not around (we can still get hCard microformats)
  4. Extended help, including instructions on how to enable the hCard rendering on your theme
  5. some extra trivial doc-blocks
  6. AND a new button on the settings page which will Auto-create all the commonly needed fields within user profiles to save you the tedium of doing it yourself. Most 'Contact Information' profiles contain the same fields, and vCard/hCard gives us consistant terminology to use for them. We can now use this module for one-click profile configuration.
    I took some care to integrate the new fields with any that you may have already set up.

Here, for example is what the system tells us when you press the auto button on a site that already had half a profile:

# Creating required profile fields
# Given Name already exists as a profile field. (called First Name)
# Family name already exists as a profile field. (called Family Name)
# Creating profile field Birthday
# Assigning profile field 14 (Birthday) to vcard key birthday
# Creating profile field Organization
# Assigning profile field 15 (Organization) to vcard key organization
# Telephone already exists as a profile field.
# URL already exists as a profile field.
# Street already exists as a profile field.
# City already exists as a profile field.
# Creating profile field Postal
# Assigning profile field 16 (Postal) to vcard key postal
# Creating profile field Province
# Assigning profile field 17 (Province) to vcard key province
# Country already exists as a profile field.

Existing fields are recognised, missing ones are created.

Note this patch still doesn't include the needed .info file. Not sure how to do new files.

dman’s picture

StatusFileSize
new6.91 KB

And for the CVS-impaired, here's the full tarball.
Apologies for putting three features into one bundle, but I had a bit of a burst on it.

Christefano-oldaccount’s picture

Thanks, dman!

The phone field isn't working in your version but geodaniel's patch at http://drupal.org/node/92785#comment-463899 will fix that. That patch is for the 4.7 version and may not apply cleanly, but it works when applied manually.

Also, the addition of function_exists on line 390 will prevent this version from loading the Contact_Vcard_Build library if PEAR or the Contact_Vcard_Build library isn't available (on shared hosting, for example). I suggest removing it so that admins can still copy the library to the vCard module directory.

Christefano-oldaccount’s picture

StatusFileSize
new15.33 KB
new978 bytes

I'd change the status to 'needs work' because of the points raised in #9 but here's a patch that addresses those points. It applies to the code in #7 and #8.

It seems that there are several people involved in this issue who want to play but can't patch files, so at the risk of making things more complicated I've also attached the vcard.module from #8 with my patch from #10. Just download vcard.119845.txt and rename it to vcard.module. Then you can use it with dman's bundle in #8.

dman’s picture

OK. The last commit here was a year ago.

We are now looking at patches on patches. Those that care - like it.

Microformats are cool and just need more uptake. (anyone visited the http://groups.drupal.org/microformats-in-drupal group recently?)

walkah has a lot on his plate.

I don't actually use vCard proper, or the dependant library, I just wanted microformats, or I'd volunteer.
Anyone interested in applying to be a co-maintainer?
I'll go in too, but like I said, I don't actually do vCard so I need a co-pilot.

Christefano-oldaccount’s picture

I'd be up for co-maintaining but I'd like to hear from walkah first. My hesitation is because it seems that Lullabot is involved in projects that are using vcard.module (I don't know the mistake was Lullabot's or Achieve Internet's or another firm's, but IncBizNet.com launched using a broken vcard.module).

mlncn’s picture

Subscribing!
benjamin, Agaric Design Collective

sanduhrs’s picture

The first patch in in #2 already includes the creation of the vcard.info file.
Can we please just update this module to work with Drupal 5 and introduce new features when this is done - one by one?

I attached a simple patch containing only the necessary changes to update this module to Drupal 5, including the creation of a .info file.
Any thoughts?

SamRose’s picture

subscribe.

sanduhrs’s picture

Assigned: Unassigned » sanduhrs
Status: Needs review » Fixed

#2 Committed to HEAD.
Please open new issues for the for the Patch in #7.
Thanks.

sanduhrs’s picture

Related issues:
Address information http://drupal.org/node/93043
Telephone and URL http://drupal.org/node/92785

dman’s picture

OK. Makes sense.
Glad to see someones got commit again :-)

I've pulled the cosmetic and no-brainer bits from my all-in-one mess into http://drupal.org/node/210209

I see the URL and Telephone bits now have their own thread, so that's moot.

Remaining is only my auto-profile-builder (Which saves me heaps of time)
but that's a stand-alone feature I'll merge in (as a new issue) again after the current round of patches.
Feel free to ping this thread to tell me when a good time is, so we don't trip over volatile changes too much.
I don't want to re-roll it until the first cosmetic patch is in.

.dan.

sanduhrs’s picture

Now is a good time :)

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

dman’s picture

OK, I was going to do that last week wasn't I?
The profile wizard is now available. FYI