4teamwork / ftw.avatar Goto Github PK
View Code? Open in Web Editor NEWBetter default user avatars for Plone
Better default user avatars for Plone
Es wäre intuitiver, wenn man die Buchstaben vertauschen würde.
Stefanie Muster -> SM statt MS
Hugo Boss -> HB statt BH
Als Kürzel wird ja in der Regel der erste Buchstabe des Vornamens und der erste des Nachnamens gewählt.
Im teamraum haben wir jedoch zuerst Nachname dann Vorname, damit man Benutzer alphabetisch nach Nachname sortieren kann. Vielleicht ist dies das Problem?
Patch at default.py line 46 (version 1.0.5 and 1.0.6)
words = name.split(' ', 1)
to
words = name.strip().split(' ', 1)
Hi, i'd like to try this product on a Plone5 site.
There is a problem with a deprecated dependency with IOFSImage interface of plone.app.linkintegrity here: https://github.com/4teamwork/ftw.avatar/blob/master/ftw/avatar/browser/configure.zcml
Can we keep compatibility with P4 and P5 somehow?
Happened when accessing folder_contents
as zopemaster
. Url: https://teamraum.kg-koeniz.ch/author/folder_contents
Traceback (innermost last):
Module ZPublisher.Publish, line 138, in publish
Module ZPublisher.mapply, line 77, in mapply
Module ZPublisher.Publish, line 48, in call_object
Module Products.CMFFormController.FSControllerPageTemplate, line 91, in __call__
Module Products.CMFFormController.BaseControllerPageTemplate, line 31, in _call
Module Shared.DC.Scripts.Bindings, line 322, in __call__
Module Shared.DC.Scripts.Bindings, line 359, in _bindAndExec
Module Products.CMFCore.FSPageTemplate, line 237, in _exec
Module Products.CMFCore.FSPageTemplate, line 177, in pt_render
Module Products.PageTemplates.PageTemplate, line 79, in pt_render
Module zope.pagetemplate.pagetemplate, line 132, in pt_render
Module zope.pagetemplate.pagetemplate, line 240, in __call__
Module zope.tal.talinterpreter, line 271, in __call__
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 888, in do_useMacro
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 533, in do_optTag_tal
Module zope.tal.talinterpreter, line 518, in do_optTag
Module zope.tal.talinterpreter, line 513, in no_tag
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 946, in do_defineSlot
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 533, in do_optTag_tal
Module zope.tal.talinterpreter, line 518, in do_optTag
Module zope.tal.talinterpreter, line 513, in no_tag
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 858, in do_defineMacro
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 583, in do_setLocal_tal
Module zope.tales.tales, line 696, in evaluate
URL: file:/home/zope/eggs/Products.CMFPlone-4.3.2-py2.7.egg/Products/CMFPlone/skins/plone_content/author.cpt
Line 27, Column 4
Expression: <PythonExpr mtool.getPersonalPortrait(author)>
Names:
{'container': <PloneSite at /teamraum.kg-koeniz.ch/platform>,
'context': <PloneSite at /teamraum.kg-koeniz.ch/platform>,
'default': <object object at 0x7f683bec8b60>,
'here': <PloneSite at /teamraum.kg-koeniz.ch/platform>,
'loop': {},
'nothing': None,
'options': {'args': (),
'state': <Products.CMFFormController.ControllerState.ControllerState object at 0x7f67fc33c0d0>},
'repeat': <Products.PageTemplates.Expressions.SafeMapping object at 0x7f680a0960a8>,
'request': <HTTPRequest, URL=https://teamraum.kg-koeniz.ch/author>,
'root': <Application at >,
'template': <FSControllerPageTemplate at /teamraum.kg-koeniz.ch/platform/author>,
'traverse_subpath': ['folder_contents'],
'user': <PropertiedUser 'zopemaster'>}
Module Products.PageTemplates.ZRPythonExpr, line 48, in __call__
__traceback_info__: mtool.getPersonalPortrait(author)
Module PythonExpr, line 1, in <expression>
Module ftw.avatar.patches, line 27, in getPersonalPortraitWrapper
Module ftw.avatar.member, line 37, in create_default_avatar
Module ftw.avatar.member, line 17, in get_user_id
AttributeError: 'NoneType' object has no attribute 'getId'
Plone 4.3.6 + ftw.avatar 1.0.6
If you never created/uploaded a portrait image and you access
http://localhost:8080/Plone/portal_memberdata/portraits/user1
you get NOT FOUND.
If you go to
http://localhost:8080/Plone/@@user-information?userid=user1
then the image is generated and if you go back to the image url it works.
I understand that this is because the /portraits traverse do not know anything about the avatar machinery, since it simply publish an object stored into it. And at first the img obj is not there yet.
A custom traverser on top of /portraits could solve it, or on top of portal_memberdata... I think a view would have precendence on the content itself, isn't it?
Latest version of Pillow includes this gem:
So the following code raises an exception with the latest Plone release:
ftw.avatar/ftw/avatar/default.py
Lines 14 to 21 in e3fe488
I'm working on a PR for it now.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.