How to display picture in activity when someone likes or commet it?


#1

Hi there! Love rtmedia plugin!!! I need to show the picture in activity when someone likes, comments, etc… I really need this and can pay for it. Is it posible? Please help!!!


#2

Hello @Ignacio_Duran_Sanz,

You can enable below options from BuddyPress tab under rtMedia admin settings:

  • Create activity for media likes
  • Create activity for media comments

I hope this will help you.

Thank you.


#3

Hi Pranali, love your help too, but I have those options checked and see likes in the activity, but can’t see the picture they like, I really need that option. Could I purchase it? is there any addon that can do that? Thanks in advanced. :slight_smile:


#4

Hi @Ignacio_Duran_Sanz,

We have not released this feature yet. However, I have added this to our feature request list for future updates.

Thank you.


#5

Hi Pranali, me here again. :slight_smile: My developer help me with the code to make what I need:

  • Show picture in timeline when someone likes it
  • Show picture in timeline when someone comment it

The first option was easy because you have a hook to do that (that hook is not in the documentation, but my developer found it in the code).

For the second option (comment) it was more difficult and we need to edit one of your templates, hope you make a hook for that too, so we only need to use our functions.php.

The code in functions.php is:

`// ADDING PICTURES TO ACTIVITY WHEN SOMEONE LIKES IT

function rtm_bp_like_activity_action_insert_thumbnail_photo($action, $media_id, $user_id ) {

$activity = new RTMediaActivity( $media_id );
$action .= $activity->create_activity_html();
return $action;

}

add_filter(‘rtm_bp_like_activity_action’, ‘rtm_bp_like_activity_action_insert_thumbnail_photo’, 10, 3);

// ADDING PICTURES TO ACTIVITY WHEN SOMEONE COMMENT IT add_filter(‘rtm_bp_comment_activity_action’, ‘rtm_bp_like_activity_action_insert_thumbnail_photo’, 10, 3); `

To show the picture in activity when comment you must edit:

/wp-content/plugins/buddypress-media/app/main/controllers/activity/RTMediaBuddyPressActivity.php on line 621 and add this one:

$action = apply_filters( ‘rtm_bp_comment_activity_action’, $action, $media_id, $user_id );

Hope it is usefull for someone like me. :wink:


Rtmedia In Activity Stream Wordpress
#6

Thank you @Ignacio_Duran_Sanz, your fix worked for me! Excellent work!

On a related note, I wonder if it would be possible to add the like button with the like count for pictures to the activity post instead of it just being available in the lightbox? This would be a great improvement on an already excellent plugin!

Thanks again!


#7

Hello @Ignacio_Duran_Sanz,

Thank you for your contribution to the community.

I will definitely ask the team to add a filter for the activity of media comment.

Hello @Simon_Matthews,

We will discuss with the team if we can provide this as a feature.

You can also add your ideas at this link - https://rtmedia.io/idea/ This way we can collect ideas from different users to add them in our future roadmap.

Thank you.


#8

Thanks!


#9

Hello @Ignacio_Duran_Sanz,

I have just noticed that your fix may have highlighted a new issue. If you click on one of the pictures that is added to the activity when someone likes or comments on it and then click on the left or right navigation arrows, several strange glitches occur, such as a double scroll bar appears and more strange things happen on the screen.

Please let me know if you can duplicate this issue.

Thanks


#10

Sorry, I can’t duplicate the issue… wich theme are you using? I use Kleo theme and cant reproduce the problem. Could you tell me the steps in detail to reproduce that problem?


#11

Hello @Ignacio_Duran_Sanz,

The theme I am using is BeTheme. You can check the issue at the following link:

http://www.skewen-angling.co.uk/activity/

Click on the black and white photo at the top of the activity page and then click on the right arrow.


#12

I dont see any error, using the black and white photo at the top, the only problem I see is that it dont charge any other photo, it reload the home again, but if I click on a photo below it all is ok.


#13

Hello @Ignacio_Duran_Sanz,

For me it is loading the group home page, which is not where I originated (sitewide activity), plus there is a double scroll bar and also it displays ‘load newest’ on the page and sometimes duplicates the topmost post. If this is not happening for you it is perhaps a theme issue. BeTheme is pretty bad for compatibility issues, I am finding out the hard way.

I am currently moving photos from one album to another so you may not be able to re-check the issue on my website at present.

Thanks for your help though, your coding has helped make my website work better!


#14

Thank you this worked like a charm


#15