Generates a personal default avatar for new Plone users
ftw.avatar generates a personal default avatar for new Plone users.
Simply install the ftw.avatar egg by adding it to the dependencies in your package or by adding it to your buildout configuration:
[instance] eggs += ftw.avatar
There is no need to install the addon in the Plone site, it automatically hooks in.
freetype can easily be installed on OS X with homebrew:
$ brew install freetype
After installing freetype Pillow may need to be rebuilt.
Default avatar generation
ftw.avatar generates default avatars for users which have not yet defined an avatar (Personal portrait) in the personal preferences. The avatar is generated with a random background color and two characters of their name.
Maximum user portait scale
Products.PlonePAS limits the maximum size of user portraits (a.k.a. avatars) to 75x100. ftw.avatar increases the size to a maximum of 300x300, allowing to build pages with bigger avatars such as user pages.
Default user portrait patch
ftw.avatar patches Products.PlonePAS to generate a default avatar when the user portrait is retrieved the first time and the user has not yet set an avatar. membership_tool.getPersonalPortrait() is patched.
ftw.avatar extends the avatar default view to accept a scaling parameter. The size parameter is used as maximum width and maximum height for the scale.
Example URL: http://localhost:8080/Plone/portal_memberdata/portraits/admin?size=26
For generating the avatar the font Fantasque Sans Mono is used. The font is licensed under the SIL Open Font License, see the License File
This package is copyright by 4teamwork.
ftw.avatar is licensed under GNU General Public License, version 2.
- python3 and Plone 5.2 support. [ionlizarazu]
- Avoid writes on read - create default avatar on login instead of on portrait access. [phgross]
- Fix aggressive caching of the portrait image by not considering the modified date because the OFS image does not have one (is acquired instead). [mbaechtold]
- Changed utility method IAvatarGenerator.generate to take userid instead of full name. This makes the utility more flexible while overwriting because the user can now be identified accurately. [lknoepfel]
- Fix error when fullname has leading spaces. [jone]
- Fix error when portrait is stored as Pdata object. [jone]
- Fix user fullname lookup when user does not exist. [jone]
- Fix userid lookup when user does not exist. [jone]
- BugFix: Do not break if username (loginname) is passed as userid. Like plone.app.discussion does until 2.3.2 [mathias.leimgruber]
- Fix _imagingft check to support Pillow >= 2.1.0, where imports have changed. [jone]
- Do not try to generate the image if _imagingft is not installed. Log an error instead. [Julian Infanger]
- Initial implementation. [jone]
Release history Release notifications
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size ftw.avatar-2.2.0.tar.gz (76.1 kB)||File type Source||Python version None||Upload date||Hashes View|