]> sipb.mit.edu Git - ikiwiki.git/blob - doc/todo/avatar.mdwn
munge to avoid markdown eating email addresses
[ikiwiki.git] / doc / todo / avatar.mdwn
1 [[!tag wishlist]]
2
3 It would be nice if ikiwiki, particularly [[plugins/comments]]
4 supported user avatar icons.
5
6 Idea is to add a directive that displays a small avatar image for a user.
7 Pass it the email address, openid, or wiki username of the user.
8
9         \[[!avatar user@example.com]]
10         \[[!avatar http://joey.kitenet.net/]]
11         \[[!avatar user]]
12
13 These directives can then be hand-inserted onto pages, or more likely,
14 included in eg, a comment post via a template. Possibly included in a
15 recentchanges page item via that template too?
16
17 The avatars are provided by various sites. For email addresses, it uses a
18 [gravatar](http://gravatar.com/). For openid,
19 [openavatar](http://www.openvatar.com/) could used, but I am not very happy
20 with it; probably better to just get the email via SREG (as is done now for
21 openid), and use that. For a wiki username, the
22 user's email address is looked up and the gravatar for that user is
23 displayed. (Of course, the user has to have filled in their email address
24 on their Preferences page for that to work.)
25
26 An optional second parameter can be included, containing additional
27 options to pass in the 
28 [gravatar url](http://en.gravatar.com/site/implement/url).
29 For example, this asks for a smaller gravatar, and if a user does
30 not have a gravatar, uses a cute auto-generated "wavatar" avatar.
31
32         \[[!gravatar user@example.com "size=40&default=wavatar"]]
33
34 The `gravitar_options` setting in the setup file can be used to
35 specify additional options to pass. So for example if you want
36 to use wavatars everywhere, set it to "default=wavatar".