avatar plugin

avatar plugin by Gina Häußge, Michael Klier
Insert a gravatar into a wiki page, also needed by the discussion plugin. (previous authors: Esther Brunner)

Last updated on 2008-04-20. Provides Syntax, Helper.
Compatible with DokuWiki >= 2006-11-06.

Tagged with avatar, gravatar.

Download plugin-avatar.tgz

Syntax

{{avatar>[user|mail]?[size]|[title]}}
{{gravatar>[user|mail]?[size]|[title]}}
[user] the registered user for which you want to display an avatar required
[mail] the e-mail address for which you want to display an avatar image required
[size] either s(mall) = 20×20 pixel, m(edium) = 40×40 pixel, l(arge) = 80×80 pixel, xl (extra large) = 120×120 pixel optional; default is medium
[title] the name of the person the mail address belongs to or some other title text optional; default is the obfuscated e-mail address

By padding the e-mail address with spaces you can define the alignment like with images.

The {{gravatar>...}} syntax is still supported, but not recommended.

Local Avatars

If you don't want to use the monsterid script or the gravatars from http://gravatar.org, you can upload your own avatars into the user namespace. For a user named foo this would be an image user:foo.jpg for example and the syntax:

{{gravatar>foo}}

The username has to be lowercase and follow the pagename naming rules. If unsure, you get your username for example the recent changes log etc.. Supported image types are jpg/png/gif.

Demo

You can try the plugin here.

Resources

Discussion

FIXME: When used with the Discussion plugin, username.jpg is not found, because _getAvatarURL($user, …) (and getXHTML) receives the user's EMAIL instead of its login name. :( Most likely the Discussion plugin is to be fixed.

Fixed in the discussion plugin as of 2008-08-08. — Michael Klier 2008/08/08 19:44
 
plugin/avatar.txt · Last modified: 2008/08/08 19:49 by chi
 
Imprint Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki
WikiForumIRCBugsTranslate