Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

Account Pictures Extension 1.0

edited December 2006 in Vanilla 1.0 Help
This extension will allow your users to upload their icon and picture and store it on your server. You'll have to create an upload directory and make it writeable. Also, the files which will get uploaded should have writing permissions.

You can change the icon and picture sizes on the settings tab. It will overrule the default Vanilla 1 css to display your custom sized images so you don't need to change the stylesheet manually.

Uploaded images will automatically be resized and cropped!



«13

Comments

  • Options
    cool!
  • Options
    ditto
  • Options
    That's awesome!
  • Options
    this is fantastic!!!!!
  • Options
    uziuzi
    edited June 2006
    Great Extension, but doesn't work for me, following errors at activating the extension:

    param: 'AccountPictures'
    response: "
    Failed to modify the extension

    P.S. I think it's a problem with another extension again :((
  • Options
    Uzi, I get that problem too. I know what it is now... When you enable an extension, you activate some ajax page which includes all extensions again. But since it's an ajax page, it doesn't have the Head, Panel, etc objects. Some extensions (including mine) add stylesheets and javascripts to the Head object... And some extensions want to add stuff to the Panel. I've fixed my extensions to check if these objects are there before trying to add stuff. I think Mark should create these objects even if they aren't used, or everyone else should add these checks as well.
  • Options
    heh...I just got an account here to report the same problem... glad you've spotted it :)
  • Options
    OK, now it works :))

    And two ideas/suggestions:

    1. With this extension Avatar and Image function got duplicated. I think if this extension is enabled, the settings in "personal information" should disappear...

    2. Animated avatars like mine here are not saved properly, try that ;)
  • Options
    edited June 2006
    That's a feature, not a bug. ;-) (In my mind, at least)
  • Options
    Hi Jazzman, I've got a problem with your extension. It enabled fine but when I try to upload an account picture or icon I receive an error "Some problems were encountered The username you entered is already taken by another user." I'm using the pre-release 1 of vanilla and i'm logged in as an administrator.
  • Options
    The pre-release is too old. You should either get the latest SVN version or wait for Vanilla 1.
  • Options
    edited June 2006
    This extension is great; finally my friends can stop bugging me for easy avatar uploads. However, there's one small problem - I have the avatar size set to 60x60, but it seems to get the height wrong.

    Hopefully these screenshots will explain it better than I can: square avatar and uncropped avatar

    Also, I was wondering does this extension limit the size of uploaded files? I'm paranoid in case someone will try to upload something huge just to hog space!

    EDIT: Almost forgot - I'm using the latest SVN version of Vanilla.
  • Options
    edited July 2006
    Hmm, I have the problem with this to where anything immediately above or below the icon doesn't display properly. The bottom line for the post above has a white break in it above where the account icon is, and ditto for the area right under it. Doesn't happen when I disable the extension.
  • Options
    Same me..
  • Options
    edited July 2006
    I fixed that problem on my forum by changing a few lines in the extension code. It's a very quick 'n' dirty hack, so it's not the best way to do it - I'm not even sure if all the bits I added are necessary. Here's what I did anyway:

    In the $AddStyle section, look for the following line:
    #Comments .CommentHeader li div.CommentIcon { padding: {IconHeight}px 0px {IconHeight}px {IconWidth}px; }

    Before the closing bracket, add in: background: transparent center center no-repeat;

    I also added these two lines:
    .CommentAvatar { float: left; width: 68px; }
    .CommentAvatar div { background: transparent center center no-repeat;
    width: {IconWidth}px; height: {IconHeight}px; }
    I have the avatar size set to 60x60, so you'll have to change the width above if you're using a different size.
  • Options
    I've just installed Vanilla (which looks terrific) and trying this extension. First time I tried to upload a user picture, I got an error message saying PHP wasn't configured to work with JPEGs. So I went to my hosting control panel and activated the GD extension, which was my best guess at what to do (I'm a purely accidental techie). Maybe my guess was wrong, because the image upload then worked, but the images appear as blank white boxes in the forum. I checked the uploads/AccountPictures directory on the web server and there were two files: the 32x32 picture, which looked OK, and another file with a size of 0. Any advice? Thanks. Pam
  • Options
    I like the extension. Only I found one litte bug which I fixed for myself in line 204:

    Original:
    if ($OriginalHeight < $NewHeight && $OriginalWidth < $NewWidth) {

    Fixed:
    if ($OriginalHeight <= $NewHeight && $OriginalWidth <= $NewWidth) {

    If the size of an uploaded avatar or picture is exactly the size I want it to have, I doesn't need to be "cropped". :)
  • Options
    Jazzman, can you implement/suggest an official fix for the whitespace issue?
  • Options
    edited July 2006
    In the $AddStyle section, look for the following line:
    #Comments .CommentHeader li div.CommentIcon { padding: {IconHeight}px 0px {IconHeight}px {IconWidth}px; }

    Before the closing bracket, add in: background: transparent center center no-repeat;


    This seems to be all you need to do. I added it and it works just fine now.
  • Options
    kalikianakalikiana New
    edited July 2006
    jesusphreak said: Before the closing bracket, add in: background: transparent center center no-repeat; This seems to be all you need to do. I added it and it works just fine now.

    That worked just fine. Thanks. :)
    If there is a possibility to make the icon appear at the left of the text this would be cool.
This discussion has been closed.