digitalpoint
Well-known member
The code for users to upload/delete/crop avatars is pretty good and really isn't too hard to make work with other content types. It would be super nice if it worked with any content type by default though. You wouldn't even really need to build a handler system, instead you could have entities implement something like an AvatarInterface.
The most problematic part of making avatars/icons (while using the existing avatar functions) for different content types currently is that Templater::fnAvatar() has this:
What would be way sexier is something along the lines of:
Even XenForo could use it themselves and use it for Resource Manager Icons (can't currently crop or generate multiple sizes, so it would be a nice upgrade even not counting what I would use it for).
The most problematic part of making avatars/icons (while using the existing avatar functions) for different content types currently is that Templater::fnAvatar() has this:
PHP:
if ($user instanceof User)
What would be way sexier is something along the lines of:
PHP:
if ($entity instanceof AvatarInterface)
Even XenForo could use it themselves and use it for Resource Manager Icons (can't currently crop or generate multiple sizes, so it would be a nice upgrade even not counting what I would use it for).
Upvote
6