I am building something off that example component and there are a number of things that are wrong. I haven’t had time to patch those up.
@DJPaul,
Thanks for the response. After digging a bit in the bp core code, I can see the similarities/differences with the component. I’ll play around with making the component more like the groups component (best fits my needs) and see if that works.
There seems to be a consistent structure to each of the BP components. It would be good if someone banged out a one-pager that explains that structure and how it works to generate/display content. I’m sure someone else out there has figured it out (that’s you plugin developers) who could enlighten us noobs.
I appreciate your investment of time.
I have this same issue, I almost finished my component with the skeleton 1.3 but after the official release of bp 1.2 decided to wait for the next version of the component, now trying to migrate to the new structure and have more issues than before, I will try what @designodyssey is doing looking into the other official components as I did before.
@designodyssey,
I just added these lines to my bp-example-core.php:
function bp_example_setup_root_component() {
/* Register ‘example’ as a root component */
bp_core_add_root_component( BP_EXAMPLE_SLUG );
}
add_action( ‘wp’, ‘bp_example_setup_root_component’, 2 );
function bp_example_directory_setup() {
global $bp;
if ( $bp->current_component == $bp->example->slug && empty( $bp->current_action ) && empty( $bp->current_item ) ) {
do_action( ‘bp_example_directory_setup’ );
bp_core_load_template( apply_filters( ‘bp_example_template_index’, ‘example/index’ ) );
}
}
add_action( ‘wp’, ‘bp_example_directory_setup’, 2 );
That worked for me.