Home Forums WTI Like Post PRO Need Help with ajax.php and Buddypress

This topic contains 0 replies, has 1 voice, and was last updated by  D 2 years, 2 months ago.

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #372

    D
    Participant

    I need some assistance. This code does work but the View links on user Buddypress Activity pages are dead. The end result is PAGE NOT FOUND. The URL http://WWW.Domain.com/activity/p/

    // New code
    $my_cat_ids = array( 7,17,18,20,23,21,22,19,4,24,25,26,27,28,29,30,6,31,32,33,34,35,36 );
    $category_ids = wp_get_post_categories( $post_id );
    $match_array = array_intersect( $my_cat_ids, $category_ids );

    if ( ( $bp_like_activity == 1 || $bp_like_activity == 3 ) && $task == ‘like’ ) {
    if ( !empty( $match_array ) ) {
    // Matching category
    $activity_action = sprintf( __( ‘%s loved Pancakes in the morning %s’, ‘wti-like-post’ ), $from_user_link, $post_link );
    WtiLikePostAddBpActivity( $user_id, $activity_action, $primary_link, bp_core_get_user_displayname( bp_loggedin_user_id() ) . ‘ ‘ . __( ‘loved Pancakes in the morning’, ‘wti-like-post’ ) . ‘ ‘ . $post_link );
    } else {
    $activity_action = sprintf( __( ‘%s liked %s’, ‘wti-like-post’ ), $from_user_link, $post_link );
    WtiLikePostAddBpActivity( $user_id, $activity_action, $primary_link, __( ‘liked’, ‘wti-like-post’ ) . ‘ ‘ . $post_link );
    }
    } elseif ( ( $bp_like_activity == 2 || $bp_like_activity == 3 ) && $task == ‘unlike’ ) {
    if ( !empty( $match_array ) ) {
    // Matching category
    $activity_action = sprintf( __( ‘%s hated Pancakes in the morning %s’, ‘wti-like-post’ ), $from_user_link, $post_link );
    WtiLikePostAddBpActivity( $user_id, $activity_action, $primary_link, bp_core_get_user_displayname( bp_loggedin_user_id() ) . ‘ ‘ . __( ‘hated Pancakes in the morning’, ‘wti-like-post’ ) . ‘ ‘ . $post_link );
    } else {
    $activity_action = sprintf( __( ‘%s disliked %s’, ‘wti-like-post’ ), $from_user_link, $post_link );
    WtiLikePostAddBpActivity( $user_id, $activity_action, $primary_link, __( ‘disliked’, ‘wti-like-post’ ) . ‘ ‘ . $post_link );
    }
    }
    // New code ends

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.