Avatar Cropping
-
BuddyPress Version 2.0.1
bbPress Version 2.5.4site: http://www.ban-trai.com/
id “hoangnam”
pass “thethi0604”Problem: tiny pixelated avatar
Possible cause:
In the script below which i found in the source of the webpage where i crop avatar.
There are 2 lines
var fw = 150;
var fh = 150;Which should be 580 as the original theme
var fw = 580;
var fh = 580;Please tell me what file to modify so it turn back to 580. Thank you!
<script type="text/javascript"> jQuery(window).load( function(){ jQuery('#avatar-to-crop').Jcrop({ onChange: showPreview, onSelect: showPreview, onSelect: updateCoords, aspectRatio: 1, setSelect: [ 113, 113, 337, 337 ] }); updateCoords({x: 113, y: 113, w: 337, h: 337}); }); function updateCoords(c) { jQuery('#x').val(c.x); jQuery('#y').val(c.y); jQuery('#w').val(c.w); jQuery('#h').val(c.h); } function showPreview(coords) { if ( parseInt(coords.w) > 0 ) { var fw = 150; var fh = 150; var rx = fw / coords.w; var ry = fh / coords.h; jQuery( '#avatar-crop-preview' ).css({ width: Math.round(rx * 450) + 'px', height: Math.round(ry * 450) + 'px', marginLeft: '-' + Math.round(rx * coords.x) + 'px', marginTop: '-' + Math.round(ry * coords.y) + 'px' }); } } </script>
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Avatar Cropping’ is closed to new replies.