• Carin

    (@sparksfreebies)


    Hi! Awesome plugin, just what I needed, but I absolutely need it to go on Group list page, I saw a post earlier you replied to another person on what to add, I tried adding that to functions.php, the global part you added and the part they mentioned, but got nothing. Can you please show me what to add to functions.php (or perhaps it is a different file and that’s why I failed)? to force star rating into Member List view? Thanks so much!!

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter Carin

    (@sparksfreebies)

    I am reading codex, and realized it is more likely to be placed in template/buddypress/groups/single/members.php. Am I getting closer?

    Plugin Author wordplus

    (@wordplus)

    Hi there!

    You should hook it with some type of buddypress hook.

    Do you know what im talking about?

    Thread Starter Carin

    (@sparksfreebies)

    Yes, I understand hooks in a very rudimentary way, it seems like bp_group_members_list_item is the hook to add an item to the Group Member’s Listing, so something like this?, Thanks in advance for any help you can give!!
    add to bp-custom.php:
    function add_stars() {
    if ( bp_is_active( ‘xprofile’ ) )

    if ( $member_type = xprofile_get_field_data( ‘Member Type’, bp_get_member_user_id() ) ) :
    echo global $BP_Member_Reviews;
    $BP_Member_Reviews->embed_rating( bp_get_member_user_id() )

    endif;
    }
    add_action( ‘bp_group_members_list_item’, ‘add_stars’ );

    Thread Starter Carin

    (@sparksfreebies)

    For anyone trying this, I added the following to bp-custom.php and got the stars on the Group List, I would like them next to the name not under it, but this is a start!!

    `add_action( ‘bp_group_members_list_item’, ’ember_rating_group’ );
    function ember_rating_group(){
    global $BP_Member_Reviews;
    $BP_Member_Reviews->embed_rating( bp_get_member_user_id() );
    }’

    Plugin Author wordplus

    (@wordplus)

    Looks like nobody can stop you from reaching the target ??
    Let me help you.

    Try this, but notice that I didnt tested the code, i just wrote it here:

    add_filter('bp_get_group_member_link', 'ember_rating_group');
    
    function ember_rating_group($link){
    global $BP_Member_Reviews;
    $link .= $BP_Member_Reviews->embed_rating( bp_get_member_user_id() );
    return $link;
    }
    Thread Starter Carin

    (@sparksfreebies)

    purrrfect! Thanks (me purring)

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Add to Group List for Dummies’ is closed to new replies.