name = 'Group Info'; $this->slug = 'info'; $this->enable_nav_item = true; $this->create_step_position = 21; $this->nav_item_position = 41; } function create_screen() { if ( !bp_is_group_creation_step( $this->slug ) ) return false; ?>

Please set your group field options below. Any group admin can also change these using the Admin tab.

Welcome Message:

Location:

slug ); } function create_screen_save() { global $bp; if ( !isset( $_POST['save'] ) ) return false; //did not come from save button check_admin_referer( 'groups_create_save_' . $this->slug ); /* Save any details submitted here */ groups_update_groupmeta( $bp->groups->new_group_id, 'bpgf_welcome_text', $_POST['bpgf_welcome_text'] ); groups_update_groupmeta( $bp->groups->new_group_id, 'bpgf_location', $_POST['bpgf_location'] ); } function edit_screen() { global $bp; if ( !bp_is_group_admin_screen( $this->slug ) ) return false; ?>

name ) ?>

Please use this to update your group welcome message and location:

Message:

Location:

slug ); } function edit_screen_save() { global $bp; if ( !isset( $_POST['save'] ) ) return false; //did not come from save button check_admin_referer( 'groups_edit_save_' . $this->slug ); /* Insert your edit screen save code here */ $success = true; //assume BuddyPress can do it if (!groups_update_groupmeta($bp->groups->current_group->id, 'bpgf_welcome_text', $_POST['bpgf_welcome_text'])) $success = false; if (!groups_update_groupmeta($bp->groups->current_group->id, 'bpgf_location', $_POST['bpgf_location'])) $success = false; /* To post an error/success message to the screen, use the following */ if ( !$success ) bp_core_add_message( __( 'There was an error saving, please try again', 'buddypress' ), 'error' ); else bp_core_add_message( __( 'Settings saved successfully', 'buddypress' ) ); bp_core_redirect( bp_get_group_permalink( $bp->groups->current_group ) . '/admin/' . $this->slug ); } function display() { /* Use this function to display the actual content of your group extension when the nav item is selected */ global $bp; ?> Thanks for visiting groups->current_group->name?>

groups->current_group->id, 'bpgf_welcome_text'); ?>

Location: groups->current_group->id, 'bpgf_location'); ?>

name ) ?>

You could display a small snippet of information from your group extension here. It will show on the group home screen.