This is an old revision of the document!
Table of Contents
vCard Plugin
Compatible with DokuWiki
Angua+
This extension has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues.
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 <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 #)
- [company] - company name
- 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.
- E-Mail: enclosed in < and > signs.
- Website: only http is recognized.
- Birthday: in format yyyy-mm-dd.
Second part (between # and |) are phone numbers separated by & in order
- the first is considered as home phone
- the second as cell phone
- the third as work phone
- and the fourth as fax number
Third part is address; there are three field separated by commas
- first street
- then zip-code and city (separated by space)
- 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
- Merge pull request #3 from splitbrain-forks/php7-signature (2016-02-03 13:08)
- Adjust method signatures to match parent (2016-02-03 12:52)
- city and zip code separated by space (2012-07-21 10:26)
- separate addresses by comma; fix url formatting (2012-07-21 10:03)
- normalize telephone number (2012-07-21 09:44)
- tel formatter to function (2012-07-21 01:49)
- use abbr for all telephones, allow each type override from conf (2012-07-21 01:44)
- fix tel value tag attrib (2012-07-21 01:39)
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…