Return to Jive Software

Skip navigation
2,107 Views 7 Replies Last post: Jun 24, 2009 12:23 PM by brad.heller RSS
rcastle Novice 75 posts since
Jan 5, 2009
Currently Being Moderated

Jun 12, 2009 11:34 AM

SBS: Profile Image Size

The resize image tool in the profile image forces you to size the image as landscape... My client would like to be able to format profile images in portrait format. Can this be done in SBS?

Expert 3,517 posts since
Jun 18, 2009
Currently Being Moderated
Jun 24, 2009 10:51 AM in response to: rcastle
Re: SBS: Profile Image Size

Hey Gerald,

 

This is hard-coded in to SBS. If you've purchased SBS and have access to the source it's be possible to change the cropping aspect ratio and avatar image sizes appropriately. I could point out the modifications you'd need to make if you like -- please let me know.

 

Cheers,

Brad

Expert 3,517 posts since
Jun 18, 2009
Currently Being Moderated
Jun 24, 2009 11:06 AM in response to: rcastle
Re: SBS: Profile Image Size

Sure!

 

Cropping is done via a jQuery plugin called Jcrop. In <sbs_source>/application/skin/WEB-INF/classes/template/profile-avatar-review.ftl check out lines 38-111. This JS sets up and controls the crop feature. All you really have to do is modify the logic in bindCrop() and showPreview().

 

Let me know if there are further issues!

Expert 3,517 posts since
Jun 18, 2009
Currently Being Moderated
Jun 24, 2009 11:50 AM in response to: rcastle
Re: SBS: Profile Image Size

Which version of SBS are you using/looking to use? I've just discovered that this process will be different in different versions...

Expert 3,517 posts since
Jun 18, 2009
Currently Being Moderated
Jun 24, 2009 12:23 PM in response to: rcastle
Re: SBS: Profile Image Size

Okay. Yes, please use the admin console to make the requisite modifications to the .ftl files. In 3.0.3 you won't need to modify the JavaScript after all! You're actually just going to need to change some CSS classes.

 

Edit the file /template/global/custom-css.ftl and add the following

 

.jive-profile-images-edit #photo-preview {
    width: 120px !important;
    height: 160px !important;
}

 

SBS uses these CSS rules to set up the cropping width and height. By default they're swapped (width: 160px; height: 120px;) so changing them to the above rotates the cropping tool from landscape to portrait! Most all of the site is not concerned with the profile image's height and width so as long as you can crop it in "portrait mode" you should be ok. It might be worth noting that Avatars are a different story .

 

Note that in /template/global/profile-avatar-crop.ftl, the consumer of this CSS snippet that we're concerned with, "#photo-preview" is assigened to the JavaScript via the template engine so if that ever gets changed at the template level you'll need to change that here too.

More Like This

  • Retrieving data ...

Bookmarked By (0)

To better serve our customers we have included functionality to automatically follow up on a case after it has been idle for more than 5 days, and then auto close after an additional 3 days of inactivity. Choose No to acknowledge that this case will remain idle for longer than 5 days.
Making cases public allows other customers to learn from the solution of the case. It can also be used to gain feedback from others in the community. Ask our Support Engineers for more info, but we encourage you to make your cases public.