Skip to:
Content
Pages
Categories
Search
Top
Bottom

Adding subnavigation item/page for Quick Chat plugin to each of my Buddypress groups

  • @nickharambee

    Participant

    Hi,

    I am trying to add a navigation item/page for the Quick Chat plugin to each of my Buddypress groups. I have found this article online:

    http://www.generalthreat.com/2011/10/creating-a-buddypress-group-home-page/

    which seems to do most of what I would like to do, and I have successfully created a tab called ‘Chat’ for each group, but it points to the activity stream for each group (as this is essentially what the function is designed for) and I am not sure how to change it so that it points to a page where I could include the tag for Quick Chat. I include the function from the page linked to below and would be glad of any help to get this working.

    Thanks,

    Nick

    added to functions.php…

    `function add_activity_tab() {
    global $bp;

    if(bp_is_group()) {
    bp_core_new_subnav_item(
    array(
    ‘name’ => ‘Activity’,
    ‘slug’ => ‘activity’,
    ‘parent_slug’ => $bp->groups->current_group->slug,
    ‘parent_url’ => bp_get_group_permalink( $bp->groups->current_group ),
    ‘position’ => 11,
    ‘item_css_id’ => ‘nav-activity’,
    ‘screen_function’ => create_function(”,”bp_core_load_template( apply_filters( ‘groups_template_group_home’, ‘groups/single/home’ ) );”),
    ‘user_has_access’ => 1
    )
    );

    if ( bp_is_current_action( ‘activity’ ) ) {
    add_action( ‘bp_template_content_header’, create_function( ”, ‘echo “‘ . esc_attr( ‘Activity’ ) . ‘”;’ ) );
    add_action( ‘bp_template_title’, create_function( ”, ‘echo “‘ . esc_attr( ‘Activity’ ) . ‘”;’ ) );
    }
    }
    }

    add_action( ‘bp_actions’, ‘add_activity_tab’, 8 );`

    and then this added to groups/single/home.php…

    `elseif ( bp_group_is_visible() && bp_is_group_activity() ) :
    locate_template( array( ‘groups/single/activity.php’ ), true );

    elseif ( bp_group_is_visible() ) :
    locate_template( array( ‘groups/single/front.php’ ), true );`

Viewing 1 replies (of 1 total)
  • @analogueheart

    Participant

    Hello – I found your post when I was looking for the same solution and am wondering whether you had any luck with it? I’m hoping to only have access to Quickchat available for members of a learning group.

    Any help or guidance would be much appreciated.

    Thanks, Mike

Viewing 1 replies (of 1 total)
  • The topic ‘Adding subnavigation item/page for Quick Chat plugin to each of my Buddypress groups’ is closed to new replies.
Skip to toolbar