Skip to:
Content
Pages
Categories
Search
Top
Bottom

Need help updating a function for BP1.3

  • Avatar of pcwriter
    pcwriter
    Participant

    @pcwriter

    The following function works well in functions.php for a BP1.2.7 theme I’m developing, but I need a bit of help updating it for BP1.3
    The function redirects users to “Group > Forums” as the “landing page” in groups instead of “Group > Home”.

    `function redirect_to_forum() {
    global $bp;
    $path = clean_url( $_SERVER );
    $path = apply_filters( ‘bp_uri’, $path );
    if ( bp_is_group_home() && strpos( $path, $bp->bp_options_nav ) === false )
    bp_core_redirect( $path . $bp->bp_options_nav . ‘/’ );
    }
    add_action( ‘wp’, ‘redirect_to_forum’ );`

    From what I’ve read on this page, slugs need to be changed, but I’m not sure how to do it.
    http://bpdevel.wordpress.com/2011/01/18/component-slug-vs-root_slug-in-bp-1-3/

    I’ve got trunk(3727) installed on a test site and most things are working well (aside from a few glitches with the adminbar and forums).

    Can anyone clue me in on how to update this function?

Viewing 3 replies - 1 through 3 (of 3 total)
  • It might work, but it’s a really ugly hack :)

    To sidestep answering your question, i’ll have a look sometime about a default groups page setting. Is there a ticket for this idea anywhere?

    Avatar of pcwriter
    pcwriter
    Participant

    @pcwriter

    @djpaul

    Well, you answered this one:
    http://trac.buddypress.org/ticket/3007

    Have you thought of a different tack?

    That was to do with setting the members component default page in functions.php, nothing to do with a default page for a group. I was going to look at this then JJJ started his big refactoring, so I can’t do this until that work is finished and I’ve understood what the changes are.

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

The topic ‘Need help updating a function for BP1.3’ is closed to new replies.