Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: MOD Implementation
 Add avatar with image crop (on the fly) - findings
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Etymon
Advanced Member

United States
2393 Posts

Posted - 10 September 2008 :  09:26:58  Show Profile  Visit Etymon's Homepage
MOD topic: http://forum.snitz.com/forum/topic.asp?whichpage=1&TOPIC_ID=65973

First, of all this is a really SWEET avatar upload MOD. Thumbs up to balexandre who assembled tid bits from far and near and shared the resulting code and also praise to ClassicMotorcycling for doing some more tweaking and then packaging it up along with a really nice readme for all of us to enjoy!!!

OK, I got the MOD up and running, but (from my experience) there are a few things to consider adding to the readme.

My host had my site set up on IIS7, so I couldn't troubleshoot the problems by onscreen errors. Well, I guess I could have made a custom error page, but I didn't. Instead, I had to do a walk-through with my host's tech department rep.

At first, the rep said it was a permissions issue that was the cause of the upload failing. So, for my upload folder I ended up giving full permissions to the three users I have available to me (asp.net, everyone, and myself). That didn't fix the problem.

I knew that the upload worked for ASPJpeg and ASPUpload because I also had the photo album by Burthold installed, and it uploaded just fine. So, it seemed there was something more. Since the rep couldn't see what the errors were (like I couldn't), the rep made a copy of the site and put it over on IIS6 just to see the errors. Then we were able to resolve the errors. I decided to stick with IIS6 for a bit longer for testing. The rep was cool with that.

Meanwhile, these are the findings that I have so far:

1) There may be a need to set the proper permissions on the folder(s) to which you are uploading your images.

2) In the file avatar_user_croppingimage.asp, if the host's administrator has disabled File.SaveAs (around line 65), then you'll have to try File.SaveAsVirtual like this:

File.SaveAsVirtual "/avatars/" & user & "_original." & right(File.FileName, 3)

Reference: http://www.aspupload.com/object_file.html#SaveAsVirtual

3) In the file avatar_user_upload.asp, be sure that if you are using a different directory than "avatars" ... that you specify the destination directory on line 276 where it has: AVATAR_PATH = "avatars" ... otherwise the cropped image will not go to the same place as your original. If you do have an "avatars" directory as well as another directory, both directories need the correct permissions to accept the upload as well as the finished image.

What you should expect to see in your destination folder are two .jpg files. The MOD creates an original using the member's member name as a prefix in front of _original making it look like this: Etymon_original.jpg, and then from the original it creates the cropped image making it to look like this Etymon.jpg.

Update:

I called the host again and got another rep (different shift by then). I read a topic here: http://bytes.com/forum/post1702466-9.html and used the control panel to create an application starting point where my "avatars" folder was located. It didn't seem to make the difference. I mentioned it to the rep, and he said something about the folder wasn't inheriting. It was all kind of quick as he was just trying to get the FTP to work since that is what I called about.

So, I don't really know if it was the timing of the switch to IIS6 or something the second rep did in regards to the post I mentioned above. I did have to comment out lines 347-354 in file avatar_user_upload.asp because the sql was trying to delete something that wasn't there. With all that I did, I am not sure if that is to be expected on a clean install. Just an FYI.

The next time I do a clean install, I'll remember the hurdles and then take closer notes to the incidentals above. Good luck!<

Edited by - Etymon on 10 September 2008 16:49:36

balexandre
Junior Member

Denmark
418 Posts

Posted - 11 September 2008 :  13:57:43  Show Profile  Visit balexandre's Homepage  Send balexandre an ICQ Message
thanks for the message.

soon I get better I try to see line by line wt are you saying <

Bruno Alexandre
(Strøby, DANMARK)

"a Portuguese in Danmark"


Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.28 seconds. Powered By: Snitz Forums 2000 Version 3.4.07