I’m 99% the group widgets were something that was never fully? implemented, or the logic in the templates have always been incorrect. I’m not sure what the intention with them was.
lol excellent answer! thanks Paul. that sort of explains why i couldnt make sense of them.
looking a bit closer, i see that:
in file: bp-groups-classes
class: BP_Group_Extension
function/method: _register
reads:
Code:
var $ display_hook = ‘ groups_custom_group_boxes ‘;
…
`if ( bp_is_group() ) {
if ( $ this->visibility == ‘public’ || ( $ this->visibility != ‘ public ‘ && $ bp->groups->current_group->user_has_access ) ) {`
…
// Hook the group home widget
if ( !bp_current_action() && bp_is_current_action( ‘ home ‘ ) )
add_action( $ this->display_hook, array( & $ this, ‘ widget_display ‘ ) );
}
}
…
– then in file bp-groups-template.php:
Code:
function bp_custom_group_boxes() {
do_action( ‘ groups_custom_group_boxes ‘ );
}
– which doesnt appeare to be called from anywhere in BP 1.6 (or its std theme)
– though does i suppose make the hook available (on group home only), were i to override the default template or call the theme/template func. bp_custom_group_boxes.
i cant think of a use for it yet either. but i’m sure i will.
thanks again
ps. code backquotes seem to be broken at the moment – thus i put spaces around $ signs etc above – hope its stil readable
Right, I can’t see how this will ever be true:
`if ( !bp_current_action() AND bp_is_current_action( ‘home’ ) )`
If current action is set to ‘home’, then it won’t be false. It also doesn’t take into account BP_GROUPS_DEFAULT_EXTENSION which was added in 1.5