Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 10 replies - 1 through 10 (of 10 total)

  • MonkimoE
    Participant

    @monkimoe

    Hi Rosyteddy,
    I got it now. Thank you for guide me there.

    However I resolve this by edit the core of buddypress.

    bp-core-template.php – line 2105
    bp-groups-loader.php – line 473
    groups/single/home.php – search this:

    // Otherwise show members
    elseif ( bp_is_active( 'members'  ) ) : bp_get_template_part( 'groups/single/members'  );

    Changing word ‘members’ to ‘fans’ in those 3 files will give you new url:
    yourdomain.com/groups/group-name/fans/

    Ok. It’s works!
    Note: I still don’t know what effect will have.

    Thank you.


    MonkimoE
    Participant

    @monkimoe

    I already test on new wp + bp install.
    These code not work! 🙁

    // MODIFY GROUP NAME TABS
    $bp->bp_options_nav['groups']['home']['name'] = 'Group Activity'; //NOT WORK
    $bp->bp_nav['groups']['home']['name'] = 'Member Activity 2'; //NOT WORK
    
    //REMOVE SPECIFIC GROUP TAB
    bp_core_remove_subnav_item($bp->groups->slug, 'send-invites');

    taken from: http://wordpress.stackexchange.com/questions/14469/remove-tabs-from-buddypress-groups-and-members-pages >> It’s not work anymore in latest BP 2.2.1

    I’m using latest WordPress 4.1.1 and latest Buddypress 2.2.1
    So.. how to exactly modified Group Tabs in single group page?

    anybody? Please help. stuck in 3 days for this.
    Thank you.


    MonkimoE
    Participant

    @monkimoe

    Hi.. thank you to keep guiding me.
    I don’t know why those code for single groups page doesn’t working in my site.

    Then I tried to modify nav tab in single members page those can working good.
    This what I have in bp-custom.php:

    <?php
    function edit_tabs_options() {
        global $bp;
    // MODIFY GROUP TABS
    $bp->bp_options_nav['groups']['home']['name'] = 'Group Activity'; //NOT WORK
    $bp->bp_nav['groups']['home']['name'] = 'Member Activity 2'; //NOT WORK
    
    //MODIFY MEMBERS TABS
    $bp->bp_nav['home']['name'] = 'Member Activity'; //IT'S WORK
    bp_core_remove_nav_item( 'forums' ); //IT'S WORK
    bp_core_remove_subnav_item( 'profile', 'change-avatar' ); //IT'S WORK
    
    }
    add_action( 'bp_setup_nav', 'edit_tabs_options' );
    ?>

    Last try on fresh install wp + bp with default theme. I will let you know if those code works or not.


    MonkimoE
    Participant

    @monkimoe

    Hi, Thanks for the guide.
    Looks like the code only change the tabs name, not change the URL I wanted.

    —-
    I found what I need in core files:
    wp-content/plugins/buddypress/bp-groups/bp-groups-loader.php
    line 471 – 481

    $sub_nav[] = array(
    'name'            => sprintf( _x( 'Members <span>%s</span>', 'My Group screen nav', 'buddypress' ), number_format( $this->current_group->total_member_count ) ),
    'slug'            => 'members', //THIS IS THE ONE
    'parent_url'      => $group_link,
    'parent_slug'     => $this->current_group->slug,
    'screen_function' => 'groups_screen_group_members',
    'position'        => 60,
    'user_has_access' => $this->current_group->user_has_access,
    'item_css_id'     => 'members',
    'no_access_url'   => $group_link,
    );

    I change the ‘slug’ => ‘fans’,
    It’s works changing the url from group-name/members to group-name/fans
    but the page can’t find any fans (members) even it has.

    well..still trying now..


    MonkimoE
    Participant

    @monkimoe

    define ( ‘BP_FRIENDS_SLUG’, ‘friend’ ); is for friend of members.
    mydomain.com/members/username/friend >> produce list all friends of member.
    it is members have friend.

    Groups have members.
    This is what I need to change.


    MonkimoE
    Participant

    @monkimoe

    I’m renaming the members tab to fans by language .po file
    I’m affraid there’s no easy way to change this..? >.<

    I found complete list of SLUG:

    Changing Internal Configuration Settings

    but none of them to edit Group Members SLUG.. 🙁 or is this bug?


    MonkimoE
    Participant

    @monkimoe

    Ah.. I see..

    BP_MEMBERS_SLUG is works for members main url, something like this:
    mydomain.com/members/ ..
    to
    mydomain.com/fans/ ..

    Ok. once again, what I want to change is in Group tabs.
    mydomain.com/group/group-name/fans

    What SLUG i must define to change that?
    All I can found only these:

    BP_ACTIVITY_SLUG
    BP_BLOGS_SLUG
    BP_MEMBERS_SLUG
    BP_FRIENDS_SLUG
    BP_GROUPS_SLUG
    BP_FORUMS_SLUG
    BP_MESSAGES_SLUG
    BP_WIRE_SLUG
    BP_XPROFILE_SLUG
    BP_REGISTER_SLUG
    BP_ACTIVATION_SLUG
    BP_SEARCH_SLUG
    BP_HOME_BLOG_SLUG


    MonkimoE
    Participant

    @monkimoe

    I test with
    define ( 'BP_GROUPS_SLUG', 'band' );
    it’s work.

    BP_MEMBERS_SLUG is not work.


    MonkimoE
    Participant

    @monkimoe

    Yes, I already notice that.
    I use sublime editor so it’s looks the difference colour when something is not right.

    I’m afraid my bp-custom.php not loaded. even I put in folder wp-content/plugins/
    Is there any simple code to making sure the bp-custom.php is loaded first?

    Thank you for your help. really appreciate it…


    MonkimoE
    Participant

    @monkimoe

    Hi, I already try that with different browser, also clear my browser cache.
    But still not working.

    Is that a correct code in bp-custom.php to achieve what I need?

    Thank you.

Viewing 10 replies - 1 through 10 (of 10 total)
Skip to toolbar