Reply To: help with default activity stream tab
@danbp
hi.
1 – first of all i have to thank you for your time, and complete explanation on this. i’m so grateful for that.
———
2 – second, i have to apologize for my limited knowledge.
i am at the beginning and still learning about php, DB, wordpress, and bp.
so sorry if i had mistakes in codes.
———
3 – third, i have to say that:
i was not aware of this, that the usage of components are not the same. just like the example you said about buddy nav bar.
in this code (which was not working) :
<?php
if ( !defined( 'BP_DEFAULT_COMPONENT' ) ) {
if ( bp_is_active( 'activity' ) && isset( $bp->pages->activity ) )
$bp->default_component = 'mentions' ;
}
?>
my logic was : if ( !defined( 'BP_DEFAULT_COMPONENT' ) ) i use this code to understand if it’s a component or not.
then after with this bp_is_active( 'activity' ) it will be checked , if it’s activity or not
and with this isset( $bp->pages->activity ) to check if activity is to check whether activity is set or not.
and if all true, then set and define a new nav default tab to mentions with this $bp->default_component = 'mentions'
but it seems that my logic/codes are wrong from the start 🙁
———
or for this code that i tried, and also went wrong:
<?php define( 'BP_ACTIVITY_DEFAULT_EXTENSION', 'mentions' ); ?>
my logic was, the <?php define( 'BP_ACTIVITY_DEFAULT_EXTENSION' part will force the bp, to set the default landing tab to activity.
and with the second part , 'mentions' ); ?> it will force the Activity component to load on mentions sub-nav item.
———
4 – i have to thank you for the group example. i didn’t know that set such a thing is possible.
it was clear . i read it. and i’m trying to learn more about it.
at last , i have to thank you again for the clear explanations.