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:

Usage

Example:

{{vcard>[organisation] Full Name <email@host.com> http://www.host.com 1976-05-03 # +41 43 534 0462 | Street Nr., ZIP City, Country}}

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

  1. 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.
  2. E-Mail: enclosed in < and > signs.
  3. Website: only http is recognized.
  4. Birthday: in format yyyy-mm-dd.
  5. Phone Number(s): after a # sign; multiple numbers are delimited by an & sign
    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
  6. Address: after a | sign; comma delimited with
    1. first street
    2. then zip-code
    3. and city
    4. 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.

Preview

vCard plugin example

Usage

{{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 }}

Fields in first part (before #)

  • [company] - company name
  • name - first name, middle name optional and surname
  • <email> - email address
  • http://address.example.org - website, must have http prefix
  • yyyy-mm-dd - birthday

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

  • work number
  • cell phone number (mobile phone)
  • home number
  • fax number

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

  • street address
  • zip and city separated by space
  • country

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

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…

plugin/vcard.1342858406.txt.gz · Last modified: 2012-07-21 10:13 by glen

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