DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:vcard

This is an old revision of the document!


vCard Plugin

Compatible with DokuWiki

Angua+

plugin Creates vCards/hCards that can be downloaded and added to your addressbook

Last updated on
2012-07-19
Provides
Syntax
Repository
Source

This extension has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues.

Tagged with address, hcard, users, vcard

Installation

Install the plugin using the Plugin Manager and the download URL above, which points to latest version of the plugin. Refer to Plugins on how to install plugins manually.

Description

This plugin lets you create vCard files on the fly in your wiki, which other users can download and add to their addressbook. With the folded plugin installed, you can unfold information about the person right in your wiki.

The output the plugin will produce looks like this:

vCard plugin example

Usage

Example:

{{vcard>[Organisation] Full Name <name@example.org> http://www.example.org 1976-05-03 # +41 43 534 0462 | Street Nr., ZIP City, Country}}
{{vcard>[Kriminálka] Kapitán Dastych <kapitan@dastych.cz> http://www.dastych.cz 1997-2-11 # work & mobile & home & fax | Protiprávní 12, 11000 Praha, Czech replublic }}

All information besides the name is optional. Here are the parameters:

Fields in first part (before #)

  1. [company] - company name
  2. Name: space delimited words; the first is considered to be the first name, the last to be the last name; everything in between will be middle / additional name.
  3. E-Mail: enclosed in < and > signs.
  4. Website: only http is recognized.
  5. Birthday: in format yyyy-mm-dd.

Second part (between # and |) are phone numbers separated by & in order

  1. the first is considered as home phone
  2. the second as cell phone
  3. the third as work phone
  4. and the fourth as fax number

Third part is address; there are three field separated by commas

  1. first street
  2. then zip-code and city (separated by space)
  3. and finally country.

To Do

  • There are some encoding problems with converting the vCard to quoted-printable and Apple Addressbook doesn't recognize UTF-8.

Development

Development now in github, feel free to send pull requests or open issues.

The patches and fixes from this page are merged and removed from wiki page, if something important was removed, feel free to recover it from history.

Authors

  • Original Auhtor: Esther Brunner
  • vCard PHP class by Kai Blankenhorn.
  • Updated version by Tomáš Valenta (2007-05-16 release)
    • mailguarding does not work, removed
    • fixed folding
    • fixed filename generation, space replaced with dash (-)
    • added company name support
    • reordered phone numbers
    • reordered folded details rendering
  • hCard support by Jürgen A.Lamers (cb34766)
    • Test your tag-Environment… cause 'span-div-p' sequence maybe has some curious result to your layout. – Jürgen A.Lamers 2008/01/18
  • Now maintained by Elan Ruusamäe

Rewritten version by Bruno De Fraine further below (not merged yet)

Change Log

Rewritten version

As an alternative to the ad hoc approach of the above versions, the vcard plugin was rewritten without hardcoding any vCard field names or field structures (so without Kai's PHP class). The idea is that you write the vcard record directly between <vcard> tags, but in a much nicer syntax. This allows you to put any (text-based) properties in the vCard. Main drawback: plain HTML presentation of the same data is no longer possible (fold or no fold).

Usage

<vcard Bill Gates>
N: Gates, William, Henry, , III
Nickname: Bill
Org: Microsoft
Title: Co-founder

Email, Internet, Work: billg@microsoft.com
Adr, Work: , , 1 Microsoft Way, Redmond, Washington, 98052, United States
Tel, Work: +1 425-882-8080 # General Microsoft number
# Comments like these are not included in the vCard

Bday: 1955-10-28

URL: http://www.microsoft.com/presspass/exec/billg/
</vcard>

For more fields, check the vCard specification.

Features

  • Checksum to prevent cross-site scripting (configure $conf['plugin']['vcard']['secret'] to some secret string)
  • UTF8 encoding of extended characters seems to work (tested with Mac OS X Address Book)

Download

Discussion

NOTE: Don't post patches, bug reports or feature requests here.

Use the Bug Tracker instead. — glen

Bugs

Well, i get some differences between the export with the vcard-export-url and the Firefox-Extension operator. Some time i will fix this…

Problems, no vcard download possible

I installed vcard-plugin on actual DW release.

The example from above gives some warnings and only text output of vcard information. No vcard download possible.

  1. Warning: date() [function.date]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'UTC' for 'UTC/0.0/no DST' instead in …./lib/plugins/vcard/vcard.php on line 153
  2. Warning: Cannot modify header information - headers already sent by (output started at …./lib/plugins/vcard/vcard.php:153) in /var/customers/webs/sbc/lib/plugins/vcard/vcard.php on line 187, 188, 189, 190
  3. Text output instead of vcard download:
    • BEGIN:VCARD VERSION:2.1 N:Dastych;Kapitán;;; FN:Kapit=C3=A1n Dastych EMAIL;INTERNET:kapitan@dastych.cz ORG:Kriminálka URL;WORK:http://www.dastych.cz BDAY: TEL;PREF;HOME;VOICE;ENCODING=UTF-8:home TEL;CELL;VOICE;ENCODING=UTF-8:mobile TEL;WORK;VOICE;ENCODING=UTF-8:work TEL;WORK;FAX;ENCODING=UTF-8:fax ADR;HOME;POSTAL;ENCODING=UTF-8:;;Protiprávní 12;Praha;;11000;Czech replublic REV:2012-08-08T07:51:30Z END:VCARD

Joe, 2012-08-08

plugin/vcard.1344466078.txt.gz · Last modified: 2012-08-09 00:47 by 62.65.199.160

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki