bbPress

Simple, Fast, Elegant

bbPress support forums » Plugins

Plugin: Avatar Upload

(111 posts)
  • Started 1 year ago by louisedade
  • Latest reply from agl666
  • This topic is not resolved
  1. Here's a hacked workaround, though I am not sure it's a good idea to tap into the user_cache directly. I'd otherwise suggest nicely using bb_get_user() as it checks the cache first but the problem with that is it fetches ALL the data if not in the cache which is overkill. Too bad there isn't a bb_get_user_meta($id,'metaname') but oh well - for now replace this top section of code:

    The user _must_ be in the cache at this point if his details are being displayed next to the post, right? Implying that bb_get_user would never need to use a single query.

    There _is_ a bb_get_usermeta() already: http://trac.bbpress.org/ticket/691. It's in the latest.

    Posted 1 year ago #
  2. Ah good to know fel64. But considering it's not in 0.8.2.1 and we're not altering the cache data (just reading it) my technique should be okay until everyone is using the newer core. Which might be awhile.

    (Yeah I suspected the user meta was in the cache. I really was happy to find a straightforward way to reduce those queries!)

    Posted 1 year ago #
  3. how does one revert back to the default identicon after they've uploaded a custom image?

    Posted 1 year ago #
  4. On "Avatar" page in the user's profile area, just select the "Use your identicon instead?" checkbox and press the "Use Identicon" button. You can do it for other members too if you are a moderator.

    Posted 1 year ago #
  5. i'm missing that option on my avatar page for some reason, i may have deleted that line by mistake. any thoughts on how i might get it back?

    Posted 1 year ago #
  6. Download the plugin again, substitute the old file for the new file.

    Posted 1 year ago #
  7. i did that and did a diff on all the files and they're all the same. where do i get the code for avatar.php?

    Posted 1 year ago #
  8. How are you installing the plugin? Are you downloading it directly or are you using the 'Plugin browser for bbPress' plugin? If the latter, then I think it's not downloading properly, you need to do it manually by downloading the current ZIP file, unzipping it and follow the instructions in the readme.txt file.

    Here is the Avatar Upload plugin in the bbPRess Plugin Browser, the newest version of the code is always to be found on that page:
    http://bbpress.org/plugins/topic/46

    Click on the link "Download latest version" -- or just click the following download link for now:
    http://bbpress.org/plugins/download/avatar-upload.0.7.zip

    Posted 1 year ago #
  9. i'm trying to reinstall it but i still seem to be missing the avatar.php file. is that in the .zip somewhere? i don't see it, although when i unzip the file, things don't look quite right. i have two files that are 0kb:

    Screenshot

    are "avatars" and "my-templates" supposed to be folders?

    also, i have a version of avatar.php but i'm not sure where it came from, i thought maybe i cut and pasted it from a forum post but i can't be sure. you can see it here

    Posted 1 year ago #
  10. > Using the latest version of your plugin, I tried installing the new version of Avatar Uplaod, but it still wouldn't read the additional-files directory.

    If you don't have the CURL library functions installed it falls back to fopen. fopen was failing to retrieve sub-directories.

    I'm fixing it now.

    Posted 1 year ago #
  11. Oh! I see, the sub-sub folders are empty, I just downloaded it from here myself to check.

    When I browsed bbPress' Subversion repository, the files ARE there -- I didn't forget to commit them! -- so somehow the bbPress Plugin Browser (the one on this site, NOT Sam's plugin) has messed up the ZIP download.

    The question is, whether it is a one-off or a systematic problem? Admins? Coders? Any ideas?

    To solve your problem outchy (and yes, somehow the identicon section got deleted in your avatar.php file), you can download files directly from the Trac browser.

    Here is the avatar.php file (long url, sorry):
    http://plugins-dev.bbpress.org/browser/avatar-upload/trunk/additional-files/my-templates/avatar.php

    You can not save that page itself, but scroll right to the bottom of it and you'll see "Download in other formats" - just click on "Original Format" and you'll be prompted to save a PHP file.

    You can do it for any other files you're missing.

    Posted 1 year ago #
  12. perfect, the new avatar.php did the trick! thank you very, very much.

    Posted 1 year ago #
  13. New Plugin Browser now in SVN.

    Fixes the subdirectory problem for non-CURL PHP installs that affects this plugin.

    Posted 1 year ago #
  14. This plugin is great.... I'm just having one small issue.

    If I upload a PNG image with transparency, it always ends up with black color behind it instead of being transparent. I'm assuming it's because it's being resized, but it's still a little annoying.

    Is there a way to fix this?

    Posted 1 year ago #
  15. Since all resized images are changed to jpegs (I think?) the answer would be no, unless you upload an exact size so it doesn't get resized.

    Posted 1 year ago #
  16. No, the resized images keep the same image type they had originally. So a PNG will remain a PNG after being resized.

    There are some transparancy functions that can be used with GIFs and for PNGs there are also alpha channel functions.

    This is now on the "To Do" list.

    For now correctly sizing the image before upload will preserve any transparency.

    Posted 1 year ago #
  17. Thanks... I'll wait for the update then =)

    Posted 1 year ago #
  18. Avatar Upload version 0.8.1 is now available.

    * This version enables the resizing of transparent GIFs and PNGs. Note, PNG alpha channel transparencies may cause problems.

    * It also makes a bit better use of the cache using bb_get_user().

    * A tiny HTML error was fixed on the upload avatar template.

    Posted 1 year ago #
  19. That was quick! You are great!

    On a side note.... when I download the zip file, 2 of the files in the additional-files directory are 0 length. I can grab them off the svn, so it's not a big deal, but you might want to check that.

    Posted 1 year ago #
  20. Arrrrggghhh! Not again! Sorry, this happened with the last update and I don't know what the problem is. The files are there in the SVN, so something is going wrong with the automatic ZIP downloader. I'm going to fire off an email to the bbDev list.

    Also, I posted the announcement a little prematurely. Version 0.8.1 hasn't appeared in the Plugin browser yet, it's still showing version 0.8, so you might want to wait a while (at least half-an-hour to an hour) for the system to "catch up". Again, the SVN itself has the latest version in the trunk.

    Posted 1 year ago #
  21. I've noticed the plugin browser is usually on a 30 minute delay or so after svn updates.

    I bet it runs on a cron job or something like that.

    Posted 1 year ago #
  22. Actually I had the same problem with the prior release, I just thought it was me.

    Posted 1 year ago #
  23. Just to confirm, version 0.8.1 is definitely now available to download -- but the same "missing files" problem is still happening, so until it's fixed, you'll need to download the contents of the additional-files/my-templates/ and additional-files/avatars/* folders via the svn.

    (* if you've already got a copy of the plugin, don't bother to download the additional-files/avatars/content, it hasn't changed.)

    Posted 1 year ago #
  24. My default avatars don't seem to be working anymore (just upgraded from .3) I get image html in my posts that looks something like this:

    <img src="http://forums.lrcd.com/avatars/" width="maasman" height="" alt="" />

    Shouldn't it be displaying some default.png action? Maybe I missed a file, I'll try reinstalling.

    Also, The missing files in the ZIP took a while to figure out, you might want to add something to the readme about that if they can't fix the bug soon.

    Posted 1 year ago #
  25. Sounds like you hit the same problem as fel, sorry about that.

    I'll try and get that update out today!

    As for the other issue, yeah, I'll add a note - although I've had an idea about a way to circumvent the problem (a theory, anyway).

    Posted 1 year ago #
  26. Update is out, by the way:
    http://bbpress.org/plugins/topic/46/page/4?replies=64#post-499

    Posted 1 year ago #
  27. fabianzaf
    Member

    I have a strange request. Something on the lines thats similiar to the digg profile page. Is it possible that someone could help me accomplish the following:

    When the file gets uploaded it generates 2 images.
    1) The full version
    2) A smaller 25px25px mini version with the filename small_$user_identity.jpg

    I would be very grateful if someone can help me with this ^^

    Posted 1 year ago #
  28. You mean you want a thumbnail version? That is certainly possible, but it won't happen for a while - if you don't mind waiting, I can look at it next weekend.

    Posted 1 year ago #
  29. fabianzaf
    Member

    Thank you louisedade! I really appreciate this! :D

    Posted 1 year ago #
  30. fabianzaf
    Member

    Hey louisedade :) Not that I wanna bother you but its a week since I wrote my reply to your post.

    Are you still interested in helping out?

    Posted 11 months ago #

RSS feed for this topic

Reply »

You must log in to post.

Code is Poetry.