Skip to:
Content
Pages
Categories
Search
Top
Bottom

how to define 3rd avatar size


  • Jaremilus
    Participant

    @jaremilus

    hello,

    is possible to add 3rd avatar size to this:

    define( ‘BP_AVATAR_THUMB_WIDTH’, 50 );
    define( ‘BP_AVATAR_THUMB_HEIGHT’, 50 );
    define( ‘BP_AVATAR_FULL_WIDTH’, 150 );
    define( ‘BP_AVATAR_FULL_HEIGHT’, 150 );
    
    <strong>define( ‘BP_AVATAR_MY_3RD_SIZE_WIDTH’, 90 );
    define( ‘BP_AVATAR_MY_3RD_SIZE_HEIGHT’, 120 );</strong>

    for use in members directory:

    <a href="<?php bp_member_permalink(); ?>"><?php bp_member_avatar( 'type=my3rdsize&width=90&height=120' ); ?></a>

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

  • Henry Wright
    Moderator

    @henrywright

    Hi @jaremilus,

    There’s also the original size which you could use BP_AVATAR_ORIGINAL_MAX_WIDTH but aside from that I know of nothing else available.

    You can pass an array of sizes as you show, so you state the type you want i.e ‘full’ but ensure that the original or full default size is much larger than you need and then size it down per avatar display – does mean you need to look at all calls to display avatars probably to ensure any that attempt to display the default are managed for size.


    Jaremilus
    Participant

    @jaremilus

    good idea Hugo, thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘how to define 3rd avatar size’ is closed to new replies.
Skip to toolbar