Coder Social home page Coder Social logo

ftw.avatar's Introduction

ftw.avatar

ftw.avatar generates a personal default avatar for new Plone users.

Installation

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.

Dependencies

Generating avatars requires a Pillow (or PIL) installation with freetype support.

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.

Examples:

https://raw.github.com/4teamwork/ftw.avatar/master/docs/examples/an.png

https://raw.github.com/4teamwork/ftw.avatar/master/docs/examples/ct.png

https://raw.github.com/4teamwork/ftw.avatar/master/docs/examples/pi.png

Plone patches

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.

Avatar scaling

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

Font licensing

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

Links

Copyright

This package is copyright by 4teamwork.

ftw.avatar is licensed under GNU General Public License, version 2.

ftw.avatar's People

Contributors

bierik avatar buchi avatar jone avatar maethu avatar mbaechtold avatar shylux avatar tschanzt avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.