BuddyDev

Search

Replies

  • Participant
    Level: Initiated
    Posts: 4
    Stefan on #52226

    Thanks for the reply Brajesh,

    my aplogies. I found the correct setting “set-up” inside the plugins admin options.
    I can now see the notifications inside the menu dropdown as well as on the notification page, so you dont need to check that anymore. Thats great!

    However, I just realized that the notification is turned off out of the box. To be clear, when I check users “Account Settings” – “Notification Preferences” then recent visits notification is always off. Users need to manually turn them on first.

    Is there any way to have it on from the start?

    One possible solution: Would be great to have this setting in “BuddyBoss” – “Settings” – “Notifications” and then under the notification type, admin can pre-select/turn off or on several notification settings for users right from the start. This way admin can already set it to on from the start. (It is the same section where admin can also pre-select to turn on/off email/web or app notification for messages, comments etc.)
    Otherwise I need to inform each user to do it manually which is not the preferred way.

    Is it possible to add it to the “BuddyBoss” – “Settings” – “Notifications” – “Notification type” section?

  • Participant
    Level: Initiated
    Posts: 4
    Stefan on #52216

    Hi Brajesh,
    thanks again for your reply 🙂

    1. I just checked again, and there are no notifications when a user visits another users profile. I tried with several users and visited others but no one gets a notification displayed in their

    a: notification dropdown or
    b: on their notification page.

    I turned on the “Recieve Notification on new profile visits?” preference but still no notifications get shown.

    I would like a user to see a notification when another user visited his profile in the menu notification dropdown (the icon bell in the header with notifications that also shows when a user has received messages, comments, likes, etc.). Currently nothing gets displayed as notification in it. The notification could read something like “XYZ has visited your profile”.
    If it does already according to the plugin then something is not working properly perhaps due to one of the latest BuddyBoss updates?

    2. The reason why I want to show the “Show My Profile Visits” under the “Notification Preferences” tab is because the plugin already creates 2 entries there for Recent Visits. I would just like to make the “Account Settings” section as clean with as few tabs as possible. That is why it would be great to keep the entries together in the same notifiaction tab. If you could put them together/merge them that would amazing.

  • Participant
    Level: Initiated
    Posts: 4
    Stefan on #52197

    *as to my 2nd point:

    I just realized there are 2 plugin settings already inside the “Notification Preferences” tab:

    – “Recieve Notification on new profile visits?” +
    – “Recieve Notification on new profile visits by email?”

    So it would make even more sense to add the “Show My Profile Visits” (Please note, If you enable the visitors recording, your visits to others profile will be visible too. ) option from the “Recent Visits” tab to those above (to save a tab and also to have all user options together in one place)

  • Participant
    Level: Initiated
    Posts: 4
    Stefan on #51632

    Hi Ravi,
    I just tried to use your above-mentioned code:

    function bpdev_track_user_favorite( $activity_id, $user_id ) {

    bp_activity_add_meta( $activity_id, ‘favorited_by_user’, $user_id );
    }
    add_action( ‘bp_activity_add_user_favorite’, ‘bpdev_track_user_favorite’, 10, 2 );

    function bpdev_track_user_unfavorite( $activity_id, $user_id ){

    bp_activity_delete_meta( $activity_id, ‘favorited_by_user’, $user_id );
    }
    add_action( ‘bp_activity_remove_user_favorite’, ‘bpdev_track_user_unfavorite’, 10, 2 );
    //show faces, yay!

    function bpdev_show_who_favorited_activities() {
    $output = ”;
    $favorited_users = bp_activity_get_meta( bp_get_activity_id(), ‘favorited_by_user’ );
    //print_r($favorited_users);
    if ( ! empty( $favorited_users ) ) {

    foreach ( (array) $favorited_users as $user_id ) {
    $output .= ““. bp_core_fetch_avatar ( array( ‘type’=> ‘thumb’, ‘height’=> 25, ‘width’=>25, ‘item_id’=> $user_id ) ) . ““;
    }

    }
    if ( $output ) {
    echo “<div class=’clearfix activity-favorited-by’>{$output}</div>”;
    }

    }
    add_action( ‘bp_activity_entry_content’, ‘bpdev_show_who_favorited_activities’ );

    It works but it only shows the first user who liked an activity post.
    Would be great to show a specific number of users who liked a post.
    Do I need to use a different hook or action name (after all the past updates)?
    By the way, I am using BuddyBoss.