Skip to:
Content
Pages
Categories
Search
Top
Bottom

Plugin: Avatar Upload


  • louisedade
    Participant

    @louisedade

    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.

    Features

    • 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.

Viewing 25 replies - 101 through 125 (of 128 total)

  • jolaedana
    Member

    @jolaedana

    I am having the same issue as thierryyyyy with this plugin- and it’s all my users, as well. I’ve tried saving the file out without any special characters, using every export option in Photoshop, Apple’s Preview, and another program called Graphic Converter- there’s just no way the JPG is corrupt, I work in graphics all day every day.

    I’m running 0.8.3.1

    Integrated with WP, and got quite a few other plugins running- I believe it was fine with all these same plugins previously though!

    Any thoughts? I’m happy to give any information I can. Thanks!


    chrishajer
    Participant

    @chrishajer

    I can’t even find that string “The file is not a valid GIF, JPG/JPEG or PNG image-type” in the source. Where would that message be coming from? Is that the actual error or paraphrased? I see all the error messages in additional-files/avatar-upload.php, but that doesn’t appear to be one of them.

    Screenshot of the actual error being displayed?


    louisedade
    Participant

    @louisedade

    Aha! That error string comes from a much older version of the plugin — please can you try installing the latest version and see if you still have errors?

    Latest Version: 0.8.3

    http://bbpress.org/plugins/topic/avatar-upload/


    thierryyyyyyy
    Member

    @thierryyyyyyy

    Thank you a lot.

    You are right : I updated badly my files, I forgot to uptdate the root directory “avatar-upload.php”.

    Now, it works far better :)

    if I could allow myself to a small advice : it would be far better if the installation where just “put 1 directory in the my-plugins directory”.

    anyway, the readme.txt was clear enougth, it my fault.

    and the plugin is very nice.

    This plugin is simply wonderful. The only problem is, if a user uploads an animated gif, it doesn’t appear animated. Is there a way to fix this problem?


    NeutralX2
    Member

    @neutralx2

    Very nice plugin. It works great. Quick question though:

    Is it possible to get rid of the “Upload Avatar” tab to the Profile menu? I just don’t have the room for another option on the menu. How would I go about removing the tab and adding a “Upload Avatar” link to the profile page?


    CoreForce
    Member

    @coreforce

    Hi,

    I’m very pleased with the Avatar Upload, great work. Also I like the integration into bbpress a lot, it’s really straight forward.

    Only one small visual glitch that I noticed is that for avatars even when resized to 100×100 max, with small (1 line) posts the avatar image will overlap into the portion of next post, rendering the next user name unreadable. The callout for the img code has been included where suggested by the docs. Anyone else did recognize this as a problem?

    I’m using version 0.8.3 of the plugin (avatar-upload.0.8.3.zip).

    Thanks.


    chrishajer
    Participant

    @chrishajer

    This was mentioned before and covered in the forums. I can’t find it now, but basically it enforced a min height for the reply so it would never be shorter than the avatar.

    Everything works fine on my forum, it just won’t display the uploaded avatars. Permissions are all correct, anyone know what the reason is that could be causing this?

    Hi! Thanks for such a useful plugin :)

    But unfogtunately I have a little bug, let me name it like that. Profile page have two “Avatar” tabs. Like showed on this screenshot: http://www.picamatic.com/show/2008/08/03/12/741682_804x186.jpg

    What can I do with that?

    I’m getting a headers already sent error by /avatar-upload/unsharpmask.php when I try to upload an avatar. The avatar uploads fine and everything works but the error is annoying. Any ideas? is the “unsharpmask.php” file absolutely needed? If I remove it would the error go away? Probably not…

    What causes that “headers already sent” error?


    chrishajer
    Participant

    @chrishajer

    If you have access to php or apache errors, or can display errors, I think it will be clear what the error is. Sounds like some image processing function is not available, so the unsharpmask.php file generates an error and that goes to the browser, before the regular output. Then the output comes, but the “headers were already sent” and it can’t continue.

    So what is the actual error message that is displayed, the full message?

    The full error message is:

    Warning: Cannot modify header information – headers already sent by (output started at /home/mysite/public_html/forum/bb-plugins/avatar-upload/unsharpmask.php:1) in /home/mysite/public_html/forum/bb-templates/kakumei/header.php on line 1

    For now, just to get rid of the error, I turned the unsharpmask function off by setting it to “0″ in bb-avatar-upload.php.

    What does the unsharpmask do anyways? Just make the image look better when it’s re-sized or what?


    chrishajer
    Participant

    @chrishajer

    Take a look at the unsharpmask.php file and see if you have a space on line one before the <?php. I just downloaded a copy of it and the first line looks like this:

     <?php

    ^ space there

    There can’t be any whitespace before the opening <?php. See if your file has whitespace there and if so, delete it so the first character in the file is <.

    Thank you chrishajer! There was not only a space at the top of the code, but there was also a space at the very bottom. I removed the space at the top and still got the error except it said line 142 instead of line 1… so I figured out there was a space at the bottom.

    I have another question if you are familiar with this plug in. In the bb-avatar-upload.php file there is an option you can turn on that will show the avatars from thumbnails. This is turned off by default. If I turned this on, would it just create a seperate thumbnail image for each avatar? If so, what is the advantage? Faster page load time?


    chrishajer
    Participant

    @chrishajer

    I’ve never used the plugin, sorry.

    Hi everyone,

    I got a weird problem with this plugin. The tab “Avatar” is showed correctly but when I click on it I return to the main forum page. :o

    any idea?

    Thanks


    louisedade
    Participant

    @louisedade

    Hi – it’s me, the plugin author, as Granny Weatherwax might say “I ain’t dead”. But I am busy.

    Would anybody like to take over responsibility for this plugin? You’ll need to investigate the problems some people have had and bring it kicking and screaming into 2009!

    I don’t know how this works, but it looks like I can add somebody as a “Committer”.

    Louise


    KICKERMAN360
    Member

    @kickerman360

    It would be awesome for _ck_ to help out, s/he (sorry) has been fixing bugs before! It’s an awesome plugin by the way, thanks for making it!


    NuMaverick
    Member

    @numaverick

    cita:

    “To get Avatar tab in the profile working under Alpha-2 -

    edit avatar-upload.php in the bbpress root

    change line 7 from

    bb_auth(); // logged in?

    to

    bb_auth(‘logged_in’); // logged in?” by Batrachoid

    NuMaverick, BRILLIANT!

    I’ve been plauged by this problem for a few hours now. I was very confused, if there was some sort of ranking system here, I would give this 5 stars :P (Assuming 5 stars is the maximum of course!)

    OK basically that last fix does work, but for some reason my image uploads for the users but then it goes to a blank screen and when going back to the profile there is no image there, even though it is in the folder uploaded? I tried setting the permissions to 777 but to no avail. Any ideas anyone?

    Does anyone have any suggestions for showing the bbpress avatar next to comments in wordpress. I know a couple suggestions were given here, but, I don’t want to try the first suggestion, because they say to delete a file in my plugins, and I have a feeling that will cause more trouble than it’s worth. I saw another suggestion, tried it, but the avatar didn’t show. This probably won’t happen, but, it would be nice if there was a sister plugin to this one for wordpress… and you installed it and magically the bbpress avatars showed up. :) Wouldn’t that be nice. Unfortunately I don’t know php very well.

    Here’s hoping someone can come up with a solution!


    subtlegusto
    Member

    @subtlegusto

    When I upload an avatar for a user, it’s correctly displayed on the avatar upload page, but never makes it to the forum itself. Any ideas?

    Thanks!

    @jamesb4551 ► +1 me to :(

Viewing 25 replies - 101 through 125 (of 128 total)

The topic ‘Plugin: Avatar Upload’ is closed to new replies.