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
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 :)
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'.
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.
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 :)
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.
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!
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?
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!
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.
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 :)
Comments
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
Did I tell you allready that you are my best friend?
Anyways, I'll try it out this weekend - nice work!
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!
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?
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.
still getting these errors:
Error Message: Could not upload avatar image.
Affected Elements: AvatarManager.SaveAvatar();
seems like a deeper permissions issue.