BuddyBoss Home – Web Support Forums Plugins BuddyBoss Wall The menstions tab on buddyboss wall

Viewing 15 posts - 1 through 15 (of 32 total)
  • Question

    #32310
    @danpajo

    Hello,

    You have given me an advice before: https://www.buddyboss.com/support-forums/topic/buddyboss-wall-and-mentions-notification/#post-31956

    My question was how to go to the @mention and removing the notification.

    As a sollution you gave me this 2 lines of code:

    remove_filter( 'bp_activity_multiple_at_mentions_notification', 'buddyboss_wall_format_mention_notification', 10, 5 );
    remove_filter( 'bp_activity_single_at_mentions_notification', 'buddyboss_wall_format_mention_notification', 10, 5 );

    Today Buddypress updated to 2.1.1 and the filter stopped working.

    Before the update and with your code the Notification in the admin bar was sending me to the activity. The url looked like this: http://danpajo.nl/activity/627/

    Now after the update the notification of the mention is sending me to a link like this: http://danpajo.com/members/Danpajo/activity/mentions/

    But just like in the first problem the mentions page is not there anymore since I use buddyboss Wall.

    When I remove your two lines in functions.php the problem is changing a bit.

    Then the notification is sending me to: http://danpajo.com/members/Danpajo/activity/

    But not to the specific Mention.

    IN both cases the notification is not getting deleted.

    I really hope you can help me out again!!

    jap

    Answers

    #32505

    Alyssa
    Participant
    @alyssa-buddyboss

    @danpajo are you certain BuddyPress did not change the default action for this item?

    #32521
    @danpajo

    Hello,

    I don’t know. I do think so. Yesterday I discovered another issue. With updates in groups its not sending me to the right place also.

    I discovered the notifications referring me to a link with /activity/p/(activity number) but the whole /p/ thing is not working.

    Before the update of buddypress I deleted the /p/ part in my php files of the buddypress notifications but now there is nowhere to find a /p/ part.

    So I am totally stuck on this and dont know how to solve it anymore.

    However, the filter you gave to me, the two lines of code aren’t working anymore. When I keep the code the site is reffering me to /mentions/ but that is not excisting anymore due to buddyboss.

    When i delete the code its refering me to /activity/ without a activity number so its going to the wall, not deleting the notification.

    So I guess its a bit buddypress but also a littlebit the behaviour of Buddyboss.

    I really hope you do have an advice to get the @mentions working for Buddypress and I hope you can tell me where I can find the code what is making the /p/ part to appear. I need to get rid of the /p/ part.

    regards

    jap

    #32522
    @danpajo

    ah I have noticed even the email notifications are changed to the wrong URL

    Do you know where to find that part of code?

    It would really help me!

    #32523
    @danpajo

    Ok, Today I Have learned that Notepad++ could do a search in all your files. I did not know that.

    I found out the /p/ thing! I will post it here also for when people have the same issue as I have at this moment. I still cannot understand why they are calling to /p/ because my site doesn’t hava a p.

    Search ". '/p/' ." (3 hits in 2 files)
      I:\buddypress\bp-activity\bp-activity-functions.php (2 hits)
    	Line 1705: 			$link = bp_get_root_domain() . '/' . bp_get_activity_root_slug() . '/p/' . $activity_obj->item_id . '/';
    	Line 1707: 			$link = bp_get_root_domain() . '/' . bp_get_activity_root_slug() . '/p/' . $activity_obj->id . '/';
      I:\buddypress\bp-activity\bp-activity-screens.php (1 hit)
    	Line 236: 			bp_core_redirect( site_url( 'wp-login.php?redirect_to=' . esc_url( bp_get_root_domain() . '/' . bp_get_activity_root_slug() . '/p/' . bp_current_action() . '/' ) ) );
    

    You have to remove p/ in every line then it will work. I have also found a line in bp-activity-template.php.

    Line 2674 : 		$latest_update .= ' <a href="' . bp_get_root_domain() . '/' . bp_get_activity_root_slug() . '/p/' . $update['id'] . '/"> ' . __( 'View', 'buddypress' ) . '</a>';
    

    Also remove p/ from this line. Then the notifications will work again. Do you know if it is possible to add something in your childtheme functions.php what will do the job also after updates?

    Now my only search is the @mention part in combination of buddyboss wall. I hope you can help me out!!

    Jap

    #32526
    @danpajo

    Sorry for the postings but it would be nice to get this to work.

    I have searched for /mentions/ and found out:

      I:\buddypress\bp-activity\bp-activity-notifications.php (1 hit)
    	Line 279: 			$at_mention_link  = bp_loggedin_user_domain() . bp_get_activity_slug() . '/mentions/';
      I:\buddypress\bp-templates\bp-legacy\buddypress\activity\index.php (1 hit)
    	Line 59: 					<li id="activity-mentions"><a href="<?php echo bp_loggedin_user_domain() . bp_get_activity_slug() . '/mentions/'; ?>" title="<?php esc_attr_e( 'Activity that I have been mentioned in.', 'buddypress' ); ?>"><?php _e( 'Mentions', 'buddypress' ); ?><?php if ( bp_get_total_mention_count_for_user( bp_loggedin_user_id() ) ) : ?> <strong><span><?php printf( _nx( '%s new', '%s new', bp_get_total_mention_count_for_user( bp_loggedin_user_id() ), 'Number of new activity mentions', 'buddypress' ), bp_get_total_mention_count_for_user( bp_loggedin_user_id() ) ); ?></span></strong><?php endif; ?></a></li>
      I:\buddypress\bp-themes\bp-default\activity\index.php (1 hit)
    	Line 79: 							<li id="activity-mentions"><a href="<?php echo bp_loggedin_user_domain() . bp_get_activity_slug() . '/mentions/'; ?>" title="<?php esc_attr_e( 'Activity that I have been mentioned in.', 'buddypress' ); ?>"><?php _e( 'Mentions', 'buddypress' ); ?><?php if ( bp_get_total_mention_count_for_user( bp_loggedin_user_id() ) ) : ?> <strong><span><?php printf( _nx( '%s new', '%s new', bp_get_total_mention_count_for_user( bp_loggedin_user_id() ), 'Number of new activity mentions', 'buddypress' ), bp_get_total_mention_count_for_user( bp_loggedin_user_id() ) ); ?></span></strong><?php endif; ?></a></li>

    Then I looked in Buddyboss wall and saw in Wall-hooks.php also a /mentions/.

    I tried to think simple since php is not my expertise and I changed /mentions/ in all files.

    I tried:

    . '/' . bp_current_action() .'/';

    And I tried:

    . '/' . $activity_obj->item_id . '/';

    But that sollutions only got the /mentions/ part away from the link and did not show the activity.

    For a quick solution I wouldnt mind to hard-edit the files till there is a solution but I dont know with what i have to replace the /mentions/ part.

    I hope you can give me an advice. When I use your given sollution of my last question it is referring to /activity/mentions/. Without your filter its referring to /activity/ but it should go to /activity/(activity-number)

    regards

    jap

    #32543

    Alyssa
    Participant
    @alyssa-buddyboss

    @danpajo I’m not really sure what else to tell you. That code removes any BuddyBoss coding for those items, I’m not sure what the new BuddyPress update changed. Perhaps you could try rolling back the BP install. Then again it could also be a plugin conflict. Let me know if you discover anything from that.

    #32626
    @danpajo

    Ok, I’m not sure how to do that.

    I am wondering. I think more people should have the same problem with mentions and buddyboss wall at this moment?

    Or am I alone with this matter.

    When there are more, I hope for a fix. For now I have installed clear notifications so users can manual remove the notifications about mentions. I managed to get the notificatons forwarded to someones wall ..

    About the plugin conflict. When i want to investigate that. I have to turn of all my plugins . Now i am wondering. When I deactivate them do they lose all their settings then?

    Or when I turn them back on the settings are still there?

    jap

    #32628
    @style960

    @danpajo @tjchester Is this what’s causing the notifications counter to remain the same after you’ve clicked on the notification? I’ve noticed this behaviour after recent upgrades.

    The notifications area should have the option to mark all as read – feature of the Kleo theme.

    #32631
    @danpajo

    Yeah it is after recent updates. It’s not going to the @mention so thats why the counter is not removing it.

    For this problem for now I use Bp Clear Notifications. It shows a Clear Notifications choice in the notifications drop down menu. So users can directly change the not removed notifications in the admin bar!

    regards
    jap

    #32633
    @style960

    @danpajo Thanks I’ll have a look at that. One for the BB feature request list I would say.

    #32641

    Alyssa
    Participant
    @alyssa-buddyboss
    #32683
    @michael

    Thanks. Yeah I would suggest using the BP Clear Notifications plugin. We’re trying to avoid adding functionality that overrides BP into the theme, it’s bad practice.

    #32684
    @style960

    @michael I’m a little confused – what do you think is causing the notification counter to not reset running latest version of BB? Any idea on when live notifications can be introduced?

    #32689
    @style960

    @michael Just to clarify – I see the problem with the notifications counter on this site when the notification refers to a mention. The counter doesn’t clear first time as it should – whether you select the notification itself from the toolbar, or mark the notification as read.

Viewing 15 posts - 1 through 15 (of 32 total)
  • The question ‘The menstions tab on buddyboss wall’ is closed to new replies.