function create_a_group() { $new_group = new BP_Groups_Group; $new_group->creator_id = 1; $new_group->name = ‘test’; $new_group->slug = ‘test’; $new_group->description

= ‘nothing’; $new_group->news = ‘whatever’; $new_group->status = ‘hidden’; $new_group->is_invitation_only = 1; $new_group->enable_wire = 1; $new_group->enable_forum = 1; $new_group->enable_photos = 1; $new_group->photos_admin_only = 1; $new_group->date_created = current_time(‘mysql’); $new_group->total_member_count = 1; $new_group->avatar_thumb = ‘some kind of path’; $new_group->avatar_full = ‘some kind of path’; $new_group -> save(); groups_update_groupmeta( groups_update_groupmeta( groups_update_groupmeta( groups_update_groupmeta( } $id, $id, $id, $id, ‘total_member_count’, 1 ); ‘last_activity’, time() ); ‘theme’, ‘buddypress’ ); ‘stylesheet’, ‘buddypress’ );

Sign up to vote on this title
UsefulNot useful