ikiwiki/doc/todo/avatar.mdwn

61 lines
2.4 KiB
Plaintext
Raw Normal View History

2009-01-22 05:01:37 +01:00
[[!tag wishlist]]
It would be nice if ikiwiki, particularly [[plugins/comments]]
2010-03-14 02:45:44 +01:00
(but also, ideally, recentchanges) supported user avatar icons.
2009-01-22 05:01:37 +01:00
Idea is to add a directive that displays a small avatar image for a user.
2010-03-14 02:45:44 +01:00
Pass it a user's the email address, openid, username, or the md5 hash
of their email address:
2009-01-22 05:01:37 +01:00
\[[!avatar user@example.com]]
\[[!avatar http://joey.kitenet.net/]]
\[[!avatar user]]
2010-03-14 02:45:44 +01:00
\[[!avatar hash]]
2009-01-22 05:01:37 +01:00
These directives can then be hand-inserted onto pages, or more likely,
2010-03-14 02:45:44 +01:00
included in eg, a comment post via a template.
An optional second parameter can be included, containing additional
options to pass in the
[gravatar url](http://en.gravatar.com/site/implement/url).
For example, this asks for a smaller gravatar, and if a user does
not have a gravatar, uses a cute auto-generated "wavatar" avatar.
\[[!gravatar user@example.com "size=40&default=wavatar"]]
The `gravitar_options` setting in the setup file can be used to
specify additional options to pass. So for example if you want
to use wavatars everywhere, set it to "default=wavatar".
2009-01-22 05:01:37 +01:00
The avatars are provided by various sites. For email addresses, it uses a
2010-03-14 01:24:51 +01:00
[gravatar](http://gravatar.com/). For a wiki username, the
2009-01-22 05:01:37 +01:00
user's email address is looked up and the gravatar for that user is
displayed. (Of course, the user has to have filled in their email address
2010-03-14 02:45:44 +01:00
on their Preferences page for that to work. Also, when the user changes
their email address in Preferences, the gravatar won't change until the
wiki is rebuilt.)
2009-01-22 05:01:37 +01:00
2010-03-14 01:24:51 +01:00
For openid, openavatar sucked and is now dead. So we need to use an email
address instead, I guess. Problem is that the email address of a given
openid is only known when that user is logged in and making a change.
And we don't want to leak an openid user's email into a page either.
Hmm. Suppose the gravatar hash could be calculated from the email address
2010-03-14 02:45:44 +01:00
and embedded instead of the openid? That would work for comments,
but not if the directive were used elsewhere.
2010-03-14 01:24:51 +01:00
2010-03-14 02:45:44 +01:00
Or, for openid, could use <http://paulisageek.com/openidavatar>. Which
works fine, but users are not likely to figure out what they need to do to
get an avatar associated with their openid.
2010-03-14 01:24:51 +01:00
2010-03-14 02:45:44 +01:00
---
2009-01-22 05:01:37 +01:00
2010-03-14 02:45:44 +01:00
Alternative, not overdesigned approach:
2009-01-22 05:01:37 +01:00
2010-03-14 02:45:44 +01:00
Modify comments plugin to have an option to display avatars.
When posting a comment, fill in the avatarhash field in the template.
The hash is calculated from the user's email address. If the user's email
is not known, skip it.
End. :P