This topic has 4 replies, 2 voices, and was last updated 8 years by creativesinside.

  • Author
  • #60992
     creativesinside
    Participant

    How do I make the avatar of the corresponding users show up on the notifications?

    #61056
     sharmstr
    Moderator

    BP doesnt give you and easy way to do that. The notification table only has a userid for who the notification belongs to, not who triggered it. I’m not saying it isn’t possible, but it would take a lot of custom coding to get the avatar of who initiated the notification because you’d have to search for it in the appropriate table (blog post, mentions, messages.)

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

    #61067
     creativesinside
    Participant

    I’m trying this to no avail:

    function bp_the_notification_avatar() {
    echo bp_get_the_notification_avatar();
    }

    function bp_get_the_notification_avatar() {
    $bp = buddypress();
    $user_id = $bp->notifications->query_loop->notification->secondary_item_id;
    echo bp_activity_avatar( array( ‘user_id’ => $user_id ) ); }

    Ok so … I need to access the database?

    #61069
     sharmstr
    Moderator

    Try asking on the bp forums.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

    #61075
     creativesinside
    Participant

    Spanx! I’ll post back if I have any luck!

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

The forum ‘KLEO’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?