BuddyDev

Search

[Resolved] Extra notification created rtMedia photo comment using comment notifier plugin

  • Participant
    Level: Initiated
    Posts: 3
    Mark on #2237

    Hi Brajesh,

    Just noticed you released an update to the activity notifier plugin today! Does the ac_notifier_skip_notification filter that you added give me the ability to prevent the duplicate notification for comments on rtMedia photo uploads? If so, how can I utilize it? Unfortunately I’m not a coder so I can’t figure it out on my own.

    I inquired about this awhile back on the WordPress support page. Basically when this plugin is activated and a person comments on an rtMedia uploaded photo in the activity stream, your plugin creates an additional notification labeled “user commented on your post”. with your plugin disabled just the default “user commented on your photo” shows up.

    Best Regards,

    mark

  • Keymaster
    (BuddyDev Team)
    Posts: 24593
    Brajesh Singh on #2239

    Hi Mark,
    Welcome to BuddyDev forums.

    I specifically added that filter for your requirement. I am sorry, I was not able to help there in time.

    Can you please put this code in your bp-custom.php and see if it works

    
    add_filter( 'ac_notifier_skip_notification', 'bp_ac_custom_exclude_rtmedia_activity', 10, 2 );
    
    function bp_ac_custom_exclude_rtmedia_activity( $exclude, $activity ) {
    	
    	if ( ! empty( $activity ) && $activity->type =='bp_album_picture' ) {
    		return true;
    	}
    	
    	return $exclude;
    }
    

    I am not familiar with what activity type RTMedia uses but a quick looks shows ‘bp_album_picture’. So, That code should work.

    Please try and let me know.

    Thank you
    Brajesh

  • Participant
    Level: Initiated
    Posts: 3
    Mark on #2240

    Hi Brajesh,

    Thank you for all your help! Unfortunately this did not work. I do not believe that type is correct. Where do you recommend I start looking to find the appropriate type? Will it be in the database? If so, do you know what table I should explore? If not the database, any other recommendations where I should look for the appropriate value?

    Best Regards,

    Mark

  • Keymaster
    (BuddyDev Team)
    Posts: 24593
    Brajesh Singh on #2241

    Hi Mark,
    It should be in the activity table ( type column) . Please let me know if you can find it quickly or I will install RT Media and check.

    • This reply was modified 8 years, 10 months ago by Brajesh Singh.
  • Participant
    Level: Initiated
    Posts: 3
    Mark on #2243

    Brajesh, you are talented my friend!!! “rtmedia_update” is the value I found and it appears to work. I only receive notification that a photo was commented on now instead of the photo and post for the same thing. Really appreciate your help and contributions to the Buddypress community. I will recommend you guys to everyone I know and plan on using some of your premium plugins in the near future. Thanks again!

    mark

  • Keymaster
    (BuddyDev Team)
    Posts: 24593
    Brajesh Singh on #2244

    Hi Mark,
    Thank you for the kind words.
    I am glad I was able to assist.

    Have a great time building sites with BuddyPres 🙂

  • Participant
    Level: Initiated
    Posts: 3
    Mark on #2245

    Thank you!! 🙂 Have a great day!

The topic ‘ [Resolved] Extra notification created rtMedia photo comment using comment notifier plugin’ is closed to new replies.

This topic is: resolved