<?php/** * BuddyPress - Create Group * * @package BuddyPress * @subpackage bp-default */?><?phpget_header('buddypress');?><?phpget_template_part('bp-wrapper-header');?><formaction="<?phpbp_group_creation_form_action();?>"method="post"id="create-group-form"class="standard-form"enctype="multipart/form-data"><h3><?php_e('Create a Group','buddypress');?>&nbsp;<aclass="button"href="<?phpechotrailingslashit(bp_get_root_domain().'/'.bp_get_groups_root_slug());?>"><?php_e('Groups Directory','buddypress');?></a></h3><?phpdo_action('bp_before_create_group');?><divclass="item-list-tabs no-ajax"id="group-create-tabs"role="navigation"><ul><?phpbp_group_creation_tabs();?></ul></div><?phpdo_action('template_notices');?><divclass="item-body"id="group-create-body"><?php/* Group creation step 1: Basic group details */?><?phpif(bp_is_group_creation_step('group-details')):?><?phpdo_action('bp_before_group_details_creation_step');?><labelfor="group-name"><?php_e('Group Name (required)','buddypress');?></label><inputtype="text"name="group-name"id="group-name"aria-required="true"value="<?phpbp_new_group_name();?>"/><labelfor="group-desc"><?php_e('Group Description (required)','buddypress')?></label><textareaname="group-desc"id="group-desc"aria-required="true"><?phpbp_new_group_description();?></textarea><?phpdo_action('bp_after_group_details_creation_step');do_action('groups_custom_group_fields_editable');// @Deprecatedwp_nonce_field('groups_create_save_group-details');?><?phpendif;?><?php/* Group creation step 2: Group settings */?><?phpif(bp_is_group_creation_step('group-settings')):?><?phpdo_action('bp_before_group_settings_creation_step');?><?phpif(bp_is_active('forums')):?><?phpif(bp_forums_is_installed_correctly()):?><divclass="checkbox"><label><inputtype="checkbox"name="group-show-forum"id="group-show-forum"value="1"<?phpchecked(bp_get_new_group_enable_forum(),true,true);?>/><?php_e('Enable discussion forum','buddypress');?></label></div><?phpelse:?><?phpif(is_super_admin()):?><divclass="checkbox"><label><inputtype="checkbox"disabled="disabled"name="disabled"id="disabled"value="0"/><?phpprintf(__('<strong>Attention Site Admin:</strong> Group forums require the <a href="%s">correct setup and configuration</a> of a bbPress installation.','buddypress'),bp_get_root_domain().'/wp-admin/admin.php?page=bb-forums-setup');?></label></div><?phpendif;?><?phpendif;?><?phpendif;?><hr/><h4><?php_e('Privacy Options','buddypress');?></h4><divclass="radio"><label><inputtype="radio"name="group-status"value="public"<?phpif('public'==bp_get_new_group_status()||!bp_get_new_group_status()){?>checked="checked"<?php}?>/><strong><?php_e('This is a public group','buddypress');?></strong><ul><li><?php_e('Any site member can join this group.','buddypress');?></li><li><?php_e('This group will be listed in the groups directory and in search results.','buddypress');?></li><li><?php_e('Group content and activity will be visible to any site member.','buddypress');?></li></ul></label><label><inputtype="radio"name="group-status"value="private"<?phpif('private'==bp_get_new_group_status()){?>checked="checked"<?php}?>/><strong><?php_e('This is a private group','buddypress');?></strong><ul><li><?php_e('Only users who request membership and are accepted can join the group.','buddypress');?></li><li><?php_e('This group will be listed in the groups directory and in search results.','buddypress');?></li><li><?php_e('Group content and activity will only be visible to members of the group.','buddypress');?></li></ul></label><label><inputtype="radio"name="group-status"value="hidden"<?phpif('hidden'==bp_get_new_group_status()){?>checked="checked"<?php}?>/><strong><?php_e('This is a hidden group','buddypress');?></strong><ul><li><?php_e('Only users who are invited can join the group.','buddypress');?></li><li><?php_e('This group will not be listed in the groups directory or search results.','buddypress');?></li><li><?php_e('Group content and activity will only be visible to members of the group.','buddypress');?></li></ul></label></div><hr/><h4><?php_e('Group Invitations','buddypress');?></h4><p><?php_e('Which members of this group are allowed to invite others?','buddypress')?></p><divclass="radio"><label><inputtype="radio"name="group-invite-status"value="members"<?phpbp_group_show_invite_status_setting('members')?>/><strong><?php_e('All group members','buddypress')?></strong></label><label><inputtype="radio"name="group-invite-status"value="mods"<?phpbp_group_show_invite_status_setting('mods')?>/><strong><?php_e('Group admins and mods only','buddypress')?></strong></label><label><inputtype="radio"name="group-invite-status"value="admins"<?phpbp_group_show_invite_status_setting('admins')?>/><strong><?php_e('Group admins only','buddypress')?></strong></label></div><hr/><?phpdo_action('bp_after_group_settings_creation_step');?><?phpwp_nonce_field('groups_create_save_group-settings');?><?phpendif;?><?php/* Group creation step 3: Avatar Uploads */?><?phpif(bp_is_group_creation_step('group-avatar')):?><?phpdo_action('bp_before_group_avatar_creation_step');?><?phpif('upload-image'==bp_get_avatar_admin_step()):?><divclass="left-menu"><?phpbp_new_group_avatar();?></div><!-- .left-menu --><divclass="main-column"><p><?php_e("Upload an image to use as an avatar for this group. The image will be shown on the main group page, and in search results.",'buddypress');?></p><p><inputtype="file"name="file"id="file"/><inputtype="submit"name="upload"id="upload"value="<?php_e('Upload Image','buddypress');?>"/><inputtype="hidden"name="action"id="action"value="bp_avatar_upload"/></p><p><?php_e('To skip the avatar upload process, hit the "Next Step" button.','buddypress');?></p></div><!-- .main-column --><?phpendif;?><?phpif('crop-image'==bp_get_avatar_admin_step()):?><h3><?php_e('Crop Group Avatar','buddypress');?></h3><imgsrc="<?phpbp_avatar_to_crop();?>"id="avatar-to-crop"class="avatar"alt="<?php_e('Avatar to crop','buddypress');?>"/><divid="avatar-crop-pane"><imgsrc="<?phpbp_avatar_to_crop();?>"id="avatar-crop-preview"class="avatar"alt="<?php_e('Avatar preview','buddypress');?>"/></div><inputtype="submit"name="avatar-crop-submit"id="avatar-crop-submit"value="<?php_e('Crop Image','buddypress');?>"/><inputtype="hidden"name="image_src"id="image_src"value="<?phpbp_avatar_to_crop_src();?>"/><inputtype="hidden"name="upload"id="upload"/><inputtype="hidden"id="x"name="x"/><inputtype="hidden"id="y"name="y"/><inputtype="hidden"id="w"name="w"/><inputtype="hidden"id="h"name="h"/><?phpendif;?><?phpdo_action('bp_after_group_avatar_creation_step');?><?phpwp_nonce_field('groups_create_save_group-avatar');?><?phpendif;?><?php/* Group creation step 4: Invite friends to group */?><?phpif(bp_is_group_creation_step('group-invites')):?><?phpdo_action('bp_before_group_invites_creation_step');?><?phpif(bp_is_active('friends')&&bp_get_total_friend_count(bp_loggedin_user_id())):?><divclass="left-menu"><divid="invite-list"><ul><?phpbp_new_group_invite_friend_list();?></ul><?phpwp_nonce_field('groups_invite_uninvite_user','_wpnonce_invite_uninvite_user');?></div></div><!-- .left-menu --><divclass="main-column"><divid="message"class="info"><p><?php_e('Select people to invite from your friends list.','buddypress');?></p></div><?php/* The ID 'friend-list' is important for AJAX support. */?><ulid="friend-list"class="item-list"role="main"><?phpif(bp_group_has_invites()):?><?phpwhile(bp_group_invites()):bp_group_the_invite();?><liid="<?phpbp_group_invite_item_id();?>"><?phpbp_group_invite_user_avatar();?><h4><?phpbp_group_invite_user_link();?></h4><spanclass="activity"><?phpbp_group_invite_user_last_active();?></span><divclass="action"><aclass="remove"href="<?phpbp_group_invite_user_remove_invite_url();?>"id="<?phpbp_group_invite_item_id();?>"><?php_e('Remove Invite','buddypress');?></a></div></li><?phpendwhile;?><?phpwp_nonce_field('groups_send_invites','_wpnonce_send_invites');?><?phpendif;?></ul></div><!-- .main-column --><?phpelse:?><divid="message"class="info"><p><?php_e('Once you have built up friend connections you will be able to invite others to your group. You can send invites any time in the future by selecting the "Send Invites" option when viewing your new group.','buddypress');?></p></div><?phpendif;?><?phpwp_nonce_field('groups_create_save_group-invites');?><?phpdo_action('bp_after_group_invites_creation_step');?><?phpendif;?><?phpdo_action('groups_custom_create_steps');// Allow plugins to add custom group creation steps ?><?phpdo_action('bp_before_group_creation_step_buttons');?><?phpif('crop-image'!=bp_get_avatar_admin_step()):?><divclass="submit"id="previous-next"><?php/* Previous Button */?><?phpif(!bp_is_first_group_creation_step()):?><inputtype="button"value="<?php_e('Back to Previous Step','buddypress');?>"id="group-creation-previous"name="previous"onclick="location.href='<?phpbp_group_creation_previous_link();?>'"/><?phpendif;?><?php/* Next Button */?><?phpif(!bp_is_last_group_creation_step()&&!bp_is_first_group_creation_step()):?><inputtype="submit"value="<?php_e('Next Step','buddypress');?>"id="group-creation-next"name="save"/><?phpendif;?><?php/* Create Button */?><?phpif(bp_is_first_group_creation_step()):?><inputtype="submit"value="<?php_e('Create Group and Continue','buddypress');?>"id="group-creation-create"name="save"/><?phpendif;?><?php/* Finish Button */?><?phpif(bp_is_last_group_creation_step()):?><inputtype="submit"value="<?php_e('Finish','buddypress');?>"id="group-creation-finish"name="save"/><?phpendif;?></div><?phpendif;?><?phpdo_action('bp_after_group_creation_step_buttons');?><?php/* Don't leave out this hidden field */?><inputtype="hidden"name="group_id"id="group_id"value="<?phpbp_new_group_id();?>"/><?phpdo_action('bp_directory_groups_content');?></div><!-- .item-body --><?phpdo_action('bp_after_create_group');?></form><?phpget_template_part('bp-wrapper-footer-top');?><?phpget_template_part('bp-wrapper-footer-bottom');?>