BuddyBoss Home – Web Support Forums General BuddyPress (general issues) Help with a bbpress addon plugin

Tagged: ,

Viewing 1 post (of 1 total)
  • Question

    #36133
    @milena

    hello friends,

    I am using this add on plugin to bbpress – https://wordpress.org/plugins/bbpress-like-button/,
    which adds a nice option to like a bbpress topic. It also adds an option to display that somebody liked a topic in the activity (speaking of increasing site participation.. @style960 :-))

    the problem is the plugin uses the user login name and not the user real name – (the one without the @handle that buddyboss uses) in the activity stream, and that doesn’t look so good – that there are different names of the same users on the activity.

    I found this code in the plugin’s php

      //Placeholders replacement
                    $placeholders = array(
                        'USERNAME' => '<a href="'.bbp_get_user_profile_url($user_id).'" title="'.$user_info->user_nicename.'">'.$user_info->user_nicename .'</a>',
                        'TOPIC'    => '<a href="'.trailingslashit(get_post_permalink($topic_id)).'#post-'.$post_id.'" title="'.get_the_title($topic_id).'">'.get_the_title($topic_id).'</a>',
                        'FORUM'    => '<a href="'.get_post_permalink($forum_id).'" title="'.get_the_title($forum_id).'">'.get_the_title($forum_id).'</a>'
                    );
                    $action = $this->settings['settingsbbpl_bbpl_labels_label_like_button_buddypress'];
                    foreach($placeholders as $key => $value){
                        $action = str_replace('%%'.strtoupper($key).'%%', $value, $action);
                    }

    I think I need to replace this part
    'USERNAME' => '<a href="'.bbp_get_user_profile_url($user_id).'" title="'.$user_info->user_nicename.'">'.$user_info->user_nicename .'</a>',

    with something like buddyboss uses-

    
    $user_liked_html = '<a href="'.esc_url( $user['profile'] ).'" title="'.esc_attr( $user['name'] ).'">'.esc_html( $user['name'] ).'</a>';

    but adding this code instead of the one above did not work.

    I know its a long shot, but does anyone know how to do this? Any help is very appreciated!

    Also this- the number of people who liked the topic is shown like this (3) , I was not able to find how to remove the () from it (I styled it to look like buddypress/buddyboss likes). They don’t have an element, and I could find them in the code..
    Does anybody know how would they be coded? what to look for?

    thank you.

Viewing 1 post (of 1 total)
  • The question ‘Help with a bbpress addon plugin’ is closed to new replies.