vCard for drupal 5?

baksosis - February 16, 2007 - 19:25
Project:vCard
Version:HEAD
Component:Code
Category:feature request
Priority:normal
Assigned:sanduhrs
Status:closed
Description

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.

#1

sanduhrs - May 3, 2007 - 11:20
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?

#2

sanduhrs - May 3, 2007 - 11:22

So, here's the patch ;)

AttachmentSize
vcard_drupal5_01.patch 2.91 KB

#3

sanduhrs - May 4, 2007 - 21:15
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

#4

finedesign - August 21, 2007 - 16:16

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

#5

Christefano - August 23, 2007 - 08:07

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

#6

drupalina - October 3, 2007 - 04:44

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

#7

dman - November 25, 2007 - 11:52

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.

AttachmentSize
vcard_drupal5_02.patch 17.44 KB

#8

dman - November 25, 2007 - 11:55

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.

AttachmentSize
vcard.tgz 6.91 KB

#9

Christefano - December 1, 2007 - 01:09

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.

#10

Christefano - December 14, 2007 - 09:53

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.

AttachmentSize
vcard_119845.patch 978 bytes
vcard.119845.txt 15.33 KB

#11

dman - December 14, 2007 - 07:49

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.

#12

Christefano - December 14, 2007 - 10:20

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).

#13

Benjamin Melançon - December 17, 2007 - 00:43

Subscribing!
benjamin, Agaric Design Collective

#14

sanduhrs - December 17, 2007 - 07:01

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?

#15

SamRose - January 5, 2008 - 21:52

subscribe.

#16

sanduhrs - January 15, 2008 - 07:04
Assigned to:Anonymous» sanduhrs
Status:needs review» fixed

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

#17

sanduhrs - January 15, 2008 - 07:43

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

#18

dman - January 15, 2008 - 12:03

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.

#19

sanduhrs - January 17, 2008 - 19:10

Now is a good time :)

#20

Anonymous (not verified) - January 31, 2008 - 19:11
Status:fixed» closed

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

#21

dman - February 1, 2008 - 03:57

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

 
 

Drupal is a registered trademark of Dries Buytaert.