Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Facebook Sign In with Google Sign In with OpenID Sign In with Twitter

Categories

In this Discussion

Who's Online 11

PewPewKconnectrgarygaryleafmonster422 +6 guests

Avatar Uploader

Hi guys!! I just LOVE Vanilla... how it looks, how it works and how it's programmed!! It took a little effort, but I managed to create my first extension: the Avatar Uploader. Check it out! Latest version 0.2: http://www.jazzman.nl/vanilla

Comments

  • Posts: 214
    Add it to teh Wiki
  • Posts: 755
    Did it already ^^ Weeeeee :D
  • Posts: 214
    Good work :P
  • ADMADM
    Posts: 450
    Nice work :) A couple of suggestions though. - Error messages need to be handled abit better.. it looks like something dramatic occurs using the current lussumo error scren. - Need confirmation messages that the avatar uploaded. Other then that it's pretty much perfect :)
  • ADMADM
    Posts: 450
    I just found a bug.. if you upload an avatar then go to your personal info screen.. the url of the avatar will be 'images/avatars/UID.ext' -- so if you click save it'll think the actual avatar is http://images/avatars/UID.ext'.
  • Posts: 755
    Tnx... I'll look into it :) And yeah.. didn't worked out the error messages yet ;)
  • How to get the Avatar bigger - I suggest 80x80 or 90x90. Missing the function to atomatic resize to any size from admin settings. Nice work.
  • Posts: 1,876
    The avatar size is in the theme CSS file.
  • ADMADM
    Posts: 450
    I think he means how to get the avatar uploader to allow for bigger sizes, in which case that's in the extension file. Just search for the number 32 in the file and change it to whatever max size you want.
  • Posts: 755
    The avatar uploader allowes a maximum dimension of 100 x 100 pixels. My next release will have admin settings to select a custom dimension. Maybe even resize em with GD or ImageMagick.... And I'll make it override the CSS, so it will be truly flexible :)
  • BenBen
    Posts: 534
    I'm an admin, and the option to upload an avatar also appears on other people's profiles. It doesn't let me change theirs however, just provide a link so that I can change mine.
  • Bookmarked this thread for future reference. Great extention.
  • Posts: 755
    Ok, minor update that fixes a bug, and adds a new feature: avatar gallery. You can have a selection of avatars which users can choose of :)

    Follow the above link (first comment) to download the extensions

    NOTE: You need to edit the gallery path if you don't upload your icons to ../images/avatars/gallery





    The above screenshot comes from my WoW guildwebsite: http://www.wow-myst.com
  • Posts: 1,135
    Oh cool jazzy! When you get the theme ready, might you want to release it to the public, my WoW guild might appreciate the neat look.
  • Posts: 1,010
    Awesome! I didn't get round to installing it last time. I'll install it tonight. If I fix my computer anyway :s
  • Posts: 755
    Sure, I'll release the theme when it's ready :)
  • Posts: 1,135
    Sure, I'll release the theme when it's ready :)

    Did I tell you allready that you are my best friend?
  • JanJan
    Posts: 58
    Wow, what a cool extension you've made, Jazzman! One thing that I've been thinking about though: wouldn't it be more logical - it being a Vanilla extension and all - to call it Icon Uploader instead?

    Anyways, I'll try it out this weekend - nice work!
  • Posts: 755
    Well... maybe it should be called Icon Manager because it's not only an uploader... But you're right Jan, I'll change the name on the next update :)
  • Posts: 921
    I notice it dosn't allow images to be uploaded that are over 100x100 in size, why don't you use the built in thumbnailer in Filebrowser.Thumbnailer.class.php and resize them instead of generating an error?
  • Posts: 32
    Hey man, so I put up 0.2 and it's still the same issue i had as before. Here's the rundown:

    I upload the file via the uploader, it shows as broken. I upload the same image via ftp to the same directory and create a page that calls both images and the one that was ftp'd shows fine, but the uploader one is broken. I check permissions and the uploader one has read & write and ftp'd has none. Make uploader'd one none as well and it's still broken.

    Then I switch the names of the files and try the html again. Same thing, so my uneducated figuring says that it is somehow messing up the image itself, BUT when I download the image that was uploaded using your extension, it is fine. I don't understand.... Help!
  • Posts: 101
    In trying to use 0.2 i get a lot of permissions issues. the file structure created does not allow permissions for anyone to use the files created. Though the extension does create the 'avatars' folder in the right place, and an uploaded image '1.jpg' is created, the files are not available for use, or even manipulation via ftp on a unix server. I'd love to use this extension, and to assist in any way i can debugging with the current version of vanilla, and a unix system.
  • Posts: 755
    I know it's buggy :) I've maybe released it to quick.... I have an "open" system and haven't got any trouble with file permissions... Best way to go is to create the avatar folder yourself and chmod 777 it.... I'll have a way better extensions when Vanillia 0.9.3 is released :)
  • Posts: 32
    So, from Vanilla down, what are the permissions I need to set the folders at?

    vanilla folder = ???
    images folder = ???
    avatars folder = 777
    actual images = ???

    edit: i just gave the 1.gif image permissions of 444 and it worked, i think? How can I edit the script to do this for each new uploaded image?
  • Posts: 755
    The only folder that you have to take care of, is the /images/avatars folder. If you set this to 777 you will have no problems.

    If you want to chmod every uploaded avatar, add this to the script:

    Look for (somewhere at line 100):

    // Move file
    if( move_uploaded_file( $tmpfile, $target )) {
    ..


    After this line, add:

    chmod( $target, 0655);


    Or some other permission settings.
  • Posts: 5,574
    For security reasons it's probably worth working your way down from 777 to the minimum you can run with.
  • Posts: 32
    Meaning starting at 777, then trying 776, then 766, then 666, and so forth????
  • Posts: 101
    chmod( $target, 0655)
    I added this line of code at line 101

    still getting these errors:

    Error Message: Could not upload avatar image.
    Affected Elements: AvatarManager.SaveAvatar();

    seems like a deeper permissions issue.
This discussion has been closed.