Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

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

  • heini
    Participant

    @heini

    thanks for your feedback. Actually I already tried it, but I get exactly the same error.
    “$bp->bp_options_nav” AND “$bp->bp_options_nav” are always empty/false. :(


    heini
    Participant

    @heini

    thanks ray, but sadly it doesn’t work

    I located the error, but don’t know how to fix it.
    The arrays “$bp->bp_options_nav” AND “$bp->bp_options_nav” are always empty/false.

    But maybe I made a mistake at some place, so I would like to describe how I did it.

    I created a new empty file custom.php (deleted the old one) and I insert your code to this file
    http://pastebin.com/j3n17CVe

    After this I uploaded it to wp-content/plugins. Thats all.


    heini
    Participant

    @heini

    It worked fine until the last Buddypress Update. When Ih go in a group now, I will be redirected to the mainpage. I already updated the older function in the custom.php with the new one, sadly it doesn’t work.
    Anyone knows what to do?


    heini
    Participant

    @heini

    It works :D

    Thanks a lot for this great explanation.

    Looking forward to read your article in your blog.


    heini
    Participant

    @heini

    I also tried it with “plugins”, but sadly there is excaktly the same error :(

    Here is the file I used:

    http://pnex.de/bp-custom.php.txt

    Really don’t know why it isn’t working :(


    heini
    Participant

    @heini

    I did it exactly like this.

    I insert the following code into the file bp-custom.php and uploaded it to mu-plugins

    <php

    function my_groups_setup_nav() {

    [the whole function code]

    }

    remove_action('bp_setup_nav', 'groups_setup_nav');

    add_action( 'bp_setup_nav', 'my_groups_setup_nav' );

    ?>

    I even didn’t make any changes at the code, so it’s for 100% the same function code like in the core. But anyway there are coming now some errors. When I go to the group page the first page is the same like always (regardless of what I do at the new function) but I can’t go to another page of the group anymore. It will always show only the start page.


    heini
    Participant

    @heini

    I really don’t know what to do. With the method from @3sixty I can overwrite parts of the function, but not all.

    When I use the same code which works at the core code, it won’t work anymore as a plugin :(


    heini
    Participant

    @heini

    @3sixty

    you are right, thats the function. I will try to work with it a while. At the moment I get only a white blank page ;(

    Have to try a bit more ;)

    @Boone Gorges

    This way definitely works, sadly it has the side effect that you wont be able to see the activity stream in the group anymore. Maybe I find a solution for this.


    heini
    Participant

    @heini

    thanks for the statement, but my problem is, that I don’t know how to overwrite the function.

    I’ve inserted the file bp-custom.php with the following code:

    bp_core_new_nav_default( array( 'parent_slug' => $bp->groups->slug, 'screen_function' => 'groups_screen_group_home', 'subnav_slug' => 'forum' ) );

    But that i get the following error message:

    Fatal error: Call to undefined function bp_core_new_nav_default() in /home/www/wp-content/mu-plugins/bp-custom.php on line 3

    Hope anyone can help me.

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