Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 4 replies - 26 through 29 (of 29 total)
  • In reply to: Profile image sizes

    @jhob

    Participant

    Also it seems that something has created an additional size (600 x 200 in our case, no idea why it has been created), see screenshot of an avatar image directory:

    Any explanation for that?

    In reply to: Profile image sizes

    @jhob

    Participant

    With the sizes set as they are on the site that’s rather limiting.

    Is there any way around this?

    In reply to: Profile image sizes

    @jhob

    Participant

    Those sizes are already set there:

    
    <?php
    
    // Resizes avatars
    define ( 'BP_AVATAR_THUMB_WIDTH', 86 );
    define ( 'BP_AVATAR_THUMB_HEIGHT', 50 );
    define ( 'BP_AVATAR_FULL_WIDTH', 1920 );
    define ( 'BP_AVATAR_FULL_HEIGHT', 1111 );
    define ( 'BP_AVATAR_ORIGINAL_MAX_WIDTH', 2000 );
    define ( 'BP_AVATAR_ORIGINAL_MAX_FILESIZE', 5120000 );
    
    // Changes default avatar
    define ( 'BP_AVATAR_DEFAULT', esc_url( home_url( '/' ) ).'wp-content/themes/ihg2014/images/avatar.jpg' );
    define ( 'BP_AVATAR_DEFAULT_THUMB', esc_url( home_url( '/' ) ).'wp-content/themes/ihg2014/images/avatar_thumb.jpg' );
    
    //Removes automatic links in user profiles
    remove_filter( 'bp_get_the_profile_field_value', 'xprofile_filter_link_profile_data',  9, 2 );
    

    I am wanting to create image sizes additional to these.

    Is there a way of doing that in bp-custom.php?

    @jhob

    Participant

    It was v2.9.3.

    I have just found that the previous developer had modified a core file:

    Line 603 in /bp-core/js/avatar.js (& avatar.min.js):

    
    // Add the cropping interface
    			tocrop.Jcrop( {
    				onChange: _.bind( self.showPreview, self ),
    				onSelect: _.bind( self.showPreview, self ),
    				// CUSTOM CODE START
    				// THIS ALSO NEEDS UPDATING ON 'avatar.min.js' !!! //
    				aspectRatio: 1.72817,
    				// CUSTOM CODE END
    				/* CUT SECTION
    				aspectRatio: self.options.aspectRatio,
    				*/
    				setSelect: [ crop_left, crop_top, crop_right, crop_bottom ]
    			}, function() {
    				// Get the Jcrop API
    				bp.Avatar.jcropapi = this;
    			} );
    

    I re-applied this modification to avatar.js and avatar.min.js but it did not resolve the issue.

    Any ideas?

Viewing 4 replies - 26 through 29 (of 29 total)
Skip to toolbar