Skip to:
Content
Pages
Categories
Search
Top
Bottom

Square member avatar and horizontal group thumbnail


  • m1000
    Participant

    @m1000

    Hi!

    I have noticed that there is no way to have square avatars and horizontal groups thumbnail.

    In the wp-content/plugins/buddypress/bp-core/bp-core-avatars.php I found bp_core_set_avatar_constants function where can be defined only 1 width and 1 height for avatars and group thumbnail. I think there should be allowed different height for avatars and thumbnails.

Viewing 5 replies - 1 through 5 (of 5 total)

  • m1000
    Participant

    @m1000

    Look here – http://imm.io/NllV
    There is no way to make it square.


    @mercime
    Participant

    @mercime

    Re square avatars: have you tried holding down, CTL, SHIFT or Command key while pulling the top right corner of the crop tool?

    What do you mean by “horizontal groups thumbnail” ?


    m1000
    Participant

    @m1000

    Yes, I have tried to crop avatar with and without CTL, SHIFT or Command key.

    Right now I have following settings in the bp-core-avatars.php

    For function bp_core_set_avatar_constants

    if ( !defined( 'BP_AVATAR_FULL_WIDTH' ) )
    define( 'BP_AVATAR_FULL_WIDTH', 215 );

    if ( !defined( 'BP_AVATAR_FULL_HEIGHT' ) )
    define( 'BP_AVATAR_FULL_HEIGHT', 135 );

    and for function bp_core_fetch_avatar:

    'width' => 150, // Custom width (int)
    'height' => 150, // Custom height (int)

    The result is I can’t make avatars 150x150px (problem with crop) – http://imm.io/NrNw

    Like I said, I want to have 215×135 (horizontal) group thumbnails so I modified bp_core_set_avatar_constants but unfortunately member avatars have also 215×135 while I want 150×150 size.

    To do this right now, you’ll have to write your own avatar cropping code. It’s the sort of thing that we’ll likely add support for (non-square avatars) in the future.


    m1000
    Participant

    @m1000

    I hope you will add it to the next version of BP.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Square member avatar and horizontal group thumbnail’ is closed to new replies.
Skip to toolbar