bbPress

Simple, Fast, Elegant

bbPress support forums » Plugins

Plugin: Avatar Upload

(110 posts)
  • Started 1 year ago by louisedade
  • Latest reply from tlibby
  • This topic is not resolved
  1. Hi,

    Yeah... sorry I didn't get a chance to look at it last weekend. I'm looking at it now though.

    Posted 10 months ago #
  2. Thumbnails are now an undocumented feature in version 0.8.3.

    It's undocumented because I think it ought to be road tested first. To use thumbnails you have to enable the feature in the plugin file itself, it is not configurable in the admin options page.

    1. Open up bb-avatar-upload.php and in the configuration settings class, scroll down to the following section:

    // Use a thumbnail image (hidden feature for now). 1 = yes / 0 = no (default)
    $this->use_thumbnail = 0;
    $this->thumb_width = 25;
    $this->thumb_height = 25;

    Set $this->use_thumbnail to 1 to enable and change the dimensions if desired.

    When enabled, whenever a user uploads an avatar a smaller copy is created with the prefix 'thumb.' So the avatar username.jpg will have a thumbnail called thumb.username.jpg (the file type changes with the avatar file type, so PNG avatars produce PNG thumbnails etc).

    2. You can access the thumbnail image with the following function call:
    echo avatarupload_displaythumb($user->ID);
    An image tag is returned with the class name avatar_thumb.
    <img src="thumb.username.jpg" width="25" height="25" alt="Username" class="avatar_thumb">
    I think that covers everything, let me know if you have any problems.

    Posted 10 months ago #
  3. nolageek
    Member

    How about getting this to work with MonsterIDs as well as identicons?

    Posted 10 months ago #
  4. Thumbnails working good so far. Maybe when you 'officially' add thumbnail support to the admin page you could add an option that would go through the /forums/avatars/ directory and create thumbnails for avatars that don't have thumbnails (ie. avatars that were uploaded prior to the use of this thumbnail feature).

    Posted 9 months ago #
  5. mrwonderr
    Member

    To fix any odd problems regarding permissions, you can CHMOD it using PHP.
    Add the code above line 128 where it says "$success_message = "Your avatar has been uploaded.";

    chmod("/PATH/TO/FORUMS/".$config->avatar_dir . $user_filename, 0666);

    Posted 8 months ago #
  6. Another fix for another caching bug:

    The query below is never cached - hence if the avatar is for a user other than the current one and is shown multiple times on a page, it causes a query each time since it does not pass through the bbpress caching mechanism.

    (around line 117)

    $bb_query = "SELECT meta_value FROM $bbdb->usermeta WHERE meta_key='avatar_file' AND user_id='$id' LIMIT 1";
    		if ( $avatar = $bbdb->get_results($bb_query) ) {

    replace with this code to properly cache and radically reduce queries on a busy topic:

    if ( $avatar = bb_get_usermeta( $id, "avatar_file")) {
    			$a = explode("|", $avatar);

    note that $avatar[0]->meta_value is then simply replaced with $avatar

    This may require newer versions of bbpress (build 904+) but that was seven months ago as of my post now.

    I think I am going to whip up a little "import gravatar" feature for this.

    Posted 5 months ago #
  7. noyz319
    Member

    Where can you download this plugin??? This link in the plugin repository does not work:

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

    It gives me a 404 File Not Found message

    Posted 5 months ago #
  8. That should be fixed now.

    Posted 5 months ago #
  9. hi everybody.

    one user tried to upload its avatar and he always get this error : "The file is not a valid GIF, JPG/JPEG or PNG image-type."
    He send me the .jpg, I tried to upload it for him, and I get the same error. I checked the file : it is really a jpg. I resized it with irfanview, in order to change size and weight (even if the file was already small enough). Same error.

    I solve this problem in putting the file in the avatar directory and changing the usermeta directly in the database ... but I won't do that for all my users !
    Someone has an idea ?

    Posted 4 months ago #
  10. Is it possible the extension was in all caps? I think the plugin expects to see one of a specific list of extensions, and they're all lower case.

    'file_extns' => array("gif", "jpg", "jpeg", "png")

    If it wasn't one of those extensions, I think you would get an error.

    Posted 4 months ago #
  11. Hmm.. ok, it's been a logn time since I was here, sorry about that.

    The file extension being in all caps shouldn't be a problem, the filenames are made lower case before they are checked.

    It could be the file got corrupted or something, or isn't a proper JPEG - what software did he use to create it?

    Posted 4 months ago #
  12. 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!

    Posted 4 months ago #
  13. 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?

    Posted 4 months ago #
  14. 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/

    Posted 4 months ago #
  15. 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.

    Posted 4 months ago #
  16. itissue
    Member

    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?

    Posted 4 months ago #
  17. 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?

    Posted 4 months ago #
  18. CoreForce
    Member

    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 100x100 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.

    Posted 3 months ago #
  19. 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.

    Posted 3 months ago #
  20. tlibby
    Member

    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?

    Posted 2 months ago #

RSS feed for this topic

Reply

You must log in to post.

Code is Poetry.