Square User Avatar

16 years 2 months ago #56948 by ffaabbss
Replied by ffaabbss on topic Re:Square User Avatar
I DID IT:
NO STRETCHING, NO DISTORTIONS
no matter whether the image is smaller than the maximum set size or bigger. Now all images will have the same size after upload and will be cropped to a square.
SO will the thumbnails!! Just set your sizes in CB backend that is it.

So now all you need to do is advice ur users that on the iamge they want to upload they should be either more or less in the center or if they really want full control they need to upload an image with the exact dimensions you specify.

Just replace your imgToolbox.class.php in administrator/components/com_comprofiler/
with the following file (unpack first):

Attachment imgToolbox.zip not found

Attachments:
The following user(s) said Thank You: diogotu

Please Log in to join the conversation.

16 years 2 months ago #56953 by ffaabbss
Replied by ffaabbss on topic Re:Square User Avatar
BIG PROBLEM:
the gd2 function we hacked is also used by nants profile gallery. SO pictures that are uploaded to profile gallery are also affected and altered...
Can somebody provide some hack to circumvent that?

maybe a solution would be to include the function twice and make profile gallery use the second unaltered version somehow. can that be done?

or is there any other solution maybe?

PLEASE SOMEONE...
already getting headaches here... no idea what to do

Please Log in to join the conversation.

16 years 2 months ago #57518 by nmcleod
Replied by nmcleod on topic Re:Square User Avatar
Having spent the entire weekend trawling the internet for a snippet of code to do this, I finally come across a gem of a link to this thread on Joomlapolis.

One word: Genius. B) Not me, you. ;)

ffaabbss wrote:

I DID IT:
NO STRETCHING, NO DISTORTIONS
no matter whether the image is smaller than the maximum set size or bigger. Now all images will have the same size after upload and will be cropped to a square.
SO will the thumbnails!! Just set your sizes in CB backend that is it.

So now all you need to do is advice ur users that on the iamge they want to upload they should be either more or less in the center or if they really want full control they need to upload an image with the exact dimensions you specify.

Just replace your imgToolbox.class.php in administrator/components/com_comprofiler/
with the following file (unpack first):

Attachment imgToolbox.zip not found

Please Log in to join the conversation.

16 years 2 months ago #57539 by ffaabbss
Replied by ffaabbss on topic Re:Square User Avatar
unfirtunately not THAT genius.. I still need someone to help me out, so that NANTS PROFILE GALLERY does NOT also use that altered toolbox function and leaves the images without squaring them...
please someone HELP HELP!!
Thans
Fabs

Please Log in to join the conversation.

16 years 1 month ago #59025 by ffaabbss
Replied by ffaabbss on topic Re:Square User Avatar
bump... noone a fix for that ... please?

Please Log in to join the conversation.

16 years 3 weeks ago #60208 by Masochist
Replied by Masochist on topic Re:Square User Avatar
Hello... It's working for me just fine but at the same time, I didn't want to resize the profile picture also.. I just want to make the thumbnail squared not both of them.. is this possible?

Great job anyway, I spent a whole week trying to find such a solution... keep it up

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.245 seconds

Facebook Twitter LinkedIn