BuddyDev

Search

[Resolved] Mediapress Likes (again)

  • Participant
    Level: Master
    Posts: 279
    NikB on #50338

    Hi Brajesh

    I’ve been successfully using WP ULike to allow members to like Mediapress posts for several years now but since updating both the site (to BP Nouveau) and the WP Ulike plugin recently, nothing is working as it should eg. “Like” button is no longer appearing in the lightbox and activity entries are no longer being created when a user likes something.

    Before I try to delve into why this might be happening, just wondering if a simpler option might be to allow users to “Favorite” a Mediapress post instead ie. using the native BuddyPress “Favorites” feature. How easy would it be to add a “Favorite” button to the Mediapress lightbox (in particular)?

    With many thanks in advance.
    Nik

  • Keymaster
    (BuddyDev Team)
    Posts: 24237
    Brajesh Singh on #50367

    Hi Nik,
    Thank you for using MediaPress.

    BuddyPress does not have any generic favourite API. There is way to re-use it other than re-implementing it.

    For the time being, I will suggest keeping WPUlike.
    If you found the conflict, Please let us know and we can look into it.

    Regards
    Brajesh

  • Participant
    Level: Master
    Posts: 279
    NikB on #50373

    Hi Brajesh

    Thank you for getting back to me.

    “BuddyPress does not have any generic favourite API. There is way to re-use it other than re-implementing it.”

    Surely BuddyPress allows users to favourite/like activity entries? Even MediaPress has the bp_activity_favorite_link function in the entry.php template? Of course, there may be good reasons why this wouldn’t work as a solution for “favouriting/liking” MediaPress uploads but surely you would agree it does exist?

    “For the time being, I will suggest keeping WPUlike.”

    Assuming this is the better solution, for now I am still using the solution as shown here – https://buddydev.com/mediapress-like-unlike-button-for-photos-videos-etc-with-wp-ulike-plugin/ but the like button doesn’t appear either in the lightbox nor on the single media page. I’m using the latest versions of MediaPress, WP ULike and BuddyPress. I’ve tried changing themes, I’ve tried switching to Legacy instead of Nouveau but nothing makes any difference.

    I’m really not sure what to try next. Any suggestions would be very much appreciated.

    With many thanks in advance.

  • Keymaster
    (BuddyDev Team)
    Posts: 24237
    Brajesh Singh on #50376

    Hi Nik,
    I incorrectly types that line

    
    There is way to re-use it other than re-implementing it.
    

    It was

    
    There is no way to re-use it other than re-implementing it.
    

    The favorite is attached to activity not media items. That’s why.

    I don’t have much to offer currently but there are things coming around Nov that would change the current pain points forever.

    Regards
    Brajesh

  • Participant
    Level: Master
    Posts: 279
    NikB on #50378

    Hi Brajesh

    Ah OK… that does make more sense now. Of course, you can also favourite/like bbPress topics (albeit not replies) but I’m now starting to wonder if that’s controlled completely separately from BuddyPress activity likes…

    The annoying thing is that the site I’m working on updating is very focused on members sharing their photos and implementing SOME way for other members to react to them is a really critical functionality of the whole site!

    It’s great to hear there might be something in the future that will improve the situation but for now I guess I’ll just have to dig into WPULike a bit more and see if I can figure out why it’s stopped working with MediaPress.

    With many thanks for your insight as always.

    Regards
    Nik

  • Keymaster
    (BuddyDev Team)
    Posts: 24237
    Brajesh Singh on #50381

    Hi Nik,
    Thank you.
    I hope it goes well.

    Regards
    Brajesh

  • Participant
    Level: Master
    Posts: 279
    NikB on #50383

    Well… it actually proved to be much easier than expected and don’t know why I didn’t think of it before.

    Just in case anyone else comes across this thread with the same problem, I just substituted the wp_ulike_put_posts function in your code for a shortcode instead and everything (so far) seems to be working perfectly (including creating an activity entry and syncing likes between the lightbox and the single media page) eg.

    function mpp_wpulike_show_button() {
        
    if( function_exists( 'wp_ulike_put_posts' ) ) {
            // echo wp_ulike_put_posts('');
     	echo do_shortcode("[wp_ulike]"); 
     }
        
    }

    Regards
    Nik

  • Keymaster
    (BuddyDev Team)
    Posts: 24237
    Brajesh Singh on #50387

    Thank you Nik.
    I am glad you found the solution. Also, I appreciate you sharing the code.

    Regards
    Brajesh

The topic ‘ [Resolved] Mediapress Likes (again)’ is closed to new replies.

This topic is: resolved