-
Author
-
June 8, 2014 at 00:17 #19499
tydd
ParticipantHi, 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
var fw = 580;
var fh = 580;Now please tell what file to modify so it turn back to 150.
COPY CODE<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>June 8, 2014 at 01:07 #19500tydd
ParticipantMistakes:
Now please tell me what file to modify so it turn back to
150580.June 8, 2014 at 03:20 #19503tydd
ParticipantI resolve it by fix /home1/bantraic/public_html/wp-content/plugins/buddypress/bp-core/bp-core-avatars.php
COPY CODEif ( !defined( 'BP_AVATAR_FULL_WIDTH' ) ) define( 'BP_AVATAR_FULL_WIDTH', 580 ); if ( !defined( 'BP_AVATAR_FULL_HEIGHT' ) ) define( 'BP_AVATAR_FULL_HEIGHT', 580 ); -
AuthorPosts
Viewing 3 posts - 1 through 3 (of 3 total)
The topic ‘Avatar Cropping’ is closed to new replies.

