MOD: Add avatar with image crop (on the fly)

Snitz™ Forums 2000
https://forum.snitz.com/forumTopic/Posts/65973?pagenum=1
05 November 2025, 00:07

Topic


balexandre
MOD: Add avatar with image crop (on the fly)
29 November 2007, 18:05


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



<

 

Replies ...


Etymon
30 November 2007, 06:00


What a choice!
Do I want the MOD or the baby in the picture! bigsmile
Can I have both? tongue<
balexandre
30 November 2007, 09:02


baby is mineeeee, onlyyy mine, eheheh

my daughter with 3 month tongue<
Etymon
01 December 2007, 00:52


Oh it doesn't hurt to ask!
*striking the baby off of the wish list!*<
Panhandler
04 December 2007, 09:10


Where are the files:?:

avatar_user_upload.asp
avatar_user_cropping.asp
<
balexandre
04 December 2007, 10:12


thy are being intensively tested by the users of my forum tongue
give it 2 weeks for testing and bugs fix, and so I can replace all the Portuguese sentences with a proper Language selector file smile <
Lon
19 December 2007, 13:20


Bump

It's been 2 weeks....

Sounds like an AWSOME MOD! Thanks for working so hard on it.<
balexandre
19 December 2007, 15:25


and my users are loving it tongue
after new years I will paste the complete MOD smile<
Etymon
12 March 2008, 14:07


Peeking in just to see how this MOD might be progressing. smile<
balexandre
13 March 2008, 14:07


I'm trying to avoid working with 2 asp components, the ASPUpload and ASPjpeg that, right now you need to have installed in your machine to this MOD properly work.
<
AnonJr
13 March 2008, 14:21


Too bad this only seems to work with GIFs... I'm willing to bet that there is something out there though.
http://chris.brimson-read.com.au/index.php?option=com_content&view=article&id=2&Itemid=2

<
MaD2ko0l
13 April 2008, 15:34


any news on this mod yet?<
Etymon
15 April 2008, 00:00


Originally posted by balexandre
I'm trying to avoid working with 2 asp components, the ASPUpload and ASPjpeg that, right now you need to have installed in your machine to this MOD properly work.

Hi balexandre,

I don't mind if those components are needed. The machine I am using has those on it.<
balexandre
22 July 2008, 08:59


I do not have any time to finish the code... does anyone want like it is?
it is working and all my Forum users love it.<
Carefree
22 July 2008, 09:22


Sure, I'll take a stab at updating it if you'll post a link.<
balexandre
22 July 2008, 09:30


updated...
Note that is Like it is, I did nothing about making the MOD user friendly! soon I have the time, or with your help wink<
Carefree
22 July 2008, 10:19


The way it works now, there are some style sheets & javascript files required:

xp-info-pane.css
image-crop.css
js/xp-info-pane.js
js/ajax.js
image-crop.js
If they are no longer required, I'll remove the includes, etc. If they are necessary, please provide links.
Edit - disregard, got them from the authors' site.<
balexandre
22 July 2008, 12:49


smile
and you get an updated css and js files

for the ones who need the link: http://www.dhtmlgoodies.com/index.html?whichScript=image-crop

Carefree... you could paste the link yourself tongue <
Classicmotorcycling
26 July 2008, 19:45


I am almost there getting this installed and ready for my users, which included creating the language file. I have converted it to fully operate under a language file, just have a slight issue when submitting the cropped avatar with some SQL it is trying to put in and the footer. In the next week or so, if it is OK with Bruno, I may put up a download for the mod at SnitzBitz.<
balexandre
28 July 2008, 08:21


sure thing smile<
Etymon
13 August 2008, 21:35


I'd like to take a look at your code.<
Classicmotorcycling
15 August 2008, 04:54


I look at putting the code together this week-end in english and an install file. Been a bit under the pump at work...<
richfed
16 August 2008, 11:22


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.<
Classicmotorcycling
17 August 2008, 05:46


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.<
Etymon
21 August 2008, 13:46


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
<
Etymon
10 September 2008, 09:07


I posted some findings here: http://forum.snitz.com/forum/topic.asp?TOPIC_ID=67726<
Classicmotorcycling
09 June 2009, 03:28


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
Etymon
09 June 2009, 03:46


Thank you David! smile
balexandre
16 June 2009, 18:08


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
© 2000-2021 Snitz™ Communications