• Resolved ashton1993

    (@ashton1993)


    Ok, here’s my in development site, pixelsgame.org, the vast majority of the content will exist in the group forums when the website launches so obviously I want to optimize the path to this content as quickly as possible, at the moment when you click a group you end up on an activity feed and from there have to go to the forum, by default I want to go straight to the forum, I found this link which describes exactly what I want to do in this section “2. Set the forum nav item as the default nav item in groups” however when implemented it doesn’t seem to work, my first thoughts were that the $path . $bp->bp_options_nav was bieng misused/was outdated so I tried a quick debug by adding this line to my header:

    global $bp; <?php echo($path . $bp->bp_options_nav['groups']['forum']['slug'] . ’/');?>

    Sure enough it only returned “/”, I checked this out but not sure what to do now and hope you could help, thanks for reading 🙂

Viewing 3 replies - 1 through 3 (of 3 total)
  • Matt

    (@mhuntdesign)

    ashton1993, Looks like you got this working on your dev site. Can you share with us how you were able to get the code working? I am also having the same issue with the code at http://themekraft.com/customize-profile-and-group-menus-in-buddypress/

    Thanks!

    Thread Starter ashton1993

    (@ashton1993)

    Yeah, sure thing, basically I got pooped out with using bp-custom.php to modify the properties of Buddypress externally so I figured it’d be hard-coded in somewhere and I could hack it easily enough which turned out to be much easier, anyway, download the plugin and then open the file Buddypress->bp-groups->bp-groups-loader.php the region your interested in is lines 265-359 which defines the menu in a pretty straightforwards way, on line 275 change 'default_subnav_slug' => 'home', to 'default_subnav_slug' => 'forum', if you want to play arround with the other values each menu item is set out like this:

    if ( $this->current_group->enable_forum && bp_is_active( 'forums' ) ) {
    $sub_nav[] = array(
    'name'            => __( 'Forum', 'buddypress' ),
    'slug'            => 'forum',
    'parent_url'      => $group_link,
    'parent_slug'     => $this->current_group->slug,
    'screen_function' => 'groups_screen_group_forum',
    'position'        => 40,
    'user_has_access' => $this->current_group->user_has_access,
    'item_css_id'     => 'forums'
    );
    }

    All you probably want to change is name which is just how it shows on the navigation, slug which is what it looks like in the URL and position which is just the order on the menu and I don’t reckon you’ll have any problem with that, upload it again and it’ll work like a charm, hope that helps.

    P.S: I’m using Buddypress 1.54

    ndayakar

    (@ndayakar)

    Thank you @ashton1993 for the solution.

    It works fine with BuddyPress v1.5.5.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Buddypress groups optimization’ is closed to new replies.