DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:avatar

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
plugin:avatar [2016-05-22 06:20]
85.9.60.46 [A bit more control]
plugin:avatar [2019-10-25 10:05] (current)
Dr-Yukon
Line 6: Line 6:
 email      : freaks@dokuwiki.org email      : freaks@dokuwiki.org
 type       : syntax, helper type       : syntax, helper
-lastupdate : 2016-01-16 +lastupdate : 2017-08-25 
-compatible : Weatherwax, "Adora Belle", Angua, Rincewind+compatible : Weatherwax, "Adora Belle", Angua, Rincewind, "Greebo"
 depends    :  depends    : 
 conflicts  conflicts 
Line 13: Line 13:
 tags       : media, images, avatar, discussion, embed tags       : media, images, avatar, discussion, embed
  
-downloadurl: https://github.com/dokufreaks/plugin-avatar/archive/master.zip+downloadurl: https://github.com/dokufreaks/plugin-avatar/zipball/master
 bugtracker : https://github.com/dokufreaks/plugin-avatar/issues bugtracker : https://github.com/dokufreaks/plugin-avatar/issues
 sourcerepo : https://github.com/dokufreaks/plugin-avatar sourcerepo : https://github.com/dokufreaks/plugin-avatar
Line 25: Line 25:
   {{gravatar>[user|mail]?[size]|[title]}}   {{gravatar>[user|mail]?[size]|[title]}}
  
-^ [user]  | the registered user for which you want to display an avatar | required | +^ [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 FIXME| +^ [mail]   | the e-mail address for which you want to display an avatar image                                               | required FIXME                                      
-^ [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 | +^ [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 |+^ [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 [[:wiki:syntax#images_and_other_files|images]]. By padding the e-mail address with spaces you can define the alignment like with [[:wiki:syntax#images_and_other_files|images]].
Line 59: Line 59:
 Instead of avatars coming from a fixed namespace, I would like to be able to specify a tokenized filename for the avatar.  For example, I have my DW set up so that each user has a "user namespace" in which they have full permissions, and I would like that avatar to come from that namespace.   Instead of avatars coming from a fixed namespace, I would like to be able to specify a tokenized filename for the avatar.  For example, I have my DW set up so that each user has a "user namespace" in which they have full permissions, and I would like that avatar to come from that namespace.  
  
-This is a lot easier to manage since there is no a-priori avatar, and thus ACL permission cannot be granted to upload the file - I want users to be able to change their own avatars without other users being able to; since you can't grant ''delete'' permission to a namespace, there is no way to stop users jhoverwriting each others' avatars unless they are in separate protected namespaces.+This is a lot easier to manage since there is no a-priori avatar, and thus ACL permission cannot be granted to upload the file - I want users to be able to change their own avatars without other users being able to; since you can't grant ''delete'' permission to a namespace, there is no way to stop users overwriting each others' avatars unless they are in separate protected namespaces.
  
 This can be achieved by changing the ''namespace'' conf setting so that it looks something like ''user/@USER@/avatar'' (perhaps even renaming so that it is called ''filename'', since that is a more meaningful description of the setting under this proposal).  This is then resolved in ''_getAvatarURL'' into the right form, e.g. ''user/my_user_name/avatar'', and then the files ''user/my_user_name/avatar.jpg'' etc are searched for. This can be achieved by changing the ''namespace'' conf setting so that it looks something like ''user/@USER@/avatar'' (perhaps even renaming so that it is called ''filename'', since that is a more meaningful description of the setting under this proposal).  This is then resolved in ''_getAvatarURL'' into the right form, e.g. ''user/my_user_name/avatar'', and then the files ''user/my_user_name/avatar.jpg'' etc are searched for.
plugin/avatar.1463890848.txt.gz · Last modified: 2016-05-22 06:20 by 85.9.60.46