Using Buddypress Group API

205 views
Skip to first unread message

tse com

unread,
Jan 13, 2014, 5:31:13 AM1/13/14
to bigblueb...@googlegroups.com
Hey there, was wondering if any of you fine folks can point me in the right direction. I am attempting to use Buddypress Groups in conjunction with BBB whereas when a user creates a group, he also has the option to create their own meeting room for that group. Because I am new to BBB I am wondering how I might connect the two. I do have the wordpress plugin but of course it doesn't really deal directly with buddypress. An example of Buddypress' group extension is this:

class My_Group_Extension extends BP_Group_Extension {

function my_group_extension() {
$this->name = ‘My Group Extension’;
$this->slug = ‘my-group-extension’;

$this->create_step_position = 21;
$this->nav_item_position = 31;
}

function create_screen() {
if ( !bp_is_group_creation_step( $this->slug ) )
return false;
?>

The HTML for my creation step goes here.

<?php
wp_nonce_field( ‘groups_create_save_’ . $this->slug );
}

function create_screen_save() {
global $bp;

check_admin_referer( ‘groups_create_save_’ . $this->slug );

/* Save any details submitted here */
groups_update_groupmeta( $bp->groups->new_group_id, ‘my_meta_name’, ‘value’ );
}

function edit_screen() {
if ( !bp_is_group_admin_screen( $this->slug ) )
return false; ?>

name?>

Edit steps here

<?php
wp_nonce_field( ‘groups_edit_save_’ . $this->slug );
}

function edit_screen_save() {
global $bp;

if ( !isset( $_POST ) )
return false;

check_admin_referer( ‘groups_edit_save_’ . $this->slug );

/* Insert your edit screen save code here */

/* 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 */
}

function widget_display() { ?>

name ) ?>

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

<?php
}
}
bp_register_group_extension( ‘My_Group_Extension’ );`

END

My question is how to incorporate BBB?


Chad Pilkey

unread,
Jan 13, 2014, 12:37:21 PM1/13/14
to bigblueb...@googlegroups.com
I would suggest reading through the API docs, http://code.google.com/p/bigbluebutton/wiki/API, and learn the different calls available to third party apps. The ones that will be most relevant to you will likely be the create, join, and getRecordings calls. You could use the name of the group for the meeting id and everyone from the group would join that. For the passwords you could either hard code the passwords and use the same ones for every group or randomly generate the viewer and moderator passwords and store them somewhere (like a database) so that they can be used when someone wants to join.

My PHP knowledge is pretty rusty so I can't really give any specific code, but that is a very basic overview of what you could do. There are many more things that you could add for more bells and whistles such as making sure that the group creator is in the meeting first before anyone else joins, or giving an option to see all of the past recordings if you choose to allow recording in your create call.

I would also suggest using the API Mate created by the people at Mconf to test your API calls and see what values they require and return.

Chad

tse com

unread,
Jan 14, 2014, 3:47:25 AM1/14/14
to bigblueb...@googlegroups.com
Thanks, Chad. This is very helpful.


On Monday, January 13, 2014 5:31:13 AM UTC-5, tse com wrote:
Reply all
Reply to author
Forward
0 new messages