Plugin: Avatar Upload
Although there are already two avatar plugins available, they require that users either have their own webspace to store an avatar or use one of the avatar services (e.g. Gravatar).
My users do not have either of those things, so I wrote an avatar upload plugin. Besides offering avatar hosting, it also allows you more control over the type and content of avatars than simply providing a link to an offsite image.
- Bozos can not upload avatars.
- Admins can configure the maximum allowed file size (bytes) and dimensions (pixels) of images.
- Currently done from within the script (no Admin page interface at this time).
- Anybody with the ‘moderate’ capability can upload another user’s avatar.
- This ensures that inappropriate images can be removed.
- There is no “delete avatar” function at this time, but an inappropriate image can be removed by uploading a ’safe’ image (e.g. a blank 1×1 pixel image) to replace it (you could then manually set that user as a bozo to stop them re-uploading inappropriate images.
- File checking is carried out to ensure that:
- The file has a valid extension (.gif, .jpeg, .jpeg, .png)
- The file has a valid content-type (’image/gif’, ‘image/jpeg’, ‘image/png’)
- The file extension and content-type actually match.
- Other checks for filesize, image dimensions, etc.
More info and ZIP download: bbPress Plugin: Avatar Upload
I will be submitting this avatar to the bbPRess Plugin Repositry too.
The topic ‘Plugin: Avatar Upload’ is closed to new replies.