powered by Jive Software

Web based vCard service

The source is for Openfire 3.6.5 / 3.7 as it uses log4j for logging. You need to compile it. The old version is available here http://www.igniterealtime.org/projects/openfire/plugins-beta.jsp


**Warning: ** This is beta software. Don’t expect everything to be implemented or to work fine. Some things may be striked as they are not implemented or yet available. If you feel the need to post a comment or feature report please use the Community Plugins forum.

This is a very basic web frontend for Openfire which allows to display vCards. It does not contain any security so everyone who has access to the server can view the vCards.

Use /plugins/webvcard/vcard?user=foo to view the vCard of user foo.

Use /plugins/webvcard/img?user=foo to view the image of user foo.


Copy the jar file into the plugins directory of your Openfire installation. The plugin will then be automatically deployed. To upgrade to a new version, copy the new jar file over the existing one.


No web page is available at the moment. One can set these System Properties.


contains the HTML header
contains the HTML footer
contains the HTML body
contains the HTML body for user-not-found
contains the HTML body for generic errors
Mark start of entry to replace. As it is used as a regular expression make sure to escape it properly when specifying something else like “\{\-” for “{-”.
Mark end of entry to replace.
sets the proxy type if one is used, either ot HTTP os SOCKS (SOCKS not tested)
set the proxy server name or IP
set the proxy port

set a name for “Basic” proxy authentication (not tested, NTLM is not supported)

set a password for “Basic” proxy authentication (not tested, NTLM is not supported)

You may want to create your own template files which match your design. Every value within a vCard can be used in the template.body.html file. There it will be replaced with the content depending on the user.


A default example template.body.html file is stored in this directory. You need to create your own one and set plugin.vcard.templateFileBody to its location in the file system.

After changing a template file or a system property you need to reload the plugin to activate the changes.

vCard pseudo image entries

To make the creation of a vCard containing an image a little bit more easy one can use one of these pseudo values one time in the template.body.html file.


always embeds the photo as base 64 in the html page. If EXTVAL is used within the vCard it will download the photo to embed it.
always returns a link to the VCardImageServlet.
for embedded images the VCardImageServlet is used, the URL of external images will be embedded in the vCard.
returns an embedded or external image depending on the vCard.


It uses the same values as the WebVCard plugin, the proxy settings and image sizes are interesting.


As every good application also here logging is available and can be configured using Log4J. The debug log is not recommended for production systems.

Help for vCard entries

You may either extract this plugin and take a look at the template.body.html file which works fine for Spark 2.0 vCards which do not comply to the XEP.

Or you may use an XMPP debugger (using Spark one must activate it before login) and open your vCard to see all entries in it. This is just a small part:

Flintstone Fred ... ... Fred ... 007 ... 666 ...

Use {{/vCard/NICKNAME}} in your template file to insert the nickname, if it does not exist nothing will be inserted.
{{/vCard/N/FAMILY}} will insert the family name.
A random telephone number may be inserted with {{/vCard/TEL/NUMBER}} but that’s not what you want. Empty tags are used above NUMBER and to select the VOICE WORK number you may use {{/vCard/TEL/VOICE/parent::TEL/WORK/parent::TEL/NUMBER}} or any other DOM4J XPath which matches this node.
An XPath Tutorial may be found here ZVON > Tutorials > XPath Tutorial.
webvCard.zip (32543 Bytes)