MOD: Add avatar with image crop (on the fly) - Posted (10333 Views)
Junior Member
balexandre
Posts: 418
418
Updated (June 16th, 2009)
new version updated by Classicmotorcycling
--> download zip file here <--


some time ago I mention that I was developing a MOD because I needed the ability to let users upload a picture, crop the picture on the fly and save it as an avatar, well, today I when Online with the MOD and is now on testing on my forum and it will be for a while, so I can publish a MOD with less flows as I can.
I made an HOW TO Video for our users and you can see it if you open this link (SWF: 10,2 Mb)

Details about the MOD First of all you need the Avatar MOD (you can find it here) up and running, because I use the new Columns in the forum MEMBER table, secondly you need to have the forum hosted with 2 objects, ASPUpload and ASPjpeg (these are responsible to Upload the file into the server, and to crop the image) [much more latter I will update the mod without the ASPUpload Object and with other Image Objects] - this tho are the most popular used by Shared Hosting Companies, like Brinkster or Discount ASP.NET.
the MOD consists in only 2 files

avatar_user_upload.asp (text version)
avatar_user_croppingimage.asp (text version)

plus all JS and CSS from http://www.dhtmlgoodies.com/index.html?whichScript=image-crop

the first consists in secure the user, let it select the picture and upload and after the crop is done, display and insert the new avatar in the MEMBERS table
the second only consists in present the uploaded picture and with a nice and friendly tool, let the user to crop the image at will.
Functionality about the MOD The user uploads a picture (PNG, GIF, BMP, TIF) free of size, after the crop, the MOD creates a new JPG image with 96 x 96 pixels and 100% jpeg compression, it names [username].jpg and deletes the original from the server adding the new URL to the MEMBERS table.
Some pictures of the MOD



<
 Sort direction, for dates DESC means newest first  
 Page size 
Posted
Development Team Leader
Classicmotorcycling
Posts: 2085
2085
I look at putting the code together this week-end in english and an install file. Been a bit under the pump at work...<
Cheers,

David Greening
Posted
Average Member
richfed
Posts: 999
999
I am not clear on this point: Does your server still need these two doo-dads [ASPUpload and ASPjpeg] in order to function, or has it been revised? My host only supports the former.<
Posted
Development Team Leader
Classicmotorcycling
Posts: 2085
2085
Hello,

I have submitted the code to SnitzBitz as an addon to the Avatar mod.
Any issues with it, please submit to the Help: MOD Implementation and I will try to help the best I can. Multiple requests for help on the same subject in different topics will be deleted. Please do not create a new topic for the same mod as it makes it a nightmare trying to track it down.<
Cheers,

David Greening
Posted
Advanced Member
Etymon
Posts: 2396
2396
Hi Classic and balexandre,

Thanks for the MOD and the code guys! I've installed it but not uploaded it yet. When I upload it, I'll give you a shout back to tell you how it works.
Etymon
<
Posted
Advanced Member
Etymon
Posts: 2396
2396
I posted some findings here: http://forum.snitz.com/forum/topic.asp?TOPIC_ID=67726<
Posted
Development Team Leader
Classicmotorcycling
Posts: 2085
2085
I have made a couple of small changes to the mod and how to put in the registration code for the ASPJpeg if you host doesn't want to supply the full vesion, but will put on a version that you can use with your own registration.
I also fixed a small error when actually viewing the Avatar after submitting the cropped image.
I have placed it at: Avatar Crop Mod
Cheers,

David Greening
Posted
Advanced Member
Etymon
Posts: 2396
2396
Thank you David! smile
Posted
Junior Member
balexandre
Posts: 418
418
I also fixed a small error when actually viewing the Avatar after submitting the cropped image.

would be nice to see the changes as a file diff smile
I will add this link to the first post
You Must enter a message