Arrow Home arrow Forums
larger font smaller font default font Fixed screen resolution Auto adjust screen size

Joomlapolis Forums  


<< Start < Prev 1 2 3 4 5 Next > End >>
Re:Square User Avatar
Date: 2007/06/15 22:14 By: Dionysus Status: User  
Karma: 3  
Senior Joomlapolitan

Posts: 67
graphgraph
Can you tell me where to add in this code?
Click here to see the profile of this user The administrator has disabled public write access.

Re:Square User Avatar
Date: 2007/10/29 15:38 By: cee Status: User  
Karma: 1  
Fresh Joomlapolitan

Posts: 4
graphgraph
I think I've found the bug which made the images resize a bit funny (if they were in landscape mode).

I changed this:
Code:

  if($width$height) { $x ceil(($width $height) / ); $width $height; } elseif($height$width) { $y ceil(($height $width) / 2); $height $width; } $destWidth $destHeight; $destHeight $destWidth;



To this:
Code:

  if($width$height) {          $x ceil(($width $height) / );          $width $height;          $destHeight $destWidth; } elseif($height$width) {          $y ceil(($height $width) / 2);          $height $width;          $destWidth $destHeight; }



and it worked for me.
Click here to see the profile of this user The administrator has disabled public write access.

Re:Square User Avatar
Date: 2007/10/29 16:56 By: Dionysus Status: User  
Karma: 3  
Senior Joomlapolitan

Posts: 67
graphgraph
wired wrote:
Awesome guys!! But can this be adapted to first resize then crop from the center like http://fredfred.net/skriker/index.php/iimage-gallery ?

crop="true" crop_center="true" max_side="100" quality="95"


That way it's just not a simple crop. Looks way better.



Where do you have to change this?
Click here to see the profile of this user The administrator has disabled public write access.

Re:Square User Avatar
Date: 2007/10/31 09:48 By: cee Status: User  
Karma: 1  
Fresh Joomlapolitan

Posts: 4
graphgraph
Dionysus - Read the thread from the beginning and it'll tell you what file to change.
Click here to see the profile of this user The administrator has disabled public write access.

Re:Square User Avatar
Date: 2008/02/17 21:31 By: ffaabbss Status: User  
Karma: 5  
Gold Joomlapolitan

Posts: 290
graphgraph
is there a way to resize already existing avatars? so that i can use this function?
Click here to see the profile of this user The administrator has disabled public write access.

Re:Square User Avatar
Date: 2008/02/17 22:54 By: ffaabbss Status: User  
Karma: 5  
Gold Joomlapolitan

Posts: 290
graphgraph
it does not seem to work for me. I mean the thumbnails get squared when i replace the function but my user avatars will be the maximum size defined in backend but not necessarily squared. if a user uploads a different sized image the avatar will not be square, just the thumbnails e.g. in login module are squared now...
how can i also get a square avatar cropped out?
my avatar only gets cropped if it exceeds the maximum size but it does not get croppped squared but just to maximum size on the affected side.
so if i have a max of 200*200 specified and upload an image with 200*250 it will get squared to 200*200 but if i upload an image with 200*150 it will not be 150*150 but original size
meaning i want the function to resize the uplaoded avatar and then crop out a square from the center.
and if the avatar is smaller than the specified maximum size it should still be cropped to a square depening on the shortest side.


Post edited by: ffaabbss, at: 2008/02/17 23:19
Click here to see the profile of this user The administrator has disabled public write access.

<< Start < Prev 1 2 3 4 5 Next > End >>

Documentation

Documentation Subscription Service
(updated for CB 1.2 RC2)

What?

Why?

Where?

Just click here for answers!

Click here for a yearly subscription: subscribe now

Download Latest Release

The latest stable Community Builder Release is version 1.1 for Joomla 1.0 and Mambo.
You need to be a registered member of Joomlapolis to download.

The latest release candidate of Community Builder is version 1.2 RC3, native for Joomla 1.0, 1.5 and Mambo.
It is available as "thank you" to all CB documentation subscribers at this time.

CB Login