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?
Yes I have purchased the software and have a download of the source code. I would very much appreciate your guidance in making the change
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!
Can I make this change via the admin console themes /template/global/profile-avatar-review.ftl
or would I have to recompile/redeploy the application... If so, are there instructions on how to recompile/redeploy if I change the source code?
I'm currently using SBS 3.0.3 but I'll be using the Solaris version once it is out on 06/28. Not sure what version they will call that.
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.
Jive combines the most powerful features of collaboration software, community software,
social networking software & social media monitoring into the leading SBS solution.
© Copyright 2000–2010 Jive Software. All rights reserved.
915 SW Stark St., Suite 400, Portland, OR 97205
Sales: 877-495-3700 | General: 503-295-3700
Privacy Policy | Sitemap | Jobs | Contact Us