BuddyDev

Search

BuddyPress Activity Comment Notifier

  • Participant
    Level: Master
    Posts: 151
    NikB on #14947

    Hi there

    I’ve just installed Mediapress and then installed BuddyPress Activity Comment Notifier as users didn’t seem to be receiving notifications re. comments on mediapress items but nothing seems to be happening! I expected that notifications would automatically appear in the Buddypress “Notifications” which I’ve already added to the top menu but this doesn’t appear to be the case. Am I missing something?

    Also, I’ve seen reference to code which will also allow email notifications to be sent out. Can you possibly point me in the right direction to this? (Note: this is for individual updates not group updates.)

    And does BuddyPress Activity Comment Notifier only handle Mediapress comments? (All other notifications/emails are working fine with the standard Buddypress notification system so I’m a little confused why I need to add a different plug-in just for Mediapress.)

    With so many thanks in advance.

  • Participant
    Level: Master
    Posts: 151
    NikB on #14948

    PS. Not sure if this related or a completely different issue, but I’ve noticed that although comments appear in the Activity Stream, they don’t appear in the lightbox or on the media page itself.

    Maybe this is a settings issue but definitely seems very odd…

  • Keymaster
    (BuddyDev Team)
    Posts: 21833
    Brajesh Singh on #14949

    Hi NikB,

    1. Activity comment Notifier is not needed for MediaPress

    2. Activity Comment notifier originally added reply/comment notification. BuddyPress added the reply notification later. In the current state, BuddyPress does not notify all involved people on an activity if there are more than 2 people involved. This plugin does it.

    You will need it if you want to have a notification like facebook where you notify things like “X and 5 members also commnted on xyz”.

    For MediaPress Comments:- Do you mean commenting using lightbox or single media page? Sorry, The notification is not available for that. It is something I have missed. If you can wait till this thursday, I will have it in the core.

    Thank you
    Brajesh

  • Participant
    Level: Master
    Posts: 151
    NikB on #14950

    Hi Brajesh

    Thank you for getting back to me. From what you say, I can certainly live without the Activity Comment Notifier for now.

    > For MediaPress Comments:- Do you mean commenting using lightbox or single media page?

    Both have the same 2 issues ie.

    1. Comments do not appear after they’ve been posted eg. open lightbox (or single media page), comment on photo, close then re-open and no comments appear (although the comments are logged in the activity table and they do appear in the activity stream). Note: this also happens with TwentyTwelve theme so I’m really at a loss and it’s obviously a rather major issue…

    2. Regardless of where the comments are posted, no notifications appear in the menu nor are sent out as emails (and I definitely need both). If I understand correctly, this is the issue you hope to fix soon? (If you have a patch in the meantime, that would be great… otherwise can wait until Thursday if necessary 😉 )

    Thank you again and warm regards
    Nik

  • Participant
    Level: Master
    Posts: 151
    NikB on #14957

    Update on this… I’ve been testing commenting on images again and have found the following –

    1. User comments on an update (new image) in the activity stream
    Comment is shown in the activity stream, a BP notication appears and the image owner is sent an email BUT… the link in the email takes them to a page eg. mywebsite/members/nik/mediapress/my-new-one/#activity-345 which shows the image but no comment so have no way of knowing what was actually said.

    2. User comments in the light box or single media page
    Comment is shown in the activity stream but no notification or email is sent out, and more crucially, if anyone clicks on the lightbox again, the comment is no longer visible.

    I can live without the notifications/emails on 2 for a while (I assume that’s what you’re planning to fix) but being unable to see comments at all when viewing the lightbox or the gallery is really not good. As mentioned above, I’ve tried using the TwentySeventeen theme and even deactivating my bp_custom.php but doesn’t seem to make any difference.

    Any/all suggestions gratefully received.

    Warm regards
    Nik

  • Participant
    Level: Master
    Posts: 151
    NikB on #14958

    Agh… so sorry, the light has dawned! It was a conflict with rtMedia (which I had running while I was doing the conversion). Deactivated rtMedia and it’s all working as expected (apart from the notifications/emails).

    OK so… now I see what is supposed to happen more clearly, it does look a little untidy… is there a way of –

    a) preventing comments on comments in the lightbox?
    b) preventing users (apart from Admin) from deleting their comments in the lightbox?

    And finally, if I can just sneak another question in here…

    Is there a template for the site-wide gallery? I’d really like to tweak the layout a bit (and possibly add filter by user – although that might have to wait for now!)

    With many thanks again… I’m just wishing I found Mediapress sooner (but already so glad I switched).

    Warm regards
    Nik

  • Keymaster
    (BuddyDev Team)
    Posts: 21833
    Brajesh Singh on #14962

    Hi Nik,
    Thank you. I sincerely appreciate your kind words.

    yes, you are right about the notifications and I am hoping to add it now.

    Please use the code @ravisharma provided in another thread for the delete options.
    https://buddydev.com/support/forums/topic/prevent-user-from-deleting-their-activity/

    That will work for MediaPress too. It uses BuddyPress activity commenting.

    Yes, every thing is templatable. I just need to get a little bit of clarification.

    1. Are you using the Site wide gallery along with User/Groups gallery and want to have it customized.

    or it is the gallery directory or any shortcode etc? From your reply, It seems you want to modify the gallery directory layout?

    Thank you
    Brajesh

  • Participant
    Level: Master
    Posts: 151
    NikB on #14975

    Hi Brajesh

    > yes, you are right about the notifications and I am hoping to add it now.

    Fantastic. Will you please let me know as soon as that’s available?

    > Please use the code @ravisharma provided in another thread for the delete options.

    Thank you. I have to confess I’d overlooked that, and also didn’t realise it was sitewide, but that works perfectly.

    As mentioned above, is there anyway of preventing nested comments (ie. comments on comments), particularly in the lightbox, but in the activity stream/media pages too?

    > Are you using the Site wide gallery along with User/Groups gallery and want to have it customized.

    Currently I’m using the Buddypress “Gallery” page ie. created a page called “Photos”, set it as the Buddypress Gallery page and using what that generates automatically (ie. a list of all galleries from all users). Not sure if you’d call tht the site-wide gallery or the gallery directory? I did notice that there was also an option to have a Gallery archive, but it seemed that would probably duplicate what I’ve already achieved so wasn’t sure which was better.

    I did notice that the way I’ve done things seemed to require Privacy to be set to “Public” which isn’t ideal, but since I’m protecting the pages through other means (ie. Membership 2 plug-in), it isn’t a major issue anyway.

    I’m happy to use either a site-wide gallery, a gallery directory OR a shortcode depending on what is likely to be easiest and offer the most flexibility. My site doesn’t use Groups so all I really want is a page showing all galleries from all users. The theme I’m using (Kleo), has a really nice gallery layout which would be nice to use, but at this stage, being able to move the “Filter by” option and just knowing how the templating works would be helpful.

    In due course, I’d really like to add the option to filter by and/or order by date/user/title/category etc… but that can wait for now!

    With many thanks again for your help.
    Nik

  • Participant
    Level: Master
    Posts: 151
    NikB on #14981

    PS. I’ve just discovered how flexible the gallery shortcode is, so that’s fine for my purposes for now (although if there’s any documentation with regard to how templating works generally with Mediapress, that would be useful for future reference.)

    Main outstanding items… how to prevent nested comments, and those notifictions/emails 😉

    Warm regards
    Nik

  • Keymaster
    (BuddyDev Team)
    Posts: 21833
    Brajesh Singh on #14995

    Hi Nik,

    Thank you.

    The page is Gallery directory which is available when you use it with BuddyPress. It lists galleries with public/logged in visibility.

    1. For templateting:L- If you want to control the whole page layout etc, please create a page template and set it as the template for Gallery Directory page from Pages edit screen.

    To modify the loop/content, Please copy the

    
    
    plugins/mediapress/templates/mediapress/default/buddypress/gallery/directory/index.php 
    

    to

    
    
    Your theme or childtheme/mediapress/default/buddypress/gallery/directory/index.php
    
    

    and please feel free to modify it.

    I will work on documentation a lot more after we get 3 more features/enhancements(remote media, transcoding, and moving to another storage architecture). We will have these by 1.5 and then documentation will be my focus.

    For the activity comment part, Please use the following snippet.

    
    
    /**
     * Disable commenting on MediaPress activity.
     *
     * @param bool   $can_comment can comment?
     * @param string $activity_type activity type.
     *
     * @return bool
     */
    function mpp_custom_disable_activity_comment( $can_comment, $activity_type ) {
    	if ( 'mpp_media_upload' == $activity_type ) {
    		$can_comment = false;
    	}
    
    	return $can_comment;
    }
    add_filter( 'bp_activity_can_comment', 'mpp_custom_disable_activity_comment', 10, 2 );
    
    /**
     * Disable comment reply.
     *
     * @param bool                 $can_comment con comment?
     * @param BP_Activity_Activity $comment comment object.
     *
     * @return bool
     */
    function mpp_custom_disable_activity_comment_reply( $can_comment, $comment ) {
    
    	$activity = new BP_Activity_Activity( bp_get_activity_id() );
    	if ( $activity->id && 'mpp_media_upload' === $activity->type ) {
    		$can_comment = false;
    	}
    
    	return $can_comment;
    }
    
    add_filter( 'bp_activity_can_comment_reply', 'mpp_custom_disable_activity_comment_reply', 10, 2 );
    
    

    Regards
    Brajesh

You must be logged in to reply to this topic.

This topic is: not resolved